:root {
    --app-font-size-root: clamp(15px, 0.12vw + 14.6px, 17px);
    --app-font-size-body: clamp(0.96rem, 0.12vw + 0.93rem, 1rem);
    --app-font-size-copy: clamp(0.9rem, 0.14vw + 0.86rem, 0.98rem);
    --app-font-size-title-sm: clamp(1.18rem, 0.38vw + 1.08rem, 1.38rem);
    --app-font-size-title-md: clamp(1.28rem, 0.46vw + 1.16rem, 1.55rem);
    --app-font-size-hero-copy: clamp(0.98rem, 0.2vw + 0.92rem, 1.08rem);
}

html {
    font-size: var(--app-font-size-root);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Nunito', sans-serif;
    font-size: var(--app-font-size-body);
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    background-color: #f0f0f0;
    transition: background-color 0.3s ease;
}

body.dark {
    background-color: #1a202c;
}

.auth-card,
.subject-card,
.leaderboard-card {
    transition: all 0.3s ease;
}

.auth-card:hover,
.subject-card:hover,
.leaderboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.dark .auth-card:hover,
.dark .subject-card:hover,
.dark .leaderboard-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.streak-fire {
    animation: fire 1s infinite alternate;
}

@keyframes fire {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.dark-toggle {
    transition: all 0.3s ease;
}

.header-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.dark .header-gradient {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
}

.step-indicator {
    transition: all 0.3s ease;
}

.form-step {
    transition: transform 0.3s ease;
}

.logo-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.password-match-error {
    color: #ff4b4b;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.bounce-in {
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% { transform: scale(0.8); opacity: 0; }
    70% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #f00;
    opacity: 0;
}

.floating {
    animation: float 3s ease-in-out infinite;
}

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

.spin {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pulse-glow {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(88, 204, 2, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(88, 204, 2, 0); }
    100% { box-shadow: 0 0 0 0 rgba(88, 204, 2, 0); }
}

.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.level-badge {
    position: relative;
    overflow: hidden;
}

.level-badge::after {
    content: none;
}

.lesson-content {
    font-size: var(--app-font-size-copy);
    line-height: 1.7;
}

.lesson-content > :first-child {
    margin-top: 0;
}

.lesson-content h3 {
    font-size: clamp(1.12rem, 0.4vw + 1rem, 1.3rem);
    line-height: 1.3;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.dark .lesson-content h3 {
    color: #e2e8f0;
}

.lesson-content p {
    margin-bottom: 1rem;
    color: #374151;
}

.dark .lesson-content p {
    color: #cbd5e0;
}

.lesson-content ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.lesson-content li {
    margin-bottom: 0.5rem;
    color: #374151;
}

.dark .lesson-content li {
    color: #cbd5e0;
}

.lesson-content .katex {
    max-width: 100%;
}

.lesson-content .katex-display {
    overflow-x: auto;
    overflow-y: hidden;
    margin: 1rem 0;
    padding: 0.25rem 0;
    -webkit-overflow-scrolling: touch;
}

.lesson-content .katex-display > .katex {
    display: inline-block;
    min-width: max-content;
}

.app-lesson-modal {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.app-lesson-modal-heading {
    min-width: 0;
}

.app-lesson-modal-kickers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 0.8rem;
}

.app-lesson-modal-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.42rem 0.75rem;
    background: rgba(88, 204, 2, 0.14);
    color: #19703a;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.app-lesson-modal-kicker--soft {
    background: rgba(28, 176, 246, 0.12);
    color: #136b96;
}

.dark .app-lesson-modal-kicker {
    background: rgba(88, 204, 2, 0.16);
    color: #bef264;
}

.dark .app-lesson-modal-kicker--soft {
    background: rgba(28, 176, 246, 0.18);
    color: #93c5fd;
}

.app-lesson-modal-title {
    max-width: 32rem;
}

.app-lesson-modal-subtitle {
    max-width: 36rem;
}

.app-lesson-modal-meta {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.55rem;
    align-items: center;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.app-lesson-modal-meta::-webkit-scrollbar {
    display: none;
}

.app-lesson-modal-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 0.5rem 0.82rem;
    border: 1px solid rgba(191, 219, 205, 0.84);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 252, 249, 0.9));
    color: #1f2937;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.app-lesson-modal-pill i {
    font-size: 0.85rem;
}

.app-lesson-modal-pill--xp i {
    color: #1cb0f6;
}

.app-lesson-modal-pill--questions i {
    color: #58cc02;
}

.app-lesson-modal-pill--topic i {
    color: #9e60f4;
}

.dark .app-lesson-modal-pill {
    border-color: rgba(74, 85, 104, 0.72);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.58), rgba(12, 35, 41, 0.52));
    color: #e2e8f0;
    box-shadow: 0 16px 28px rgba(2, 6, 23, 0.22);
}

.app-lesson-reading-surface {
    padding: 1.35rem;
    border: 1px solid rgba(191, 219, 205, 0.82);
    border-radius: 1.5rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 252, 249, 0.96));
    box-shadow: 0 20px 38px rgba(15, 23, 42, 0.08);
}

.dark .app-lesson-reading-surface {
    border-color: rgba(74, 85, 104, 0.72);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.56), rgba(12, 35, 41, 0.48));
    box-shadow: 0 22px 42px rgba(2, 6, 23, 0.26);
}

.app-lesson-reading-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.app-lesson-reading-kicker {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.45rem 0.78rem;
    background: rgba(15, 23, 42, 0.05);
    color: #475569;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dark .app-lesson-reading-kicker {
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
}

.app-lesson-reading-surface .lesson-content h3:first-child {
    margin-top: 0.15rem;
}

.app-lesson-modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.15rem;
}

@media (max-width: 640px) {
    .app-lesson-modal {
        gap: 1.1rem;
    }

    .app-lesson-modal-pill {
        justify-content: center;
    }

    .app-lesson-reading-surface {
        padding: 1.1rem;
        border-radius: 1.25rem;
    }

    .app-lesson-modal-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }
}

.code-block {
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    border-radius: 0.5rem;
    font-family: 'Courier New', monospace;
    margin: 1rem 0;
    overflow-x: auto;
}

.example-box {
    background-color: #e6f7ff;
    border-left: 4px solid #1890ff;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
}

.dark .example-box {
    background-color: #1a365d;
    border-left: 4px solid #4299e1;
}

.key-point {
    background-color: #fff7ed;
    border-left: 4px solid #f59e0b;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
}

.dark .key-point {
    background-color: #3e2723;
    border-left: 4px solid #f6ad55;
}

.quiz-option {
    transition: all 0.2s ease;
}

.quiz-option:hover {
    transform: translateX(5px);
}

.correct-answer {
    background-color: #d1fae5 !important;
    border-color: #10b981 !important;
}

.dark .correct-answer {
    background-color: #065f46 !important;
    border-color: #10b981 !important;
}

.incorrect-answer {
    background-color: #fee2e2 !important;
    border-color: #ef4444 !important;
}

.dark .incorrect-answer {
    background-color: #7f1d1d !important;
    border-color: #ef4444 !important;
}

.modal-overlay {
    transition: opacity 0.3s ease;
}

.modal-content {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.slide-in {
    transform: translateY(0);
    opacity: 1;
}

.slide-out {
    transform: translateY(20px);
    opacity: 0;
}

.confetti-main {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: #f00;
    opacity: 0.7;
    animation: fall 5s linear forwards;
    z-index: 1000;
}

@keyframes fall {
    0% { transform: translateY(-100px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(1000px) rotate(720deg); opacity: 0; }
}

.bounce {
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-30px); }
    60% { transform: translateY(-15px); }
}

.pulse {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.loading-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.dark .loading-animation {
    background-color: #1a202c;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    animation: fadeIn 1s ease-in-out;
}

.logo {
    width: clamp(5.6rem, 4.5rem + 3.6vw, 6.8rem);
    height: clamp(5.6rem, 4.5rem + 3.6vw, 6.8rem);
    background: linear-gradient(135deg, #58cc02 0%, #46a302 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    box-shadow: 0 22px 46px rgba(70, 163, 2, 0.22);
    animation: pulseScale 2s infinite;
}

.logo i,
.logo .svg-inline--fa,
.logo svg {
    display: block;
    width: clamp(2.75rem, 2.05rem + 1.7vw, 3.65rem);
    height: clamp(2.75rem, 2.05rem + 1.7vw, 3.65rem);
    font-size: clamp(2.75rem, 2.05rem + 1.7vw, 3.65rem);
    line-height: 1;
    color: white;
    fill: currentColor;
    flex-shrink: 0;
    transform: translateY(-0.02em);
}

.logo-text {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(1.75rem, 1.1rem + 1.8vw, 2.2rem);
    font-weight: 800;
    background: linear-gradient(135deg, #58cc02 0%, #46a302 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textPulse 2s infinite;
}

@keyframes pulseScale {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes textPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hidden-content {
    display: none;
}

.rank-number {
    font-weight: 800;
    font-size: clamp(1.2rem, 0.8rem + 1vw, 1.5rem);
    min-width: 32px;
    text-align: center;
}

.rank-1 {
    color: #ffd700;
}

.rank-2 {
    color: #c0c0c0;
}

.rank-3 {
    color: #cd7f32;
}

.rank-other {
    color: #58cc02;
}

.filter-btn {
    transition: all 0.2s ease;
}

.filter-btn:hover {
    transform: translateY(-2px);
}

.filter-btn.active {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.app-filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    border: 1px solid #58cc02;
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    font-weight: 700;
    color: #58cc02;
    background: transparent !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.app-filter-button:hover {
    transform: none;
    background: #58cc02 !important;
    color: #ffffff !important;
    box-shadow: none;
}

.app-filter-button--active {
    background: #58cc02 !important;
    color: #ffffff !important;
    box-shadow: none;
}

.app-filter-button--dropdown {
    width: 100%;
    justify-content: space-between;
}

.dark .app-filter-button {
    border-color: #58cc02;
    color: #58cc02;
}

.dark .app-filter-button:hover,
.dark .app-filter-button--active {
    color: #ffffff !important;
}

@media (min-width: 768px) {
    .app-filter-button--dropdown {
        width: auto;
    }

    .app-leaderboard-time-filter {
        max-width: 18rem;
    }
}

.app-leaderboard-filters .filter-btn,
.app-leaderboard-filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 1px solid #e5e7eb !important;
    border-radius: 1rem !important;
    padding: 0.72rem 0.95rem !important;
    min-height: 3.3rem;
    font-weight: 700;
    color: #2c3e50 !important;
    background: transparent !important;
    box-shadow: none !important;
    line-height: 1.15;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.app-leaderboard-filter-grid .app-leaderboard-filter-button,
.app-leaderboard-filter-grid .filter-btn {
    width: 100%;
    min-height: 3.55rem;
    justify-content: flex-start;
    text-align: left;
    padding: 0.85rem 1rem !important;
}

.app-leaderboard-filter-grid .app-leaderboard-filter-button i,
.app-leaderboard-filter-grid .filter-btn i {
    margin-right: 0.6rem !important;
    font-size: 0.95rem;
}

.app-leaderboard-filters .filter-btn:hover,
.app-leaderboard-filter-button:hover {
    transform: none;
    background: transparent !important;
    color: #2c3e50 !important;
    border-color: rgba(88, 204, 2, 0.55) !important;
    box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.14) !important;
}

.app-leaderboard-filters .filter-btn.active,
.app-leaderboard-filter-button--active {
    transform: none;
    background: transparent !important;
    color: #58cc02 !important;
    border-color: rgba(88, 204, 2, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.16) !important;
}

.app-leaderboard-filter-button--dropdown {
    justify-content: space-between;
}

.app-leaderboard-time-filter {
    width: 100%;
    max-width: none;
}

.app-leaderboard-time-filter .app-leaderboard-filter-button--dropdown {
    width: 100%;
    min-height: 3.25rem;
    padding: 0.72rem 0.95rem !important;
    border-radius: 1.05rem !important;
}

.app-leaderboard-time-filter .app-leaderboard-filter-button--dropdown > span:first-child {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.app-leaderboard-time-filter .app-leaderboard-filter-button--dropdown > span:first-child span:last-child {
    white-space: nowrap;
}

.dark .app-leaderboard-filters .filter-btn,
.dark .app-leaderboard-filter-button {
    border-color: #4a5568 !important;
    color: #e2e8f0 !important;
    background: transparent !important;
}

.dark .app-leaderboard-filters .filter-btn:hover,
.dark .app-leaderboard-filters .filter-btn.active,
.dark .app-leaderboard-filter-button:hover,
.dark .app-leaderboard-filter-button--active {
    background: transparent !important;
    border-color: rgba(88, 204, 2, 0.7) !important;
    color: #58cc02 !important;
    box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.18) !important;
}

@media (min-width: 768px) {
    .app-leaderboard-filter-button--dropdown {
        width: auto;
    }
}

.app-page-shell[x-show*='leaderboard'] .filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    border: 1px solid #e5e7eb !important;
    border-radius: 1rem !important;
    padding: 0.875rem 1rem !important;
    font-weight: 700;
    color: #2c3e50 !important;
    background: transparent !important;
    box-shadow: none !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.app-page-shell[x-show*='leaderboard'] .filter-btn:hover,
.app-page-shell[x-show*='leaderboard'] .filter-btn.active {
    transform: none;
    background: transparent !important;
    border-color: rgba(88, 204, 2, 0.6) !important;
    color: #58cc02 !important;
    box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.16) !important;
}

.app-page-shell[x-show*='leaderboard'] .filter-btn.w-full {
    justify-content: space-between;
}

.dark .app-page-shell[x-show*='leaderboard'] .filter-btn {
    border-color: #4a5568 !important;
    color: #e2e8f0 !important;
    background: transparent !important;
}

.dark .app-page-shell[x-show*='leaderboard'] .filter-btn:hover,
.dark .app-page-shell[x-show*='leaderboard'] .filter-btn.active {
    background: transparent !important;
    border-color: rgba(88, 204, 2, 0.7) !important;
    color: #58cc02 !important;
    box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.18) !important;
}

.app-leaderboard-filter-panel {
    position: relative;
    z-index: 20;
    overflow: visible !important;
}

.app-leaderboard-time-filter {
    position: relative;
    z-index: 30;
}

.app-leaderboard-time-menu {
    z-index: 40 !important;
    padding: 0.45rem;
    border-radius: 1rem !important;
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.18), 0 8px 18px rgba(15, 23, 42, 0.08) !important;
}

.dark .app-leaderboard-time-menu {
    box-shadow: 0 26px 52px rgba(2, 6, 23, 0.42), 0 10px 22px rgba(2, 6, 23, 0.22) !important;
}

.app-leaderboard-time-menu button {
    display: flex;
    width: 100%;
    align-items: center;
    border-radius: 0.8rem;
    padding: 0.75rem 0.85rem !important;
    font-weight: 700;
}

.app-leaderboard-time-menu button + button {
    border-top: none !important;
    margin-top: 0.2rem;
}

.app-leaderboard-time-menu button i {
    width: 1rem;
}

.app-leaderboard-time-menu button:hover {
    background: rgba(88, 204, 2, 0.08) !important;
}

.dark .app-leaderboard-time-menu button:hover {
    background: rgba(88, 204, 2, 0.12) !important;
}

@media (max-width: 767px) {
    .app-leaderboard-filter-grid .app-leaderboard-filter-button,
    .app-leaderboard-filter-grid .filter-btn {
        min-height: 3.2rem;
        padding: 0.72rem 0.85rem !important;
    }

    .app-leaderboard-filter-grid .app-leaderboard-filter-button i,
    .app-leaderboard-filter-grid .filter-btn i {
        margin-right: 0.5rem !important;
    }
}

.app-leaderboard-table-panel {
    position: relative;
    z-index: 0;
}

.app-leaderboard-entry {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.dark .app-leaderboard-entry {
    background: transparent !important;
}

.dropdown-content {
    animation: fadeIn 0.3s ease;
}

.trophy-animation {
    animation: trophyPulse 1.5s infinite;
}

@keyframes trophyPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.profile-badge {
    position: relative;
}

.badge-icon {
    position: absolute;
    right: 0.35rem;
    bottom: 0.35rem;
    display: flex;
    width: 1.7rem;
    height: 1.7rem;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #58cc02, #1cb0f6);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.16);
}

.dark .badge-icon {
    border-color: rgba(15, 23, 42, 0.92);
}

.edit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.56));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
}

.profile-pic-container:hover .edit-overlay {
    opacity: 1;
}

.level-badge-profile {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.dark .level-badge-profile {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
}

.app-profile-hero {
    position: relative;
    overflow: hidden;
    padding: 1.75rem;
    border-color: rgba(88, 204, 2, 0.12) !important;
}

.app-profile-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(88, 204, 2, 0.14), transparent 32%),
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.16), transparent 34%);
    pointer-events: none;
}

.app-profile-hero::after {
    content: '';
    position: absolute;
    width: 12rem;
    height: 12rem;
    right: -3.5rem;
    bottom: -4rem;
    border-radius: 9999px;
    background: radial-gradient(circle, rgba(28, 176, 246, 0.12), transparent 68%);
    filter: blur(10px);
    pointer-events: none;
}

.dark .app-profile-hero {
    border-color: rgba(88, 204, 2, 0.18) !important;
}

.dark .app-profile-hero::before {
    background:
        radial-gradient(circle at top left, rgba(88, 204, 2, 0.18), transparent 34%),
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.18), transparent 36%);
}

.dark .app-profile-hero::after {
    background: radial-gradient(circle, rgba(28, 176, 246, 0.18), transparent 70%);
}

.app-profile-hero-layout {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.app-profile-hero-top {
    display: grid;
    gap: 1.5rem;
    align-items: start;
}

.app-profile-hero-identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    text-align: center;
}

.app-profile-avatar-frame {
    position: relative;
    display: inline-flex;
    padding: 0.45rem;
    border-radius: 9999px;
    background: linear-gradient(145deg, rgba(88, 204, 2, 0.96), rgba(28, 176, 246, 0.92));
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.16);
}

.dark .app-profile-avatar-frame {
    box-shadow: 0 24px 48px rgba(2, 6, 23, 0.34);
}

.app-profile-avatar-image {
    width: 7.25rem;
    height: 7.25rem;
    object-fit: cover;
    border-radius: 9999px;
    border: 4px solid rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.76);
}

.dark .app-profile-avatar-image {
    border-color: rgba(15, 23, 42, 0.88);
    background: rgba(15, 23, 42, 0.72);
}

.app-profile-photo-note {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.app-profile-hero-content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 1rem;
}

.app-profile-hero-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
}

.app-profile-heading {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.app-profile-heading-copy {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 0.7rem;
}

.app-profile-subline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.app-profile-eyebrow {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.45rem 0.8rem;
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(148, 163, 184, 0.16);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #5b6b82;
}

.dark .app-profile-eyebrow {
    background: rgba(15, 23, 42, 0.54);
    border-color: rgba(74, 85, 104, 0.42);
    color: #9fb0c7;
}

.app-profile-name {
    margin: 0;
    font-size: clamp(2.1rem, 3.2vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 0.98;
    text-wrap: balance;
}

.app-profile-level-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2.65rem;
    border-radius: 9999px;
    padding: 0.6rem 0.95rem;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #334155;
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.app-profile-level-chip strong {
    font-weight: 800;
    color: #1f2937;
}

.dark .app-profile-level-chip {
    background: rgba(15, 23, 42, 0.58);
    border-color: rgba(74, 85, 104, 0.44);
    color: #d6e2f0;
    box-shadow: 0 14px 26px rgba(2, 6, 23, 0.2);
}

.dark .app-profile-level-chip strong {
    color: #f8fafc;
}

.app-profile-bio-lead {
    margin: 0;
    max-width: 46rem;
    padding: 1rem 1.15rem;
    border-radius: 1.15rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.5);
    box-shadow: inset 3px 0 0 rgba(88, 204, 2, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    font-size: var(--app-font-size-hero-copy);
    line-height: 1.7;
}

.dark .app-profile-bio-lead {
    background: rgba(15, 23, 42, 0.48);
    border-color: rgba(74, 85, 104, 0.42);
    box-shadow: inset 3px 0 0 rgba(88, 204, 2, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.app-profile-hero-pills {
    display: grid;
    gap: 0.8rem;
}

.app-profile-hero-pill {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
        "icon value"
        "icon label";
    align-items: center;
    column-gap: 0.7rem;
    row-gap: 0.12rem;
    width: 100%;
    min-width: 0;
    padding: 0.82rem 1rem;
    border-radius: 1.05rem;
    font-size: 0.9rem;
    font-weight: 800;
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.05);
}

.app-profile-hero-pill i {
    grid-area: icon;
    align-self: center;
    font-size: 1rem;
}

.app-profile-hero-pill-value {
    grid-area: value;
    min-width: 0;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1;
}

.app-profile-hero-pill-label {
    grid-area: label;
    min-width: 0;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    opacity: 0.88;
    line-height: 1.2;
}

.app-profile-hero-pills--band {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.dark .app-profile-hero-pills--band {
    border-top-color: rgba(74, 85, 104, 0.42);
}

.app-profile-hero-pills--band .app-profile-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    width: auto;
    max-width: 100%;
    min-height: 2.1rem;
    padding: 0.38rem 0.72rem;
    border-radius: 9999px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.dark .app-profile-hero-pills--band .app-profile-hero-pill {
    box-shadow: 0 10px 20px rgba(2, 6, 23, 0.2);
}

.app-profile-hero-pills--band .app-profile-hero-pill i {
    font-size: 0.82rem;
}

.app-profile-hero-pills--band .app-profile-hero-pill-value {
    min-width: auto;
    font-size: 0.96rem;
}

.app-profile-hero-pills--band .app-profile-hero-pill-label {
    min-width: auto;
    font-size: 0.72rem;
    letter-spacing: 0;
    line-height: 1;
    opacity: 1;
    white-space: nowrap;
}

.app-profile-hero-pill--streak {
    color: #b45309;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.24), rgba(255, 255, 255, 0.7));
    border-color: rgba(245, 158, 11, 0.18);
}

.dark .app-profile-hero-pill--streak {
    color: #fcd34d;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(15, 23, 42, 0.74));
    border-color: rgba(245, 158, 11, 0.22);
}

.app-profile-hero-pill--xp {
    color: #0369a1;
    background: linear-gradient(135deg, rgba(28, 176, 246, 0.18), rgba(255, 255, 255, 0.7));
    border-color: rgba(28, 176, 246, 0.18);
}

.dark .app-profile-hero-pill--xp {
    color: #7dd3fc;
    background: linear-gradient(135deg, rgba(28, 176, 246, 0.22), rgba(15, 23, 42, 0.74));
    border-color: rgba(28, 176, 246, 0.2);
}

.app-profile-hero-pill--subjects {
    color: #2f8d11;
    background: linear-gradient(135deg, rgba(88, 204, 2, 0.18), rgba(255, 255, 255, 0.72));
    border-color: rgba(88, 204, 2, 0.16);
}

.dark .app-profile-hero-pill--subjects {
    color: #b7ff91;
    background: linear-gradient(135deg, rgba(88, 204, 2, 0.22), rgba(15, 23, 42, 0.74));
    border-color: rgba(88, 204, 2, 0.2);
}

.app-profile-hero-pill--lessons {
    color: #0c78b7;
    background: linear-gradient(135deg, rgba(28, 176, 246, 0.16), rgba(255, 255, 255, 0.72));
    border-color: rgba(28, 176, 246, 0.16);
}

.dark .app-profile-hero-pill--lessons {
    color: #8dddff;
    background: linear-gradient(135deg, rgba(28, 176, 246, 0.2), rgba(15, 23, 42, 0.74));
    border-color: rgba(28, 176, 246, 0.22);
}

.app-profile-hero-pill--followers {
    color: #7c3aed;
    background: linear-gradient(135deg, rgba(158, 96, 244, 0.16), rgba(255, 255, 255, 0.72));
    border-color: rgba(158, 96, 244, 0.16);
}

.dark .app-profile-hero-pill--followers {
    color: #d8b4fe;
    background: linear-gradient(135deg, rgba(158, 96, 244, 0.2), rgba(15, 23, 42, 0.74));
    border-color: rgba(158, 96, 244, 0.22);
}

.app-profile-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
}

.app-profile-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    border-radius: 1rem;
    border-width: 1px;
    font-size: 0.94rem;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.app-profile-action-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12);
}

.dark .app-profile-action-button:hover:not(:disabled) {
    box-shadow: 0 22px 34px rgba(2, 6, 23, 0.32);
}

.app-profile-action-button--primary {
    border-color: rgba(88, 204, 2, 0.18) !important;
    background: linear-gradient(135deg, rgba(88, 204, 2, 0.14), rgba(28, 176, 246, 0.08)) !important;
    color: #175d1c !important;
}

.dark .app-profile-action-button--primary {
    border-color: rgba(88, 204, 2, 0.28) !important;
    background: linear-gradient(135deg, rgba(88, 204, 2, 0.2), rgba(28, 176, 246, 0.12)) !important;
    color: #ecfccb !important;
}

.app-profile-action-button--danger {
    border-color: rgba(255, 75, 75, 0.2) !important;
    background: linear-gradient(135deg, rgba(255, 75, 75, 0.12), rgba(255, 255, 255, 0.72)) !important;
}

.dark .app-profile-action-button--danger {
    border-color: rgba(255, 75, 75, 0.26) !important;
    background: linear-gradient(135deg, rgba(255, 75, 75, 0.18), rgba(15, 23, 42, 0.76)) !important;
}

.app-profile-action-button--pro {
    border-color: rgba(255, 200, 0, 0.22) !important;
    box-shadow: 0 16px 30px rgba(245, 158, 11, 0.16);
}

.dark .app-profile-action-button--pro {
    box-shadow: 0 20px 36px rgba(245, 158, 11, 0.2);
}

.activity-card {
    transition: all 0.3s ease;
    border-left-width: 4px;
}

.activity-card:hover {
    transform: translateX(5px);
}

.win-card {
    border-left-color: #58cc02;
    background: linear-gradient(90deg, rgba(88,204,2,0.1) 0%, rgba(88,204,2,0.05) 100%);
}

.dark .win-card {
    background: linear-gradient(90deg, rgba(88,204,2,0.15) 0%, rgba(88,204,2,0.08) 100%);
}

.loss-card {
    border-left-color: #ff4b4b;
    background: linear-gradient(90deg, rgba(255,75,75,0.1) 0%, rgba(255,75,75,0.05) 100%);
}

.dark .loss-card {
    background: linear-gradient(90deg, rgba(255,75,75,0.15) 0%, rgba(255,75,75,0.08) 100%);
}

.follower-card {
    border-left-color: #1cb0f6;
    background: linear-gradient(90deg, rgba(28,176,246,0.1) 0%, rgba(28,176,246,0.05) 100%);
}

.dark .follower-card {
    background: linear-gradient(90deg, rgba(28,176,246,0.15) 0%, rgba(28,176,246,0.08) 100%);
}

.badge-card {
    border-left-color: #ffc800;
    background: linear-gradient(90deg, rgba(255,200,0,0.1) 0%, rgba(255,200,0,0.05) 100%);
}

.dark .badge-card {
    background: linear-gradient(90deg, rgba(255,200,0,0.15) 0%, rgba(255,200,0,0.08) 100%);
}

.vs-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

.score-win {
    color: #58cc02;
    font-weight: bold;
}

.score-loss {
    color: #ff4b4b;
    font-weight: bold;
}

.app-profile-activity-feed {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.app-profile-activity-feed::before {
    content: '';
    position: absolute;
    top: 0.75rem;
    bottom: 0.75rem;
    left: 1.25rem;
    width: 2px;
    border-radius: 9999px;
    background: linear-gradient(180deg, rgba(88, 204, 2, 0.24), rgba(28, 176, 246, 0.12));
    pointer-events: none;
}

.app-profile-activity-feed--empty::before {
    display: none;
}

.app-profile-activity-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.app-profile-activity-icon {
    position: relative;
    z-index: 1;
    display: flex;
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 0.95rem;
    color: #fff;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);
}

.app-profile-activity-body {
    min-width: 0;
    flex: 1;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 1rem;
    padding: 1rem 1rem 0.95rem;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dark .app-profile-activity-body {
    background: rgba(15, 23, 42, 0.64);
    border-color: rgba(74, 85, 104, 0.4);
    box-shadow: 0 16px 32px rgba(2, 6, 23, 0.24);
}

.app-profile-activity-item:hover .app-profile-activity-body {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
}

.dark .app-profile-activity-item:hover .app-profile-activity-body {
    box-shadow: 0 20px 40px rgba(2, 6, 23, 0.3);
}

.app-profile-activity-item--success .app-profile-activity-body {
    border-color: rgba(88, 204, 2, 0.18);
    background: linear-gradient(135deg, rgba(88, 204, 2, 0.1), rgba(255, 255, 255, 0.8));
}

.dark .app-profile-activity-item--success .app-profile-activity-body {
    background: linear-gradient(135deg, rgba(88, 204, 2, 0.14), rgba(15, 23, 42, 0.84));
}

.app-profile-activity-item--danger .app-profile-activity-body {
    border-color: rgba(255, 75, 75, 0.18);
    background: linear-gradient(135deg, rgba(255, 75, 75, 0.1), rgba(255, 255, 255, 0.8));
}

.dark .app-profile-activity-item--danger .app-profile-activity-body {
    background: linear-gradient(135deg, rgba(255, 75, 75, 0.14), rgba(15, 23, 42, 0.84));
}

.app-profile-activity-item--info .app-profile-activity-body {
    border-color: rgba(28, 176, 246, 0.18);
    background: linear-gradient(135deg, rgba(28, 176, 246, 0.09), rgba(255, 255, 255, 0.8));
}

.dark .app-profile-activity-item--info .app-profile-activity-body {
    background: linear-gradient(135deg, rgba(28, 176, 246, 0.14), rgba(15, 23, 42, 0.84));
}

.app-profile-activity-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.app-profile-activity-title {
    font-size: 1rem;
    font-weight: 800;
    color: #1f2937;
    line-height: 1.35;
}

.dark .app-profile-activity-title {
    color: #e2e8f0;
}

.app-profile-activity-detail {
    margin-top: 0.25rem;
    font-size: 0.925rem;
    line-height: 1.55;
    color: #475569;
}

.dark .app-profile-activity-detail {
    color: #cbd5e0;
}

.app-profile-activity-time {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #64748b;
}

.dark .app-profile-activity-time {
    color: #94a3b8;
}

.app-profile-activity-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.app-profile-activity-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.8rem;
    border-radius: 9999px;
    border: 1px solid transparent;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
}

.app-profile-activity-pill--success {
    color: #2f8d11;
    background: rgba(88, 204, 2, 0.12);
    border-color: rgba(88, 204, 2, 0.18);
}

.dark .app-profile-activity-pill--success {
    color: #88f15f;
    background: rgba(88, 204, 2, 0.16);
    border-color: rgba(88, 204, 2, 0.22);
}

.app-profile-activity-pill--danger {
    color: #dc2626;
    background: rgba(255, 75, 75, 0.12);
    border-color: rgba(255, 75, 75, 0.18);
}

.dark .app-profile-activity-pill--danger {
    color: #fda4af;
    background: rgba(255, 75, 75, 0.16);
    border-color: rgba(255, 75, 75, 0.22);
}

.app-profile-activity-pill--info {
    color: #0369a1;
    background: rgba(28, 176, 246, 0.12);
    border-color: rgba(28, 176, 246, 0.18);
}

.dark .app-profile-activity-pill--info {
    color: #7dd3fc;
    background: rgba(28, 176, 246, 0.16);
    border-color: rgba(28, 176, 246, 0.22);
}

.app-profile-activity-pill--neutral {
    color: #334155;
    background: rgba(226, 232, 240, 0.72);
    border-color: rgba(203, 213, 225, 0.88);
}

.dark .app-profile-activity-pill--neutral {
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.82);
    border-color: rgba(74, 85, 104, 0.62);
}

.app-profile-activity-pill--review {
    color: #7c3aed;
    background: rgba(158, 96, 244, 0.12);
    border-color: rgba(158, 96, 244, 0.18);
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.app-profile-activity-pill--review:hover {
    background: rgba(158, 96, 244, 0.2);
    border-color: rgba(158, 96, 244, 0.28);
}

.dark .app-profile-activity-pill--review {
    color: #d8b4fe;
    background: rgba(158, 96, 244, 0.18);
    border-color: rgba(158, 96, 244, 0.26);
}

.dark .app-profile-activity-pill--review:hover {
    background: rgba(158, 96, 244, 0.24);
    border-color: rgba(158, 96, 244, 0.32);
}

.app-profile-activity-empty {
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    background: rgba(255, 255, 255, 0.56);
}

.dark .app-profile-activity-empty {
    border-color: rgba(74, 85, 104, 0.5);
    background: rgba(15, 23, 42, 0.52);
}

.app-profile-activity-empty-icon {
    display: flex;
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 0.95rem;
    background: linear-gradient(135deg, rgba(88, 204, 2, 0.18), rgba(28, 176, 246, 0.2));
    color: #0f766e;
}

.dark .app-profile-activity-empty-icon {
    color: #7dd3fc;
}

@media (max-width: 640px) {
    .app-profile-hero-top,
    .app-profile-hero-content,
    .app-profile-hero-side,
    .app-profile-heading-copy {
        align-items: center;
        text-align: center;
    }

    .app-profile-subline,
    .app-profile-hero-actions {
        justify-content: center;
    }

    .app-profile-bio-lead {
        width: 100%;
        text-align: left;
    }

    .app-profile-action-button {
        width: 100%;
        justify-content: center;
    }

    .app-profile-activity-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .app-profile-activity-time {
        white-space: normal;
    }
}

@media (min-width: 768px) {
    .app-profile-hero-top {
        grid-template-columns: minmax(10.5rem, 12rem) minmax(0, 1.35fr) minmax(16rem, 18rem);
        gap: 1.75rem;
    }

    .app-profile-hero-identity {
        align-items: flex-start;
        text-align: left;
    }

    .app-profile-hero-top,
    .app-profile-hero-content,
    .app-profile-hero-side,
    .app-profile-heading-copy {
        align-items: flex-start;
        text-align: left;
    }

    .app-profile-hero-side {
        justify-content: space-between;
    }

    .app-profile-subline,
    .app-profile-hero-actions {
        justify-content: flex-start;
    }

    .app-profile-hero-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .app-profile-action-button {
        width: 100%;
    }

    .app-profile-hero-pills--band {
        justify-content: flex-start;
    }
}

.avatar-stack {
    display: flex;
    margin-left: -8px;
}

.avatar-stack img,
.avatar-stack .avatar-placeholder {
    border: 2px solid white;
    border-radius: 50%;
    margin-left: -8px;
}

.dark .avatar-stack img,
.dark .avatar-stack .avatar-placeholder {
    border: 2px solid #1a202c;
}

.add-subject-modal {
    max-width: 500px;
}

.pro-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

.pro-feature {
    border-left: 3px solid #FFD700;
}

.pricing-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.pricing-card.pro {
    border-color: #FFD700;
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.2);
}

.pricing-card:hover {
    transform: translateY(-5px);
}

.pricing-card.pro:hover {
    box-shadow: 0 15px 30px rgba(255, 215, 0, 0.3);
}

.feature-check {
    color: #58cc02;
}

.challenge-card,
.post-card {
    transition: all 0.3s ease;
}

.challenge-card:hover,
.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.dark .challenge-card:hover,
.dark .post-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.search-bar {
    transition: all 0.3s ease;
}

.search-bar:focus {
    box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.3);
}

.app-searchable-select {
    position: relative;
}

.app-searchable-select-button {
    width: 100%;
    min-height: 4.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border: 1px solid var(--app-polish-border);
    border-radius: 1rem;
    background:
        radial-gradient(circle at top right, var(--app-polish-surface-accent), transparent 28%),
        linear-gradient(180deg, var(--app-polish-surface-top), var(--app-polish-surface-bottom));
    color: #2c3e50;
    text-align: left;
    box-shadow: var(--app-polish-shadow-soft);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.app-searchable-select-button:hover,
.app-searchable-select-button--open {
    border-color: var(--app-polish-border-strong);
    box-shadow:
        0 0 0 3px var(--app-polish-active-wash),
        var(--app-polish-shadow-soft);
}

.app-searchable-select-button-content {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.app-searchable-select-button-icon {
    width: 2.35rem;
    height: 2.35rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.85rem;
    background: rgba(88, 204, 2, 0.12);
    color: #46a302;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.app-searchable-select-button-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.app-searchable-select-button-caption {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.app-searchable-select-button-label {
    min-width: 0;
    font-weight: 600;
    line-height: 1.35;
    color: #1f2937;
}

.app-searchable-select-button-label--placeholder {
    color: #6b7280;
    font-weight: 600;
}

.app-searchable-select-button-end {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.app-searchable-select-chevron {
    flex-shrink: 0;
    color: #6b7280;
    transition: transform 0.2s ease, color 0.2s ease;
}

.app-searchable-select-chevron--open {
    transform: rotate(180deg);
    color: #58cc02;
}

.app-searchable-select-menu {
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 0;
    right: 0;
    z-index: 45;
    border: 1px solid var(--app-polish-border);
    border-radius: 1.1rem;
    background:
        radial-gradient(circle at top right, var(--app-polish-surface-accent), transparent 26%),
        linear-gradient(180deg, var(--app-polish-surface-top), var(--app-polish-surface-bottom));
    box-shadow: var(--app-polish-shadow-strong);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.app-searchable-select-search {
    position: relative;
    padding: 0.85rem;
    border-bottom: 1px solid var(--app-polish-border);
    background: rgba(255, 255, 255, 0.38);
}

.app-searchable-select-search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.app-searchable-select-search-input {
    width: 100%;
    border: 1px solid var(--app-polish-border);
    border-radius: 0.9rem;
    background:
        radial-gradient(circle at top right, var(--app-polish-surface-accent), transparent 26%),
        linear-gradient(180deg, var(--app-polish-surface-top), var(--app-polish-surface-bottom));
    padding: 0.8rem 0.95rem 0.8rem 2.65rem;
    color: #1f2937;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.app-searchable-select-search-input:focus {
    border-color: var(--app-polish-border-strong);
    box-shadow: 0 0 0 3px var(--app-polish-active-wash);
}

.app-searchable-select-options {
    max-height: 16rem;
    overflow-y: auto;
    padding: 0.55rem;
}

.app-searchable-select-option {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    padding: 0.85rem 0.95rem;
    border-radius: 0.95rem;
    color: #2c3e50;
    text-align: left;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.app-searchable-select-option:hover {
    background: rgba(88, 204, 2, 0.08);
    color: #244638;
    transform: translateY(-1px);
}

.app-searchable-select-option--selected {
    background: rgba(88, 204, 2, 0.12);
    color: #2f7d1f;
}

.app-searchable-select-option-content {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
}

.app-searchable-select-option-title {
    display: block;
    font-weight: 700;
    line-height: 1.35;
}

.app-searchable-select-option-meta {
    display: block;
    font-size: 0.82rem;
    color: #64748b;
}

.app-searchable-select-option-check {
    min-height: 1.25rem;
    min-width: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.1rem;
}

.app-searchable-select-empty {
    padding: 1rem 0.9rem;
    color: #6b7280;
    text-align: center;
    font-size: 0.95rem;
}

.dark .app-searchable-select-button {
    border-color: var(--app-polish-border);
    background:
        radial-gradient(circle at top right, var(--app-polish-surface-accent), transparent 28%),
        linear-gradient(180deg, var(--app-polish-surface-top), var(--app-polish-surface-bottom));
    color: #e2e8f0;
    box-shadow: var(--app-polish-shadow-soft);
}

.dark .app-searchable-select-button-icon {
    background: rgba(88, 204, 2, 0.14);
    color: #9cf06b;
}

.dark .app-searchable-select-button-caption,
.dark .app-searchable-select-button-label--placeholder,
.dark .app-searchable-select-chevron {
    color: #94a3b8;
}

.dark .app-searchable-select-button-label {
    color: #f8fafc;
}

.dark .app-searchable-select-menu {
    border-color: var(--app-polish-border);
    background:
        radial-gradient(circle at top right, var(--app-polish-surface-accent), transparent 26%),
        linear-gradient(180deg, var(--app-polish-surface-top), var(--app-polish-surface-bottom));
    box-shadow: var(--app-polish-shadow-strong);
}

.dark .app-searchable-select-search {
    border-bottom-color: var(--app-polish-border);
    background: rgba(15, 23, 42, 0.38);
}

.dark .app-searchable-select-search-input {
    border-color: var(--app-polish-border);
    background:
        radial-gradient(circle at top right, var(--app-polish-surface-accent), transparent 26%),
        linear-gradient(180deg, var(--app-polish-surface-top), var(--app-polish-surface-bottom));
    color: #e2e8f0;
}

.dark .app-searchable-select-option {
    color: #e2e8f0;
}

.dark .app-searchable-select-option-meta {
    color: #94a3b8;
}

.dark .app-searchable-select-option:hover {
    background: rgba(88, 204, 2, 0.14);
    color: #f0fff4;
}

.dark .app-searchable-select-option--selected {
    background: rgba(88, 204, 2, 0.18);
    color: #9cf06b;
}

.dark .app-searchable-select-empty {
    color: #a0aec0;
}

.app-date-picker {
    position: relative;
}

.app-floating-control {
    position: relative;
    z-index: 1;
}

.app-floating-control:focus-within {
    z-index: 12;
}

.app-onboarding-profile-fields {
    position: relative;
    z-index: 1;
}

.app-date-picker-backdrop {
    display: none;
}

.app-date-picker-menu {
    width: min(100%, 21rem);
    padding: 0.9rem;
    max-width: min(100%, 21rem);
    max-height: min(26rem, calc(100dvh - 2rem));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.app-date-picker--inline .app-date-picker-menu {
    width: 100%;
    max-width: none;
}

.app-date-picker-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--app-polish-border);
}

.app-date-picker-nav-group {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.app-date-picker-nav-button {
    width: 2.1rem;
    height: 2.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.85rem;
    border: 1px solid rgba(191, 219, 205, 0.72);
    background: rgba(255, 255, 255, 0.72);
    color: #2c3e50;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.app-date-picker-nav-button:hover:not(:disabled) {
    background: rgba(88, 204, 2, 0.1);
    border-color: rgba(88, 204, 2, 0.34);
    color: #2f7d1f;
    transform: translateY(-1px);
}

.app-date-picker-nav-button:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.app-date-picker-toolbar-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.app-date-picker-select {
    min-width: 0;
    appearance: none;
    cursor: pointer;
    border: 1px solid var(--app-polish-border);
    border-radius: 0.9rem;
    background:
        radial-gradient(circle at top right, var(--app-polish-surface-accent), transparent 26%),
        linear-gradient(180deg, var(--app-polish-surface-top), var(--app-polish-surface-bottom));
    padding: 0.62rem 0.8rem;
    color: #142132;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.2;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.app-date-picker-select:focus {
    border-color: var(--app-polish-border-strong);
    box-shadow: 0 0 0 3px var(--app-polish-active-wash);
}

.app-date-picker-select--month {
    flex: 1 1 auto;
}

.app-date-picker-select--year {
    flex: 0 0 6.5rem;
    max-width: 6.5rem;
}

.app-date-picker-weekdays,
.app-date-picker-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.35rem;
}

.app-date-picker-day-slot {
    display: flex;
}

.app-date-picker-weekdays {
    margin-bottom: 0.45rem;
}

.app-date-picker-weekday {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.app-date-picker-day {
    width: 100%;
    min-height: 2.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.9rem;
    border: 1px solid transparent;
    background: transparent;
    color: #1f2937;
    font-weight: 700;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.app-date-picker-day:hover:not(:disabled):not(.app-date-picker-day--selected) {
    background: rgba(88, 204, 2, 0.08);
    color: #2f7d1f;
    transform: translateY(-1px);
}

.app-date-picker-day--today {
    border-color: rgba(88, 204, 2, 0.36);
    color: #2f7d1f;
}

.app-date-picker-day--selected {
    border-color: rgba(88, 204, 2, 0.95);
    background: linear-gradient(135deg, rgba(88, 204, 2, 0.95), rgba(70, 163, 2, 0.96));
    color: #fff;
    box-shadow: 0 12px 24px rgba(88, 204, 2, 0.2);
}

.app-date-picker-day--disabled {
    color: #cbd5e1;
    cursor: not-allowed;
}

.app-date-picker-day--blank {
    visibility: hidden;
    pointer-events: none;
}

.app-date-picker-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.8rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--app-polish-border);
}

.app-date-picker-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.85rem;
    padding: 0.55rem 0.8rem;
    font-size: 0.84rem;
    font-weight: 700;
    color: #2f7d1f;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.app-date-picker-clear:hover {
    background: rgba(88, 204, 2, 0.08);
}

.dark .app-date-picker-toolbar {
    border-bottom-color: var(--app-polish-border);
}

.dark .app-date-picker-nav-button {
    border-color: rgba(74, 85, 104, 0.48);
    background: rgba(15, 23, 42, 0.78);
    color: #e2e8f0;
}

.dark .app-date-picker-nav-button:hover:not(:disabled) {
    background: rgba(88, 204, 2, 0.15);
    border-color: rgba(88, 204, 2, 0.32);
    color: #c9ffb5;
}

.dark .app-date-picker-select {
    border-color: var(--app-polish-border);
    background:
        radial-gradient(circle at top right, var(--app-polish-surface-accent), transparent 26%),
        linear-gradient(180deg, var(--app-polish-surface-top), var(--app-polish-surface-bottom));
    color: #f8fafc;
}

.dark .app-date-picker-select:focus {
    box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.16);
}

.dark .app-date-picker-weekday {
    color: #94a3b8;
}

.dark .app-date-picker-day {
    color: #e2e8f0;
}

.dark .app-date-picker-day:hover:not(:disabled):not(.app-date-picker-day--selected) {
    background: rgba(88, 204, 2, 0.14);
    color: #f0fff4;
}

.dark .app-date-picker-day--today {
    border-color: rgba(88, 204, 2, 0.42);
    color: #9cf06b;
}

.dark .app-date-picker-day--disabled {
    color: #475569;
}

.dark .app-date-picker-footer {
    border-top-color: var(--app-polish-border);
}

.dark .app-date-picker-clear {
    color: #9cf06b;
}

.dark .app-date-picker-clear:hover {
    background: rgba(88, 204, 2, 0.12);
}

.follow-btn {
    transition: all 0.2s ease;
}

.follow-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.duel-challenge {
    animation: duelPulse 2s infinite;
}

@keyframes duelPulse {
    0% { box-shadow: 0 0 0 0 rgba(88, 204, 2, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(88, 204, 2, 0); }
    100% { box-shadow: 0 0 0 0 rgba(88, 204, 2, 0); }
}

.flag {
    width: 24px;
    height: 16px;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    overflow: hidden;
}

.flag-icon {
    display: block;
    width: 100%;
    height: 100%;
}

.flag-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: rgba(148, 163, 184, 0.42);
}

.dark .flag-placeholder {
    background: rgba(71, 85, 105, 0.9);
}

.skip-indicator {
    color: #94a3b8;
    font-size: 0.875rem;
}

.subject-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.stats-card {
    background: linear-gradient(135deg, rgba(88, 204, 2, 0.05) 0%, rgba(28, 176, 246, 0.05) 100%);
    border: 1px solid rgba(88, 204, 2, 0.2);
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.notification.success {
    background: linear-gradient(135deg, #58cc02, #46a302);
}

.notification.error {
    background: linear-gradient(135deg, #ff4b4b, #d32f2f);
}

.notification.info {
    background: linear-gradient(135deg, #1cb0f6, #158ecf);
}

/* Shared app shell */
:root {
    --app-content-width: 1180px;
    --app-header-height: 78px;
    --app-nav-clearance: 5rem;
}

body.app-shell {
    min-height: 100vh;
    min-height: 100dvh;
    background:
        radial-gradient(circle at top left, rgba(88, 204, 2, 0.16), transparent 30%),
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.14), transparent 28%),
        linear-gradient(180deg, #fafcf8 0%, #edf5ef 46%, #e7eef0 100%);
    color: #1f2937;
    position: relative;
    padding-bottom: calc(var(--app-nav-clearance) + env(safe-area-inset-bottom, 0px));
    scroll-padding-bottom: calc(var(--app-nav-clearance) + env(safe-area-inset-bottom, 0px));
}

body.app-shell.app-shell--navless {
    padding-bottom: 0;
    scroll-padding-bottom: 0;
}

body.dark.app-shell {
    background:
        radial-gradient(circle at top left, rgba(88, 204, 2, 0.12), transparent 28%),
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.1), transparent 24%),
        linear-gradient(180deg, #0a1220 0%, #0d1626 48%, #09111c 100%);
    color: #e2e8f0;
}

body.app-shell::before,
body.app-shell::after {
    content: '';
    position: fixed;
    inset: auto;
    z-index: -1;
    border-radius: 9999px;
    filter: blur(18px);
    pointer-events: none;
}

body.app-shell::before {
    width: 20rem;
    height: 20rem;
    top: 5rem;
    right: -5rem;
    background: rgba(28, 176, 246, 0.15);
}

body.app-shell::after {
    width: 17rem;
    height: 17rem;
    bottom: 8rem;
    left: -4rem;
    background: rgba(88, 204, 2, 0.12);
}

.app-shell-header {
    min-height: var(--app-header-height);
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(241, 250, 244, 0.78)) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.dark .app-shell-header {
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(12, 35, 41, 0.9)) !important;
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.4);
}

.app-icon-button,
.app-stat-pill {
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.app-icon-button {
    border: none;
}

.app-stat-pill {
    border: none;
}

.app-panel:not(.bg-gradient-to-r),
.auth-card,
.subject-card,
.challenge-card,
.post-card,
.leaderboard-card:not(.app-leaderboard-entry),
.stats-card {
    position: relative;
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(241, 250, 244, 0.8)) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.dark .app-panel:not(.bg-gradient-to-r),
.dark .auth-card,
.dark .subject-card,
.dark .challenge-card,
.dark .post-card,
.dark .leaderboard-card:not(.app-leaderboard-entry),
.dark .stats-card {
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(12, 35, 41, 0.92)) !important;
}

.app-panel:not(.bg-gradient-to-r)::before,
.auth-card::before,
.subject-card::before,
.challenge-card::before,
.post-card::before,
.leaderboard-card:not(.app-leaderboard-entry)::before,
.stats-card::before {
    content: none;
}

.app-leaderboard-entry,
.dark .app-leaderboard-entry {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.challenge-card,
.post-card,
.stats-card {
    transition: all 0.3s ease;
}

.challenge-card:hover,
.post-card:hover,
.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.dark .challenge-card:hover,
.dark .post-card:hover,
.dark .stats-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.app-page-hero {
    padding: 0;
}

.app-page-shell {
    box-sizing: border-box;
    width: min(100%, var(--app-content-width));
    min-height: calc(100vh - var(--app-header-height) - var(--app-nav-clearance));
    min-height: calc(100dvh - var(--app-header-height) - var(--app-nav-clearance));
    padding-top: 1rem;
    padding-bottom: calc(var(--app-nav-clearance) + 1rem + env(safe-area-inset-bottom, 0px));
    scroll-margin-bottom: calc(var(--app-nav-clearance) + env(safe-area-inset-bottom, 0px));
}

.app-shell-nav {
    width: 100%;
    left: 0;
    transform: none;
    bottom: 0;
    min-height: 76px;
    padding: 0;
    border-radius: 0;
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(241, 250, 244, 0.8)) !important;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.dark .app-shell-nav {
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(12, 35, 41, 0.92)) !important;
    box-shadow: 0 -4px 14px rgba(0,0,0,0.24);
}

.app-shell-nav-link {
    flex: 1 1 0;
    min-width: 0;
    border-radius: 0;
    padding-inline: 0.5rem;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.app-shell-nav-link:hover {
    transform: none;
}

.app-shell-nav-link i {
    transition: none;
}

.app-shell-nav-link:hover i {
    transform: none;
}

.app-shell-nav-link.text-ziva-green {
    background: transparent;
    box-shadow: none;
}

.dark .app-shell-nav-link.text-ziva-green {
    background: transparent;
    box-shadow: none;
}

.app-shell-nav-link span {
    font-size: 0.78rem;
    font-weight: 700;
}

.app-modal-backdrop {
    background: rgba(0,0,0,0.5) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.app-modal-panel {
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    border-radius: 1rem !important;
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(241, 250, 244, 0.8)) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.dark .app-modal-panel {
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(12, 35, 41, 0.92)) !important;
}

.app-modal-panel::before {
    content: none;
}

.app-modal-panel--sm {
    max-width: 32rem;
}

.app-modal-panel--md {
    max-width: 42rem;
}

.app-modal-panel--lg {
    max-width: 54rem;
}

.app-modal-panel--xl {
    max-width: 64rem;
}

.app-modal-content-stack > * + * {
    margin-top: 1rem;
}

.app-modal-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.dark .app-modal-actions {
    border-top-color: rgba(148, 163, 184, 0.12);
}

input:not([type='checkbox']):not([type='radio']):not([type='file']),
select,
textarea {
    border-radius: 0.75rem;
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(241, 250, 244, 0.8)) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dark input:not([type='checkbox']):not([type='radio']):not([type='file']),
.dark select,
.dark textarea {
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(12, 35, 41, 0.92)) !important;
}

input:not([type='checkbox']):not([type='radio']):not([type='file']):focus,
select:focus,
textarea:focus {
    border-color: rgba(88, 204, 2, 0.55) !important;
    box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.18) !important;
    transform: none;
}

button {
    transition: background-color 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

.bg-ziva-gray {
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(241, 250, 244, 0.8)) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.dark .dark\:bg-ziva-dark-card {
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(12, 35, 41, 0.92)) !important;
}

.dark .app-leaderboard-entry.dark\:bg-ziva-dark-card {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Final polish */
body.app-shell {
    --app-polish-surface-top: rgba(255, 255, 255, 0.9);
    --app-polish-surface-bottom: rgba(245, 250, 247, 0.86);
    --app-polish-surface-accent: rgba(28, 176, 246, 0.12);
    --app-polish-border: rgba(148, 163, 184, 0.18);
    --app-polish-border-strong: rgba(88, 204, 2, 0.34);
    --app-polish-shadow-soft: 0 14px 34px rgba(15, 23, 42, 0.08);
    --app-polish-shadow-medium: 0 20px 46px rgba(15, 23, 42, 0.12);
    --app-polish-shadow-strong: 0 32px 72px rgba(15, 23, 42, 0.16);
    --app-polish-nav-hover: rgba(148, 163, 184, 0.1);
    --app-polish-active-wash: rgba(88, 204, 2, 0.12);
    background:
        radial-gradient(circle at top left, rgba(88, 204, 2, 0.14), transparent 34%),
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.13), transparent 30%),
        linear-gradient(180deg, #f8fcf7 0%, #eef7f1 48%, #e9f1f4 100%);
}

body.dark.app-shell {
    --app-polish-surface-top: rgba(15, 23, 42, 0.9);
    --app-polish-surface-bottom: rgba(12, 35, 41, 0.92);
    --app-polish-surface-accent: rgba(28, 176, 246, 0.16);
    --app-polish-border: rgba(74, 85, 104, 0.62);
    --app-polish-border-strong: rgba(88, 204, 2, 0.45);
    --app-polish-shadow-soft: 0 20px 44px rgba(2, 6, 23, 0.34);
    --app-polish-shadow-medium: 0 28px 56px rgba(2, 6, 23, 0.4);
    --app-polish-shadow-strong: 0 36px 72px rgba(2, 6, 23, 0.46);
    --app-polish-nav-hover: rgba(148, 163, 184, 0.12);
    --app-polish-active-wash: rgba(88, 204, 2, 0.18);
    background:
        radial-gradient(circle at top left, rgba(88, 204, 2, 0.1), transparent 30%),
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.09), transparent 25%),
        linear-gradient(180deg, #09121e 0%, #0c1624 48%, #08111b 100%);
}

body.app-shell::before,
body.app-shell::after {
    filter: blur(54px);
}

body.app-shell::before {
    width: 23rem;
    height: 23rem;
}

body.app-shell::after {
    width: 19rem;
    height: 19rem;
}

.app-shell-header,
.app-shell-nav,
.app-panel:not(.bg-gradient-to-r),
.auth-card,
.subject-card,
.challenge-card,
.post-card,
.leaderboard-card:not(.app-leaderboard-entry),
.stats-card,
.pricing-card:not(.pro),
.app-modal-panel,
.dropdown-content {
    border-color: var(--app-polish-border) !important;
    background:
        radial-gradient(circle at top right, var(--app-polish-surface-accent), transparent 28%),
        linear-gradient(180deg, var(--app-polish-surface-top), var(--app-polish-surface-bottom)) !important;
}

.app-panel:not(.bg-gradient-to-r),
.auth-card,
.subject-card,
.challenge-card,
.post-card,
.leaderboard-card:not(.app-leaderboard-entry),
.stats-card,
.pricing-card:not(.pro),
.dropdown-content {
    box-shadow: var(--app-polish-shadow-soft) !important;
}

.app-shell-header {
    box-shadow: var(--app-polish-shadow-soft) !important;
}

.app-shell-nav {
    box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.12) !important;
}

.dark .app-shell-nav {
    box-shadow: 0 -12px 30px rgba(2, 6, 23, 0.34) !important;
}

.app-modal-backdrop {
    background: rgba(15, 23, 42, 0.42) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.dark .app-modal-backdrop {
    background: rgba(2, 6, 23, 0.56) !important;
}

.app-modal-panel {
    box-shadow: var(--app-polish-shadow-strong) !important;
}

.subject-card:hover,
.challenge-card:hover,
.post-card:hover,
.leaderboard-card:not(.app-leaderboard-entry):hover,
.stats-card:hover,
.pricing-card:not(.pro):hover {
    border-color: var(--app-polish-border-strong) !important;
    box-shadow: var(--app-polish-shadow-medium) !important;
}

.app-shell-nav-link {
    border-radius: 1rem;
    margin-block: 0.3rem;
    min-height: 64px;
}

.app-shell-nav-link:hover {
    background: transparent;
}

.app-shell-nav-link.text-ziva-green {
    background: transparent;
    box-shadow: none;
}

.dark .app-shell-nav-link.text-ziva-green {
    background: transparent;
    box-shadow: none;
}

.app-icon-button,
.bg-ziva-gray,
input:not([type='checkbox']):not([type='radio']):not([type='file']),
select,
textarea,
.search-bar {
    border: 1px solid var(--app-polish-border) !important;
    background:
        radial-gradient(circle at top right, var(--app-polish-surface-accent), transparent 28%),
        linear-gradient(180deg, var(--app-polish-surface-top), var(--app-polish-surface-bottom)) !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.dark .app-icon-button,
.dark .dark\:bg-ziva-dark-card,
.dark input:not([type='checkbox']):not([type='radio']):not([type='file']),
.dark select,
.dark textarea,
.dark .search-bar {
    border-color: var(--app-polish-border) !important;
    background:
        radial-gradient(circle at top right, var(--app-polish-surface-accent), transparent 28%),
        linear-gradient(180deg, var(--app-polish-surface-top), var(--app-polish-surface-bottom)) !important;
}

input::placeholder,
textarea::placeholder {
    color: #64748b;
}

.dark input::placeholder,
.dark textarea::placeholder {
    color: #94a3b8;
}

.app-icon-button:hover,
.search-bar:focus {
    border-color: var(--app-polish-border-strong) !important;
    box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.14), 0 12px 28px rgba(15, 23, 42, 0.08) !important;
}

.dark .app-icon-button:hover,
.dark .search-bar:focus {
    box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.18), 0 18px 36px rgba(2, 6, 23, 0.28) !important;
}

.notification {
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

button:hover:not(:disabled) {
    transform: none;
}

button:active:not(:disabled) {
    transform: none;
}

.search-bar {
    border-radius: 1rem;
    box-shadow: none;
}

.dark .search-bar {
    box-shadow: none;
}

.notification {
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

@media (max-width: 767px) {
    :root {
        --app-header-height: 74px;
        --app-nav-clearance: 5.25rem;
    }

    .app-page-shell {
        padding-top: 0.85rem;
        padding-bottom: calc(var(--app-nav-clearance) + 1rem + env(safe-area-inset-bottom, 0px));
    }

    .app-shell-nav {
        min-height: 80px;
    }

    .app-modal-backdrop {
        align-items: center !important;
    }

    .app-modal-panel {
        border-bottom-left-radius: 1rem !important;
        border-bottom-right-radius: 1rem !important;
        max-height: 90vh;
    }

    .app-modal-panel--lg,
    .app-modal-panel--xl {
        position: fixed;
        inset: 0;
        width: 100vw !important;
        height: 100dvh !important;
        max-width: none !important;
        max-height: 100dvh !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    .app-notification-panel {
        right: 0;
        width: min(22rem, calc(100vw - 2rem));
        max-height: calc(100vh - 6rem);
    }
}

/* Refinement pass */
body.app-shell {
    --app-polish-surface-top: rgba(255, 255, 255, 0.94);
    --app-polish-surface-bottom: rgba(247, 252, 249, 0.9);
    --app-polish-surface-accent: rgba(28, 176, 246, 0.11);
    --app-polish-border: rgba(148, 163, 184, 0.16);
    --app-polish-border-strong: rgba(88, 204, 2, 0.28);
    --app-polish-shadow-soft: 0 16px 36px rgba(15, 23, 42, 0.08), 0 3px 10px rgba(15, 23, 42, 0.04);
    --app-polish-shadow-medium: 0 24px 56px rgba(15, 23, 42, 0.12), 0 8px 18px rgba(15, 23, 42, 0.05);
    --app-polish-shadow-strong: 0 36px 80px rgba(15, 23, 42, 0.18), 0 12px 28px rgba(15, 23, 42, 0.08);
    background:
        radial-gradient(circle at top left, rgba(88, 204, 2, 0.16), transparent 35%),
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.15), transparent 30%),
        linear-gradient(180deg, #fbfdf9 0%, #eff7f2 47%, #e8f1f5 100%);
}

body.dark.app-shell {
    --app-polish-surface-top: rgba(15, 23, 42, 0.9);
    --app-polish-surface-bottom: rgba(12, 35, 41, 0.93);
    --app-polish-surface-accent: rgba(28, 176, 246, 0.16);
    --app-polish-border: rgba(74, 85, 104, 0.6);
    --app-polish-border-strong: rgba(88, 204, 2, 0.42);
    --app-polish-shadow-soft: 0 22px 46px rgba(2, 6, 23, 0.34);
    --app-polish-shadow-medium: 0 30px 62px rgba(2, 6, 23, 0.4);
    --app-polish-shadow-strong: 0 40px 84px rgba(2, 6, 23, 0.48);
}

body.app-shell::before {
    opacity: 0.95;
}

body.app-shell::after {
    opacity: 0.9;
}

body.dark.app-shell::before {
    opacity: 0.5;
}

body.dark.app-shell::after {
    opacity: 0.42;
}

body.app-shell:not(.dark) .text-gray-600 {
    color: #475569 !important;
}

body.app-shell:not(.dark) .text-gray-500 {
    color: #64748b !important;
}

body.app-shell:not(.dark) .border-gray-100 {
    border-color: rgba(226, 232, 240, 0.9) !important;
}

body.app-shell:not(.dark) .border-gray-200 {
    border-color: rgba(203, 213, 225, 0.92) !important;
}

.app-shell-header {
    border-bottom-color: rgba(226, 232, 240, 0.76) !important;
}

.dark .app-shell-header {
    border-bottom-color: rgba(74, 85, 104, 0.56) !important;
}

.app-shell-nav {
    border-top-color: rgba(226, 232, 240, 0.78) !important;
}

.dark .app-shell-nav {
    border-top-color: rgba(74, 85, 104, 0.52) !important;
}

.app-panel:not(.bg-gradient-to-r),
.auth-card,
.subject-card,
.challenge-card,
.post-card,
.leaderboard-card:not(.app-leaderboard-entry),
.stats-card,
.pricing-card:not(.pro),
.dropdown-content,
.app-modal-panel {
    border-width: 1px;
}

.app-panel-hero,
.app-auth-panel {
    box-shadow: var(--app-polish-shadow-medium) !important;
}

.app-panel-hero {
    border-color: rgba(88, 204, 2, 0.16) !important;
}

.app-page-hero h1,
.app-page-hero h2 {
    font-size: clamp(1.95rem, 1.25rem + 2vw, 3rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
}

.app-page-hero p {
    max-width: 42rem;
    margin-inline: auto;
    font-size: var(--app-font-size-hero-copy);
}

.app-stat-pill {
    border: 1px solid rgba(255, 255, 255, 0.46);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.dark .app-stat-pill {
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 12px 26px rgba(2, 6, 23, 0.24);
}

.app-icon-button {
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.app-icon-button i {
    transition: transform 0.18s ease;
}

.app-icon-button:hover i {
    transform: rotate(-10deg);
}

.dark-toggle:hover i {
    transform: none;
}

.app-shell-nav-link {
    min-height: 66px;
    font-weight: 700;
}

.app-shell-nav-link.text-ziva-green {
    color: #2f8d11 !important;
}

.dark .app-shell-nav-link.text-ziva-green {
    color: #6fe042 !important;
}

.app-shell-nav-link i {
    opacity: 0.94;
}

.app-shell-nav-link span {
    letter-spacing: 0.01em;
}

.app-header-tools {
    position: relative;
}

.app-notification-button {
    position: relative;
}

.app-notification-pill {
    gap: 0.55rem;
    min-height: 2.25rem;
    border-color: rgba(148, 163, 184, 0.16);
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.08), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(244, 248, 246, 0.84));
}

.dark .app-notification-pill {
    border-color: rgba(74, 85, 104, 0.34);
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(12, 35, 41, 0.84));
}

.app-notification-pill-glyph {
    width: 1.55rem;
    height: 1.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.56);
}

.dark .app-notification-pill-glyph {
    background: rgba(255, 255, 255, 0.06);
}

.app-notification-pill-icon {
    color: #334155;
}

.app-notification-pill-count {
    color: #334155;
    min-width: 0.72rem;
    font-size: 0.84rem;
    font-variant-numeric: tabular-nums;
}

.dark .app-notification-pill-icon,
.dark .app-notification-pill-count {
    color: #e2e8f0;
}

.app-notification-button--active {
    border-color: rgba(88, 204, 2, 0.28) !important;
    background:
        radial-gradient(circle at top right, rgba(88, 204, 2, 0.12), transparent 30%),
        linear-gradient(180deg, rgba(240, 253, 244, 0.96), rgba(232, 249, 238, 0.94)) !important;
    box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.12), 0 12px 28px rgba(15, 23, 42, 0.08) !important;
}

.dark .app-notification-button--active {
    background:
        radial-gradient(circle at top right, rgba(88, 204, 2, 0.16), transparent 30%),
        linear-gradient(180deg, rgba(18, 40, 28, 0.92), rgba(14, 34, 24, 0.9)) !important;
    box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.16), 0 18px 36px rgba(2, 6, 23, 0.28) !important;
}

.app-notification-button--active .app-notification-pill-icon,
.app-notification-button--active .app-notification-pill-count {
    color: #2f7d1f;
}

.app-notification-button--active .app-notification-pill-glyph {
    background: rgba(88, 204, 2, 0.12);
}

.dark .app-notification-button--active .app-notification-pill-icon,
.dark .app-notification-button--active .app-notification-pill-count {
    color: #b7f27d;
}

.dark .app-notification-button--active .app-notification-pill-glyph {
    background: rgba(88, 204, 2, 0.16);
}

.app-notification-panel {
    position: absolute;
    top: calc(100% + 0.8rem);
    right: 0;
    width: min(24rem, calc(100vw - 2rem));
    max-height: min(34rem, calc(100vh - 7rem));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--app-polish-border);
    border-radius: 1.3rem;
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.1), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 247, 0.97));
    box-shadow: var(--app-polish-shadow-medium);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 70;
}

.dark .app-notification-panel {
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(9, 18, 30, 0.98), rgba(12, 22, 36, 0.97));
}

.app-notification-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1rem 0.85rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.dark .app-notification-panel-head {
    border-bottom-color: rgba(74, 85, 104, 0.32);
}

.app-notification-panel-kicker {
    margin: 0 0 0.2rem;
    color: #2f7d1f;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dark .app-notification-panel-kicker {
    color: #b7f27d;
}

.app-notification-panel-title {
    margin: 0;
    color: #0f172a;
    font-size: clamp(0.98rem, 0.18vw + 0.94rem, 1.08rem);
    font-weight: 800;
}

.dark .app-notification-panel-title {
    color: #f8fafc;
}

.app-notification-panel-summary {
    margin: 0.22rem 0 0;
    color: #64748b;
    font-size: clamp(0.75rem, 0.08vw + 0.73rem, 0.8rem);
    font-weight: 700;
}

.dark .app-notification-panel-summary {
    color: #94a3b8;
}

.app-notification-panel-close {
    width: 2.25rem;
    height: 2.25rem;
}

.app-notification-inbox-summary {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: calc(100% - 1.5rem);
    margin: 0.85rem 0.75rem 0;
    padding: 0.85rem 0.95rem;
    border-radius: 1rem;
    border: 1px solid rgba(88, 204, 2, 0.18);
    background: rgba(88, 204, 2, 0.08);
    text-align: left;
}

.dark .app-notification-inbox-summary {
    border-color: rgba(88, 204, 2, 0.26);
    background: rgba(88, 204, 2, 0.14);
}

.app-notification-inbox-summary-icon {
    width: 2.4rem;
    height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    color: #2f7d1f;
}

.dark .app-notification-inbox-summary-icon {
    background: rgba(15, 23, 42, 0.46);
    color: #b7f27d;
}

.app-notification-inbox-summary-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.app-notification-inbox-summary-title {
    color: #0f172a;
    font-size: 0.85rem;
    font-weight: 800;
}

.dark .app-notification-inbox-summary-title {
    color: #f8fafc;
}

.app-notification-inbox-summary-text {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 700;
}

.dark .app-notification-inbox-summary-text {
    color: #94a3b8;
}

.app-notification-panel-body {
    min-height: 0;
    overflow-y: auto;
    padding: 0.75rem;
}

.app-notification-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem 1rem;
    color: #64748b;
    text-align: center;
}

.dark .app-notification-empty-state {
    color: #94a3b8;
}

.app-notification-empty-state i {
    font-size: 1.2rem;
}

.app-notification-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.app-notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    position: relative;
    padding: 0.9rem;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(255, 255, 255, 0.7);
}

.dark .app-notification-item {
    border-color: rgba(74, 85, 104, 0.3);
    background: rgba(15, 23, 42, 0.62);
}

.app-notification-item--unread {
    border-color: rgba(88, 204, 2, 0.22);
    background: rgba(88, 204, 2, 0.12);
}

.dark .app-notification-item--unread {
    border-color: rgba(88, 204, 2, 0.26);
    background: rgba(88, 204, 2, 0.16);
}

.app-notification-item-marker {
    position: absolute;
    top: 0.9rem;
    left: 0.45rem;
    width: 0.35rem;
    height: calc(100% - 1.8rem);
    border-radius: 999px;
    background: transparent;
}

.app-notification-item--unread .app-notification-item-marker {
    background: linear-gradient(180deg, #58cc02, #2f8d11);
}

.app-notification-item-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    object-fit: cover;
    flex-shrink: 0;
}

.app-notification-item-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 999px;
    background: rgba(28, 176, 246, 0.1);
    color: #136b96;
}

.dark .app-notification-item-icon {
    background: rgba(28, 176, 246, 0.16);
    color: #93c5fd;
}

.app-notification-item-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.app-notification-item-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.18rem;
}

.app-notification-item-title {
    margin: 0;
    color: #0f172a;
    font-size: 0.84rem;
    font-weight: 800;
}

.dark .app-notification-item-title {
    color: #f8fafc;
}

.app-notification-item-time {
    flex-shrink: 0;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 700;
}

.dark .app-notification-item-time {
    color: #94a3b8;
}

.app-notification-item-meta {
    margin-bottom: 0.35rem;
}

.app-notification-item-kind {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.22rem 0.5rem;
    background: rgba(148, 163, 184, 0.12);
    color: #475569;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
}

.dark .app-notification-item-kind {
    background: rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
}

.app-notification-item-text {
    margin: 0;
    color: #475569;
    font-size: 0.78rem;
    line-height: 1.45;
}

.dark .app-notification-item-text {
    color: #cbd5e1;
}

input:not([type='checkbox']):not([type='radio']):not([type='file']),
select,
textarea,
.search-bar {
    color: #1f2937;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 8px 22px rgba(15, 23, 42, 0.05);
}

.dark input:not([type='checkbox']):not([type='radio']):not([type='file']),
.dark select,
.dark textarea,
.dark .search-bar {
    color: #e2e8f0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 16px 32px rgba(2, 6, 23, 0.24);
}

input::placeholder,
textarea::placeholder {
    color: #6b7280;
}

.app-modal-panel {
    border-color: rgba(226, 232, 240, 0.86) !important;
}

.dark .app-modal-panel {
    border-color: rgba(74, 85, 104, 0.62) !important;
}

.app-modal-panel > .p-6,
.app-modal-panel > .p-8 {
    position: relative;
}

.app-modal-panel > .p-6 > .flex:first-child,
.app-modal-panel > .p-8 > .flex:first-child {
    margin-bottom: 1.25rem;
}

.dropdown-content {
    overflow: hidden;
}

.dropdown-content button {
    position: relative;
}

.dropdown-content button + button {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.dark .dropdown-content button + button {
    border-top-color: rgba(148, 163, 184, 0.1);
}

button[class*='bg-gradient-to-r']:not([class*='bg-ziva-gray']),
button[class*='bg-ziva-blue'],
button[class*='bg-ziva-purple'],
button[class*='bg-ziva-green']:not([class*='bg-opacity']),
button[class*='bg-ziva-red'],
button[class*='from-pro-gold'] {
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

.dark button[class*='bg-gradient-to-r']:not([class*='bg-ziva-gray']),
.dark button[class*='bg-ziva-blue'],
.dark button[class*='bg-ziva-purple'],
.dark button[class*='bg-ziva-green']:not([class*='bg-opacity']),
.dark button[class*='bg-ziva-red'],
.dark button[class*='from-pro-gold'] {
    box-shadow: 0 18px 34px rgba(2, 6, 23, 0.28);
}

@media (max-width: 767px) {
    .app-shell-nav-link {
        min-height: 62px;
    }

    .app-stat-pill {
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    }
}

/* Shared consistency layer */
.app-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.app-section-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.app-section-title {
    margin: 0;
    font-size: var(--app-font-size-title-sm);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #1f2937;
}

.dark .app-section-title {
    color: #e2e8f0;
}

.app-section-description {
    margin-top: 0.35rem;
    font-size: var(--app-font-size-copy);
    line-height: 1.55;
    color: #64748b;
}

.dark .app-section-description {
    color: #94a3b8;
}

.app-panel-title {
    margin: 0;
    font-size: var(--app-font-size-title-md);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #1f2937;
}

.dark .app-panel-title {
    color: #e2e8f0;
}

.app-panel-subtitle {
    margin-top: 0.35rem;
    font-size: var(--app-font-size-copy);
    line-height: 1.55;
    color: #64748b;
}

.dark .app-panel-subtitle {
    color: #94a3b8;
}

.app-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.app-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    color: #64748b;
    transition: color 0.18s ease, background-color 0.18s ease;
}

.app-modal-close:hover {
    background: rgba(148, 163, 184, 0.12);
    color: #1f2937;
}

.dark .app-modal-close {
    color: #94a3b8;
}

.dark .app-modal-close:hover {
    background: rgba(148, 163, 184, 0.12);
    color: #e2e8f0;
}

.app-field-label {
    display: block;
    margin-bottom: 0.55rem;
    font-size: 0.92rem;
    font-weight: 800;
    color: #334155;
}

.dark .app-field-label {
    color: #e2e8f0;
}

.app-field-help {
    margin-top: 0.55rem;
    font-size: 0.84rem;
    line-height: 1.45;
    color: #64748b;
}

.dark .app-field-help {
    color: #94a3b8;
}

.app-input {
    width: 100%;
    min-height: 3rem;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    border: 1px solid var(--app-polish-border);
    background:
        radial-gradient(circle at top right, var(--app-polish-surface-accent), transparent 28%),
        linear-gradient(180deg, var(--app-polish-surface-top), var(--app-polish-surface-bottom));
    color: #1f2937;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 8px 22px rgba(15, 23, 42, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.app-input::placeholder {
    color: #6b7280;
}

.app-input:focus {
    outline: none;
    border-color: var(--app-polish-border-strong);
    box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.16), 0 12px 28px rgba(15, 23, 42, 0.08);
}

.dark .app-input {
    color: #e2e8f0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 16px 32px rgba(2, 6, 23, 0.24);
}

.dark .app-input::placeholder {
    color: #94a3b8;
}

.dark .app-input:focus {
    box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.2), 0 18px 36px rgba(2, 6, 23, 0.28);
}

.app-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.85rem;
    padding: 0.72rem 1rem;
    border-radius: 1rem;
    border: 1px solid transparent;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.app-button:disabled {
    cursor: not-allowed;
    opacity: 0.56;
    box-shadow: none !important;
}

.app-button--block {
    width: 100%;
}

.app-button--sm {
    min-height: 2.3rem;
    padding: 0.48rem 0.8rem;
    border-radius: 0.85rem;
    font-size: 0.84rem;
}

.app-button--primary {
    color: #ffffff;
    background: linear-gradient(135deg, #58cc02, #46a302);
    box-shadow: 0 14px 28px rgba(88, 204, 2, 0.2);
}

.app-button--primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #46a302, #3e9002);
}

.app-button--secondary {
    color: #334155;
    border-color: var(--app-polish-border);
    background:
        radial-gradient(circle at top right, var(--app-polish-surface-accent), transparent 28%),
        linear-gradient(180deg, var(--app-polish-surface-top), var(--app-polish-surface-bottom));
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

.app-button--secondary:hover:not(:disabled) {
    border-color: var(--app-polish-border-strong);
    box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.12);
}

.dark .app-button--secondary {
    color: #e2e8f0;
}

.app-button--outline {
    color: #2f8d11;
    border-color: rgba(88, 204, 2, 0.38);
    background: transparent;
}

.app-button--outline:hover:not(:disabled) {
    border-color: rgba(88, 204, 2, 0.62);
    box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.12);
}

.dark .app-button--outline {
    color: #84f04b;
    border-color: rgba(88, 204, 2, 0.42);
}

.app-button--purple {
    color: #ffffff;
    background: linear-gradient(135deg, #9e60f4, #8444df);
    box-shadow: 0 14px 28px rgba(132, 68, 223, 0.2);
}

.app-button--purple:hover:not(:disabled) {
    background: linear-gradient(135deg, #8d50e9, #7336d0);
}

.app-button--blue {
    color: #ffffff;
    background: linear-gradient(135deg, #1cb0f6, #158ecf);
    box-shadow: 0 14px 28px rgba(28, 176, 246, 0.2);
}

.app-button--blue:hover:not(:disabled) {
    background: linear-gradient(135deg, #1698d9, #117ab3);
}

.app-button--danger {
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.22);
    background: linear-gradient(180deg, rgba(254, 242, 242, 0.92), rgba(254, 226, 226, 0.82));
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.08);
}

.app-button--danger:hover:not(:disabled) {
    border-color: rgba(239, 68, 68, 0.34);
    background: linear-gradient(180deg, rgba(254, 226, 226, 0.96), rgba(254, 202, 202, 0.88));
}

.dark .app-button--danger {
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.28);
    background: linear-gradient(180deg, rgba(69, 10, 10, 0.82), rgba(127, 29, 29, 0.72));
}

.app-button--danger-solid {
    color: #ffffff;
    background: linear-gradient(135deg, #ff4b4b, #d63b3b);
    box-shadow: 0 14px 28px rgba(239, 68, 68, 0.22);
}

.app-button--danger-solid:hover:not(:disabled) {
    background: linear-gradient(135deg, #ef4444, #c83131);
}

.app-button--gold {
    color: #111827;
    border-color: rgba(245, 158, 11, 0.18);
    background: linear-gradient(135deg, #ffd44d, #f7b801);
    box-shadow: 0 16px 32px rgba(245, 158, 11, 0.22);
}

.app-button--gold:hover:not(:disabled) {
    background: linear-gradient(135deg, #f7c83a, #eca500);
}

.app-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.app-muted-meta {
    font-size: 0.9rem;
    color: #64748b;
}

.dark .app-muted-meta {
    color: #94a3b8;
}

.app-card-list {
    display: grid;
    gap: 1rem;
}

@media (max-width: 767px) {
    .app-section-head {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Premium UI pass */
.app-home-hero {
    position: relative;
    overflow: hidden;
}

.app-home-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(88, 204, 2, 0.14), transparent 34%),
        radial-gradient(circle at bottom right, rgba(28, 176, 246, 0.12), transparent 30%);
    pointer-events: none;
}

.app-home-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.5rem;
    align-items: center;
}

.app-home-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.app-home-hero-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 0.45rem;
    border-radius: 9999px;
    padding: 0.42rem 0.8rem;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(148, 163, 184, 0.16);
    color: #5b6b82;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.dark .app-home-hero-kicker {
    background: rgba(15, 23, 42, 0.54);
    border-color: rgba(74, 85, 104, 0.38);
    color: #9fb0c7;
}

.app-home-hero-kicker--public {
    color: #18794e;
    border-color: rgba(88, 204, 2, 0.22);
    background: rgba(88, 204, 2, 0.12);
}

.app-home-hero-kicker--private {
    color: #9a3412;
    border-color: rgba(249, 115, 22, 0.22);
    background: rgba(249, 115, 22, 0.12);
}

.dark .app-home-hero-kicker--public {
    color: #86efac;
    border-color: rgba(88, 204, 2, 0.3);
    background: rgba(22, 101, 52, 0.22);
}

.dark .app-home-hero-kicker--private {
    color: #fdba74;
    border-color: rgba(251, 146, 60, 0.3);
    background: rgba(124, 45, 18, 0.24);
}

.app-home-hero-title {
    margin: 0;
    font-size: clamp(2.05rem, 3vw, 3rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
    font-weight: 800;
    color: #1f2937;
}

.dark .app-home-hero-title {
    color: #e2e8f0;
}

.app-home-hero-description {
    margin: 0;
    max-width: 38rem;
    color: #526174;
    font-size: var(--app-font-size-hero-copy);
    line-height: 1.7;
}

.dark .app-home-hero-description {
    color: #a6b6c9;
}

.app-home-hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.app-home-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.5rem;
    padding: 0.48rem 0.84rem;
    border-radius: 9999px;
    font-size: 0.88rem;
    font-weight: 800;
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.08);
}

.app-home-hero-pill--streak {
    color: #b45309;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(255, 255, 255, 0.74));
    border: 1px solid rgba(245, 158, 11, 0.18);
}

.dark .app-home-hero-pill--streak {
    color: #fcd34d;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(15, 23, 42, 0.72));
    border-color: rgba(245, 158, 11, 0.24);
}

.app-home-hero-pill--xp {
    color: #0369a1;
    background: linear-gradient(135deg, rgba(28, 176, 246, 0.18), rgba(255, 255, 255, 0.74));
    border: 1px solid rgba(28, 176, 246, 0.18);
}

.dark .app-home-hero-pill--xp {
    color: #7dd3fc;
    background: linear-gradient(135deg, rgba(28, 176, 246, 0.22), rgba(15, 23, 42, 0.72));
    border-color: rgba(28, 176, 246, 0.24);
}

.app-home-progress-card {
    display: grid;
    gap: 1rem;
    justify-items: center;
    padding: 1.2rem;
    border-radius: 1.35rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.55);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36), 0 18px 36px rgba(15, 23, 42, 0.08);
}

.dark .app-home-progress-card {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(74, 85, 104, 0.4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 24px 42px rgba(2, 6, 23, 0.26);
}

.app-home-progress-ring {
    position: relative;
    display: grid;
    place-items: center;
}

.app-home-progress-ring-copy {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.app-home-progress-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1f2937;
}

.dark .app-home-progress-value {
    color: #e2e8f0;
}

.app-home-progress-meta {
    text-align: center;
}

.app-home-progress-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #1f2937;
}

.dark .app-home-progress-title {
    color: #e2e8f0;
}

.app-home-progress-description {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #64748b;
}

.dark .app-home-progress-description {
    color: #94a3b8;
}

.app-home-timetable-card {
    position: relative;
    display: grid;
    gap: 1rem;
    border-radius: 1.75rem !important;
    overflow: hidden;
    border-color: rgba(148, 163, 184, 0.14) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.98));
    box-shadow: var(--app-polish-shadow-medium) !important;
}

.dark .app-home-timetable-card {
    border-color: rgba(71, 85, 105, 0.48) !important;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.98));
}

.app-home-timetable-head {
    display: grid;
    gap: 0.85rem;
}

.app-home-timetable-copy {
    display: grid;
    gap: 0.3rem;
    max-width: 42rem;
}

.app-home-timetable-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border-radius: 9999px;
    padding: 0.38rem 0.72rem;
    border: 1px solid rgba(28, 176, 246, 0.14);
    background: rgba(255, 255, 255, 0.62);
    color: #0369a1;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dark .app-home-timetable-kicker {
    border-color: rgba(56, 189, 248, 0.22);
    background: rgba(15, 23, 42, 0.58);
    color: #7dd3fc;
}

.app-home-timetable-title {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #1f2937;
}

.dark .app-home-timetable-title {
    color: #e2e8f0;
}

.app-home-timetable-description {
    margin: 0;
    max-width: 42rem;
    font-size: 0.89rem;
    color: #64748b;
    line-height: 1.6;
}

.dark .app-home-timetable-description {
    color: #94a3b8;
}

.app-home-timetable-head-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.45rem;
}

.app-home-timetable-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    border-radius: 9999px;
    padding: 0.42rem 0.68rem;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(248, 250, 252, 0.92);
    color: #475569;
    font-size: 0.76rem;
    font-weight: 800;
}

.app-home-timetable-pill--accent {
    border-color: rgba(88, 204, 2, 0.2);
    background: rgba(88, 204, 2, 0.1);
    color: #19703a;
}

.dark .app-home-timetable-pill {
    border-color: rgba(71, 85, 105, 0.52);
    background: rgba(15, 23, 42, 0.72);
    color: #cbd5e1;
}

.dark .app-home-timetable-pill--accent {
    border-color: rgba(88, 204, 2, 0.2);
    background: rgba(88, 204, 2, 0.14);
    color: #c9ffad;
}

.app-home-timetable-overview {
    display: grid;
    gap: 0.75rem;
}

.app-home-timetable-next {
    display: grid;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    border-radius: 1.25rem !important;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(248, 250, 252, 0.9);
}

.dark .app-home-timetable-next {
    border-color: rgba(71, 85, 105, 0.48);
    background: rgba(15, 23, 42, 0.74);
}

.app-home-timetable-next-copy {
    display: grid;
    gap: 0.24rem;
    min-width: 0;
}

.app-home-timetable-next-kicker {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.app-home-timetable-next-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
}

.app-home-timetable-next-divider {
    display: inline-block;
    margin: 0 0.3rem;
    color: #94a3b8;
}

.app-home-timetable-next-meta,
.app-home-timetable-next-note {
    margin: 0;
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.55;
}

.app-home-timetable-next-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.app-home-timetable-next-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem;
}

.app-home-timetable-next-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.45rem;
    padding: 0.58rem 0.88rem;
    border-radius: 9999px;
    border: 1px solid rgba(28, 176, 246, 0.18);
    background: rgba(255, 255, 255, 0.92);
    color: #075985;
    font-size: 0.8rem;
    font-weight: 800;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.app-home-timetable-next-button:hover {
    transform: translateY(-1px);
    border-color: rgba(28, 176, 246, 0.28);
}

.dark .app-home-timetable-next-kicker,
.dark .app-home-timetable-next-meta,
.dark .app-home-timetable-next-note {
    color: #94a3b8;
}

.dark .app-home-timetable-next-title {
    color: #e2e8f0;
}

.dark .app-home-timetable-next-button {
    border-color: rgba(56, 189, 248, 0.24);
    background: rgba(12, 74, 110, 0.34);
    color: #bae6fd;
}

.app-home-timetable-spotlight {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 1rem;
    padding: 1.1rem;
    border-radius: 1.5rem !important;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(248, 250, 252, 0.76));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.app-home-timetable-spotlight::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, rgba(88, 204, 2, 0.9), rgba(28, 176, 246, 0.85));
}

.dark .app-home-timetable-spotlight {
    border-color: rgba(71, 85, 105, 0.5);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.66), rgba(17, 24, 39, 0.78));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.app-home-timetable-spotlight-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.app-home-timetable-spotlight-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.82rem;
    border-radius: 9999px;
    border: 1px solid rgba(28, 176, 246, 0.14);
    background: rgba(255, 255, 255, 0.6);
    color: #0369a1;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.dark .app-home-timetable-spotlight-kicker {
    border-color: rgba(56, 189, 248, 0.2);
    background: rgba(15, 23, 42, 0.54);
    color: #7dd3fc;
}

.app-home-timetable-spotlight-subject {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
}

.app-home-timetable-spotlight-copy {
    display: grid;
    gap: 0.3rem;
    min-width: 0;
}

.app-home-timetable-spotlight-title {
    margin: 0;
    font-size: clamp(1.2rem, 2.6vw, 1.8rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
    font-weight: 800;
    color: #1f2937;
}

.dark .app-home-timetable-spotlight-title {
    color: #e2e8f0;
}

.app-home-timetable-spotlight-paper {
    margin: 0;
    font-size: 0.96rem;
    font-weight: 700;
    color: #334155;
}

.dark .app-home-timetable-spotlight-paper {
    color: #cbd5e1;
}

.app-home-timetable-spotlight-context {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.55;
}

.dark .app-home-timetable-spotlight-context {
    color: #94a3b8;
}

.app-home-timetable-spotlight-meta {
    display: grid;
    gap: 0.6rem;
}

.app-home-timetable-spotlight-meta-item {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.55rem;
    min-width: 0;
    color: #475569;
    font-size: 0.88rem;
    line-height: 1.55;
}

.app-home-timetable-spotlight-meta-item span:last-child {
    min-width: 0;
}

.dark .app-home-timetable-spotlight-meta-item {
    color: #cbd5e1;
}

.app-home-timetable-spotlight-actions {
    display: grid;
    gap: 0.65rem;
}

.app-home-timetable-spotlight-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.85rem;
    padding: 0.72rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.7);
    color: #334155;
    font-size: 0.88rem;
    font-weight: 800;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.app-home-timetable-spotlight-button:hover {
    transform: translateY(-1px);
    border-color: rgba(28, 176, 246, 0.28);
}

.app-home-timetable-spotlight-button--primary {
    border-color: rgba(28, 176, 246, 0.18);
    background: rgba(224, 242, 254, 0.76);
    color: #075985;
}

.dark .app-home-timetable-spotlight-button {
    border-color: rgba(71, 85, 105, 0.5);
    background: rgba(15, 23, 42, 0.62);
    color: #e2e8f0;
}

.dark .app-home-timetable-spotlight-button--primary {
    border-color: rgba(56, 189, 248, 0.24);
    background: rgba(12, 74, 110, 0.46);
    color: #bae6fd;
}

.app-home-timetable-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.app-home-timetable-summary-card {
    display: grid;
    gap: 0.12rem;
    align-content: start;
    padding: 0.78rem 0.9rem;
    border-radius: 1rem !important;
    border: 1px solid rgba(148, 163, 184, 0.1);
    background: rgba(248, 250, 252, 0.92);
}

.dark .app-home-timetable-summary-card {
    border-color: rgba(71, 85, 105, 0.48);
    background: rgba(15, 23, 42, 0.72);
}

.app-home-timetable-summary-copy {
    display: grid;
    gap: 0.16rem;
    min-width: 0;
}

.app-home-timetable-summary-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.app-home-timetable-summary-value {
    font-size: 1.08rem;
    line-height: 1;
    font-weight: 800;
    color: #0f172a;
}

.app-home-timetable-summary-note {
    margin: 0;
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.45;
}

.dark .app-home-timetable-summary-label,
.dark .app-home-timetable-summary-note {
    color: #94a3b8;
}

.dark .app-home-timetable-summary-value {
    color: #e2e8f0;
}

.app-home-timetable-switcher {
    display: grid;
    gap: 0.75rem;
}

.app-home-timetable-switcher-button {
    display: grid;
    gap: 0.18rem;
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 1.1rem !important;
    padding: 0.8rem 0.95rem;
    background: rgba(255, 255, 255, 0.5);
    text-align: left;
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.app-home-timetable-switcher-button:hover {
    transform: translateY(-1px);
    border-color: rgba(28, 176, 246, 0.28);
}

.app-home-timetable-switcher-button--active {
    border-color: rgba(28, 176, 246, 0.22);
    background: rgba(224, 242, 254, 0.72);
    box-shadow: 0 10px 24px -24px rgba(14, 165, 233, 0.4);
}

.dark .app-home-timetable-switcher-button {
    border-color: rgba(71, 85, 105, 0.48);
    background: rgba(15, 23, 42, 0.48);
    color: #e2e8f0;
}

.dark .app-home-timetable-switcher-button--active {
    border-color: rgba(56, 189, 248, 0.28);
    background: rgba(12, 74, 110, 0.4);
}

.app-home-timetable-switcher-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #1f2937;
}

.app-home-timetable-switcher-meta {
    font-size: 0.76rem;
    color: #64748b;
}

.dark .app-home-timetable-switcher-title {
    color: #e2e8f0;
}

.dark .app-home-timetable-switcher-meta {
    color: #94a3b8;
}

.app-home-timetable-calendar-wrap {
    display: grid;
    gap: 0.85rem;
}

.app-home-timetable-calendar-panel {
    display: grid;
    gap: 0.85rem;
    border-radius: 1.35rem !important;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.12);
    padding: 1rem;
    background: rgba(248, 250, 252, 0.84);
    box-shadow: none;
}

.dark .app-home-timetable-calendar-panel {
    border-color: rgba(71, 85, 105, 0.48);
    background: rgba(15, 23, 42, 0.8);
}

.app-home-timetable-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
}

.app-home-timetable-toolbar-copy {
    display: grid;
    gap: 0.22rem;
}

.app-home-timetable-toolbar-kicker {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.app-home-timetable-toolbar-title {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 800;
    color: #0f172a;
}

.app-home-timetable-toolbar-description {
    margin: 0.2rem 0 0;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.55;
}

.dark .app-home-timetable-toolbar-kicker {
    color: #94a3b8;
}

.dark .app-home-timetable-toolbar-title {
    color: #e2e8f0;
}

.dark .app-home-timetable-toolbar-description {
    color: #94a3b8;
}

.app-home-timetable-toolbar-actions {
    display: grid;
    grid-template-columns: minmax(2.45rem, auto) minmax(0, 1fr) minmax(2.45rem, auto);
    align-items: stretch;
    gap: 0.45rem;
}

.app-home-timetable-toolbar-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.45rem;
    min-height: 2.45rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 9999px;
    padding: 0.55rem 0.75rem;
    background: rgba(255, 255, 255, 0.68);
    color: #334155;
    font-size: 0.8rem;
    font-weight: 800;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.app-home-timetable-toolbar-button:hover {
    transform: translateY(-1px);
    border-color: rgba(28, 176, 246, 0.3);
}

.app-home-timetable-toolbar-button--focus {
    width: 100%;
    border-color: rgba(88, 204, 2, 0.18);
    background: rgba(88, 204, 2, 0.1);
    color: #14532d;
}

.dark .app-home-timetable-toolbar-button {
    border-color: rgba(71, 85, 105, 0.5);
    background: rgba(15, 23, 42, 0.54);
    color: #e2e8f0;
}

.dark .app-home-timetable-toolbar-button--focus {
    border-color: rgba(88, 204, 2, 0.2);
    background: rgba(20, 83, 45, 0.36);
    color: #dcfce7;
}

.app-home-timetable-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.app-home-timetable-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
}

.dark .app-home-timetable-legend-item {
    color: #cbd5e1;
}

.app-home-timetable-legend-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
}

.app-home-timetable-legend-dot--live {
    background: #58cc02;
}

.app-home-timetable-legend-dot--upcoming {
    background: #1cb0f6;
}

.app-home-timetable-legend-dot--completed {
    background: #94a3b8;
}

.app-home-timetable-grid-shell {
    display: grid;
    gap: 0.55rem;
    overflow-x: visible;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
}

.app-home-timetable-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    min-width: 0;
    gap: 0.35rem;
}

.app-home-timetable-weekday-chip {
    text-align: center;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.dark .app-home-timetable-weekday-chip {
    color: #94a3b8;
}

.app-home-timetable-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    min-width: 0;
    gap: 0.35rem;
}

.app-home-timetable-cell {
    position: relative;
    display: flex;
    aspect-ratio: 1 / 1;
    min-height: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 0.82rem;
    padding: 0.34rem;
    background: rgba(255, 255, 255, 0.92);
    text-align: left;
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.app-home-timetable-cell:hover {
    transform: translateY(-1px);
    border-color: rgba(28, 176, 246, 0.26);
    box-shadow: 0 12px 24px -24px rgba(15, 23, 42, 0.35);
}

.app-home-timetable-cell--outside {
    background: rgba(248, 250, 252, 0.75);
    opacity: 0.5;
}

.app-home-timetable-cell--selected {
    border-color: rgba(28, 176, 246, 0.42);
    box-shadow: 0 0 0 2px rgba(28, 176, 246, 0.14);
}

.app-home-timetable-cell--has-events {
    border-color: rgba(28, 176, 246, 0.22);
}

.app-home-timetable-cell--today {
    border-color: rgba(88, 204, 2, 0.34);
}

.app-home-timetable-cell--important {
    background: rgba(239, 246, 255, 0.96);
    border-color: rgba(28, 176, 246, 0.24);
}

.app-home-timetable-cell--upcoming {
    background: rgba(248, 252, 255, 0.94);
}

.app-home-timetable-cell--completed {
    background: rgba(248, 250, 252, 0.88);
    opacity: 0.88;
}

.dark .app-home-timetable-cell {
    border-color: rgba(71, 85, 105, 0.52);
    background: rgba(15, 23, 42, 0.82);
}

.dark .app-home-timetable-cell--outside {
    background: rgba(15, 23, 42, 0.62);
}

.dark .app-home-timetable-cell--selected {
    border-color: rgba(56, 189, 248, 0.46);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.16);
}

.dark .app-home-timetable-cell--has-events {
    border-color: rgba(56, 189, 248, 0.3);
}

.dark .app-home-timetable-cell--today {
    border-color: rgba(88, 204, 2, 0.36);
}

.dark .app-home-timetable-cell--important {
    background: rgba(12, 74, 110, 0.24);
    border-color: rgba(56, 189, 248, 0.34);
}

.dark .app-home-timetable-cell--upcoming {
    background: rgba(15, 23, 42, 0.88);
}

.dark .app-home-timetable-cell--completed {
    background: rgba(15, 23, 42, 0.74);
}

.app-home-timetable-cell-head {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.app-home-timetable-cell-head-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.2rem;
    position: absolute;
    top: 0.26rem;
    right: 0.26rem;
    z-index: 2;
}

.app-home-timetable-cell-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: clamp(0.82rem, 0.68rem + 0.48vw, 1.08rem);
    font-weight: 800;
    line-height: 1;
    text-align: center;
    color: #0f172a;
}

.dark .app-home-timetable-cell-number {
    color: #e2e8f0;
}

.app-home-timetable-cell-important-badge {
    position: absolute;
    top: 0.25rem;
    left: 0.25rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border-radius: 9999px;
    background: rgba(28, 176, 246, 0.16);
    color: #0369a1;
    font-size: 0.6rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 10px 18px -14px rgba(14, 165, 233, 0.55);
}

.app-home-timetable-cell-important-badge--today {
    background: rgba(88, 204, 2, 0.18);
    color: #166534;
}

.app-home-timetable-cell-important-badge--upcoming {
    background: rgba(28, 176, 246, 0.18);
    color: #0369a1;
}

.app-home-timetable-cell-important-badge--completed {
    background: rgba(148, 163, 184, 0.18);
    color: #475569;
}

.dark .app-home-timetable-cell-important-badge {
    background: rgba(56, 189, 248, 0.2);
    color: #bae6fd;
    box-shadow: 0 12px 22px -16px rgba(14, 165, 233, 0.56);
}

.dark .app-home-timetable-cell-important-badge--today {
    background: rgba(88, 204, 2, 0.22);
    color: #d9f99d;
}

.dark .app-home-timetable-cell-important-badge--upcoming {
    background: rgba(14, 165, 233, 0.24);
    color: #bae6fd;
}

.dark .app-home-timetable-cell-important-badge--completed {
    background: rgba(71, 85, 105, 0.62);
    color: #cbd5e1;
}

.app-home-timetable-cell-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    padding: 0 0.28rem;
    background: rgba(28, 176, 246, 0.12);
    color: #0f5f8f;
    font-size: 0.58rem;
    font-weight: 800;
    line-height: 1;
}

.app-home-timetable-cell-badge--upcoming {
    background: rgba(28, 176, 246, 0.16);
    color: #0369a1;
}

.app-home-timetable-cell-badge--today {
    background: rgba(88, 204, 2, 0.16);
    color: #166534;
}

.app-home-timetable-cell-badge--completed {
    background: rgba(148, 163, 184, 0.16);
    color: #475569;
}

.dark .app-home-timetable-cell-badge {
    background: rgba(56, 189, 248, 0.16);
    color: #bae6fd;
}

.dark .app-home-timetable-cell-badge--upcoming {
    background: rgba(14, 165, 233, 0.22);
    color: #bae6fd;
}

.dark .app-home-timetable-cell-badge--today {
    background: rgba(88, 204, 2, 0.18);
    color: #d9f99d;
}

.dark .app-home-timetable-cell-badge--completed {
    background: rgba(71, 85, 105, 0.58);
    color: #cbd5e1;
}

.app-home-timetable-cell-marker {
    display: none;
    align-items: center;
    border-radius: 9999px;
    padding: 0.18rem 0.36rem;
    background: rgba(88, 204, 2, 0.14);
    color: #166534;
    font-size: 0.54rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dark .app-home-timetable-cell-marker {
    background: rgba(88, 204, 2, 0.18);
    color: #c9ffad;
}

.app-home-timetable-cell-events {
    display: none;
}

.app-home-timetable-chip {
    display: grid;
    gap: 0.16rem;
    min-width: 0;
    border-radius: 0.95rem;
    padding: 0.34rem 0.42rem;
    background: rgba(28, 176, 246, 0.1);
    color: #0f172a;
}

.app-home-timetable-chip--today {
    background: rgba(88, 204, 2, 0.14);
    color: #166534;
}

.app-home-timetable-chip--completed {
    background: rgba(148, 163, 184, 0.14);
    color: #475569;
}

.dark .app-home-timetable-chip {
    background: rgba(14, 165, 233, 0.16);
    color: #e2e8f0;
}

.dark .app-home-timetable-chip--today {
    background: rgba(88, 204, 2, 0.18);
    color: #dcfce7;
}

.dark .app-home-timetable-chip--completed {
    background: rgba(71, 85, 105, 0.42);
    color: #cbd5e1;
}

.app-home-timetable-chip-time {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    display: none;
}

.app-home-timetable-chip-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.68rem;
    font-weight: 700;
}

.app-home-timetable-chip-more {
    font-size: 0.7rem;
    font-weight: 800;
    color: #64748b;
}

.dark .app-home-timetable-chip-more {
    color: #94a3b8;
}

.app-home-timetable-agenda {
    display: grid;
    gap: 1rem;
}

.app-home-timetable-agenda-panel,
.app-home-timetable-upcoming-panel {
    display: grid;
    gap: 0.9rem;
    border-radius: 1.5rem !important;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    padding: 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(248, 250, 252, 0.66));
}

.dark .app-home-timetable-agenda-panel,
.dark .app-home-timetable-upcoming-panel {
    border-color: rgba(71, 85, 105, 0.48);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.54), rgba(17, 24, 39, 0.66));
}

.app-home-timetable-agenda-head,
.app-home-timetable-upcoming-head {
    display: grid;
    gap: 0.24rem;
}

.app-home-timetable-agenda-kicker {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.app-home-timetable-agenda-title,
.app-home-timetable-upcoming-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
}

.app-home-timetable-agenda-copy {
    margin: 0;
    color: #64748b;
    line-height: 1.55;
}

.dark .app-home-timetable-agenda-kicker {
    color: #94a3b8;
}

.dark .app-home-timetable-agenda-title,
.dark .app-home-timetable-upcoming-title {
    color: #e2e8f0;
}

.dark .app-home-timetable-agenda-copy {
    color: #94a3b8;
}

.app-home-timetable-agenda-list {
    display: grid;
    gap: 0.8rem;
}

.app-home-timetable-entry {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.95rem;
    align-items: flex-start;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 1.3rem !important;
    padding: 0.95rem;
    background: rgba(255, 255, 255, 0.54);
}

.app-home-timetable-entry--today {
    border-color: rgba(88, 204, 2, 0.32);
    background: rgba(240, 253, 244, 0.72);
}

.app-home-timetable-entry--completed {
    opacity: 0.74;
}

.dark .app-home-timetable-entry {
    border-color: rgba(71, 85, 105, 0.48);
    background: rgba(15, 23, 42, 0.48);
}

.dark .app-home-timetable-entry--today {
    border-color: rgba(88, 204, 2, 0.3);
    background: rgba(20, 83, 45, 0.34);
}

.app-home-timetable-date {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
    width: fit-content;
    border-radius: 1rem;
    padding: 0.7rem 0.78rem;
    background: rgba(15, 23, 42, 0.04);
    text-align: center;
}

.dark .app-home-timetable-date {
    background: rgba(255, 255, 255, 0.04);
}

.app-home-timetable-weekday {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.app-home-timetable-day {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1f2937;
}

.dark .app-home-timetable-weekday {
    color: #94a3b8;
}

.dark .app-home-timetable-day {
    color: #e2e8f0;
}

.app-home-timetable-entry-copy {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
}

.app-home-timetable-entry-title-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
}

.app-home-timetable-entry-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.app-home-timetable-entry-title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 800;
    color: #1f2937;
}

.dark .app-home-timetable-entry-title {
    color: #e2e8f0;
}

.app-home-timetable-status {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.32rem 0.58rem;
    background: rgba(148, 163, 184, 0.12);
    color: #475569;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.app-home-timetable-status--live {
    background: rgba(88, 204, 2, 0.14);
    color: #166534;
}

.app-home-timetable-status--upcoming {
    background: rgba(28, 176, 246, 0.12);
    color: #0f5f8f;
}

.app-home-timetable-status--completed {
    background: rgba(148, 163, 184, 0.14);
    color: #475569;
}

.dark .app-home-timetable-status {
    background: rgba(71, 85, 105, 0.42);
    color: #cbd5e1;
}

.dark .app-home-timetable-status--live {
    background: rgba(88, 204, 2, 0.18);
    color: #dcfce7;
}

.dark .app-home-timetable-status--upcoming {
    background: rgba(14, 165, 233, 0.18);
    color: #bae6fd;
}

.dark .app-home-timetable-status--completed {
    background: rgba(71, 85, 105, 0.42);
    color: #cbd5e1;
}

.app-home-timetable-entry-paper {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #475569;
}

.dark .app-home-timetable-entry-paper {
    color: #cbd5e1;
}

.app-home-timetable-entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.app-home-timetable-entry-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    min-width: 0;
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.5;
}

.app-home-timetable-entry-meta-item span:last-child {
    min-width: 0;
}

.dark .app-home-timetable-entry-meta-item {
    color: #94a3b8;
}

.app-home-timetable-agenda-empty {
    display: grid;
    justify-items: start;
    gap: 0.5rem;
    padding: 0.2rem 0;
}

.app-home-timetable-agenda-empty-icon {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    background: rgba(148, 163, 184, 0.12);
    color: #475569;
    font-size: 1rem;
}

.app-home-timetable-agenda-empty-title {
    margin: 0;
    font-size: 0.96rem;
    font-weight: 800;
    color: #0f172a;
}

.app-home-timetable-agenda-empty-copy {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}

.dark .app-home-timetable-agenda-empty-icon {
    background: rgba(71, 85, 105, 0.42);
    color: #cbd5e1;
}

.dark .app-home-timetable-agenda-empty-title {
    color: #e2e8f0;
}

.dark .app-home-timetable-agenda-empty-copy {
    color: #94a3b8;
}

.app-home-timetable-upcoming-list {
    display: grid;
    gap: 0.7rem;
}

.app-home-timetable-upcoming-item {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 0.8rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 1.15rem;
    padding: 0.75rem 0.8rem;
    background: rgba(255, 255, 255, 0.9);
    text-align: left;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.app-home-timetable-upcoming-item:hover {
    transform: translateY(-1px);
    border-color: rgba(28, 176, 246, 0.28);
}

.dark .app-home-timetable-upcoming-item {
    border-color: rgba(71, 85, 105, 0.52);
    background: rgba(15, 23, 42, 0.82);
}

.app-home-timetable-upcoming-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.3rem;
    width: fit-content;
    border-radius: 9999px;
    padding: 0.45rem 0.7rem;
    background: rgba(88, 204, 2, 0.12);
    color: #166534;
    font-size: 0.74rem;
    font-weight: 800;
}

.dark .app-home-timetable-upcoming-date {
    background: rgba(88, 204, 2, 0.18);
    color: #dcfce7;
}

.app-home-timetable-upcoming-copy {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.app-home-timetable-upcoming-subject {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 800;
    color: #0f172a;
}

.app-home-timetable-upcoming-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #64748b;
    font-size: 0.78rem;
}

.app-home-timetable-upcoming-arrow {
    color: #94a3b8;
    font-size: 0.82rem;
}

.dark .app-home-timetable-upcoming-subject {
    color: #e2e8f0;
}

.dark .app-home-timetable-upcoming-meta,
.dark .app-home-timetable-upcoming-arrow {
    color: #94a3b8;
}

.app-home-timetable-empty {
    display: grid;
    justify-items: center;
    gap: 0.8rem;
}

.app-home-timetable-empty-icon {
    display: grid;
    place-items: center;
    width: 3.6rem;
    height: 3.6rem;
    border-radius: 1.2rem;
    background: rgba(28, 176, 246, 0.12);
    color: #0369a1;
    font-size: 1.15rem;
}

.dark .app-home-timetable-empty-icon {
    background: rgba(28, 176, 246, 0.14);
    color: #7dd3fc;
}

.app-home-timetable-empty-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #1f2937;
}

.dark .app-home-timetable-empty-title {
    color: #e2e8f0;
}

.app-home-timetable-empty-copy {
    margin: 0;
    max-width: 28rem;
    text-align: center;
    color: #64748b;
    line-height: 1.6;
}

.dark .app-home-timetable-empty-copy {
    color: #94a3b8;
}

.app-subject-card {
    display: flex;
    min-height: 21rem;
    flex-direction: column;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.app-subject-card:hover {
    transform: translateY(-4px);
}

.app-subject-card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 1rem;
    padding: 1.35rem;
}

.app-subject-card-kicker-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
}

.app-subject-card-kicker,
.app-subject-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    padding: 0.42rem 0.78rem;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1;
}

.app-subject-card-kicker {
    color: #19703a;
    background: rgba(88, 204, 2, 0.14);
}

.app-subject-card-badge {
    color: #136b96;
    background: rgba(28, 176, 246, 0.13);
}

.dark .app-subject-card-kicker {
    color: #bef264;
    background: rgba(88, 204, 2, 0.16);
}

.dark .app-subject-card-badge {
    color: #93c5fd;
    background: rgba(28, 176, 246, 0.18);
}

.app-subject-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
}

.app-subject-card-copy {
    min-width: 0;
}

.app-subject-card-title {
    margin: 0;
    font-size: 1.18rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

.app-subject-card-description {
    margin: 0.65rem 0 0;
    min-height: 3.1rem;
    font-size: 0.94rem;
    line-height: 1.58;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.app-subject-card-icon-shell {
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.app-subject-card-icon {
    display: grid;
    width: 3.7rem;
    height: 3.7rem;
    place-items: center;
    border: 1px solid rgba(191, 219, 205, 0.9);
    border-radius: 1.2rem;
    background: linear-gradient(135deg, rgba(88, 204, 2, 0.16), rgba(28, 176, 246, 0.14));
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.app-subject-card-icon i {
    font-size: 1.35rem;
}

.dark .app-subject-card-icon {
    border-color: rgba(74, 85, 104, 0.74);
    background: linear-gradient(135deg, rgba(88, 204, 2, 0.18), rgba(28, 176, 246, 0.18));
    box-shadow: 0 20px 34px rgba(2, 6, 23, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.app-subject-card-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: auto;
}

.app-subject-card-stat {
    padding: 0.92rem 1rem;
    border: 1px solid rgba(191, 219, 205, 0.8);
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(247, 252, 249, 0.86));
}

.dark .app-subject-card-stat {
    border-color: rgba(74, 85, 104, 0.72);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.5), rgba(12, 35, 41, 0.42));
}

.app-subject-card-stat-label {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    margin: 0;
    font-size: 0.74rem;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.app-subject-card-stat-label i {
    color: #58cc02;
}

.app-subject-card-stat:nth-child(2) .app-subject-card-stat-label i {
    color: #1cb0f6;
}

.dark .app-subject-card-stat-label {
    color: #94a3b8;
}

.app-subject-card-stat-value {
    margin: 0.48rem 0 0;
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
}

.dark .app-subject-card-stat-value {
    color: #f8fafc;
}

.app-subject-card-footer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(88, 204, 2, 0.98), rgba(52, 183, 77, 0.96));
}

.dark .app-subject-card-footer {
    background: linear-gradient(135deg, rgba(88, 204, 2, 0.92), rgba(26, 143, 77, 0.88));
}

.app-subject-card-footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02) 48%, transparent 72%);
    pointer-events: none;
}

.app-subject-card-footer-copy {
    min-width: 0;
}

.app-subject-card-footer-label {
    display: block;
    font-size: 0.98rem;
    font-weight: 800;
    color: #fff;
}

.app-subject-card-footer-meta {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.84);
}

.app-subject-card-footer-arrow {
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    flex-shrink: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transition: transform 0.18s ease, background-color 0.18s ease;
}

.app-subject-card-footer-arrow i {
    font-size: 0.9rem;
}

.app-subject-card:hover .app-subject-card-footer-arrow {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.24);
}

@media (max-width: 640px) {
    .app-subject-card {
        min-height: 20rem;
    }

    .app-subject-card-body {
        padding: 1.15rem;
    }

    .app-subject-card-footer {
        padding: 0.95rem 1.15rem;
    }
}

.app-surface-list-card {
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.app-surface-list-card:hover {
    transform: translateY(-2px);
    border-color: var(--app-polish-border-strong) !important;
    box-shadow: var(--app-polish-shadow-medium) !important;
}

.app-user-summary-metrics {
    padding: 0.9rem 0.25rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.dark .app-user-summary-metrics {
    border-top-color: rgba(74, 85, 104, 0.36);
    border-bottom-color: rgba(74, 85, 104, 0.36);
}

.app-user-summary-actions {
    gap: 0.65rem;
}

.app-post-card {
    position: relative;
}

.app-post-card::after {
    content: '';
    position: absolute;
    inset: 1rem 1rem auto;
    height: 1px;
    background: transparent;
}

.app-post-actions {
    padding-top: 0.35rem;
}

.app-comment-composer {
    gap: 0.55rem;
}

.app-comment-input {
    min-height: 2.8rem;
}

.app-comment-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 9999px;
    border: 1px solid rgba(88, 204, 2, 0.16);
    background: linear-gradient(135deg, rgba(88, 204, 2, 0.12), rgba(255, 255, 255, 0.78));
}

.dark .app-comment-send {
    border-color: rgba(88, 204, 2, 0.24);
    background: linear-gradient(135deg, rgba(88, 204, 2, 0.18), rgba(15, 23, 42, 0.7));
}

.app-post-menu {
    overflow: hidden;
    min-width: 11rem;
}

.app-post-menu-item {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 1rem;
    text-align: left;
    font-size: 0.92rem;
    font-weight: 700;
    color: #334155;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.app-post-menu-item:hover {
    background: rgba(88, 204, 2, 0.08);
    color: #1f2937;
}

.dark .app-post-menu-item {
    color: #e2e8f0;
}

.dark .app-post-menu-item:hover {
    background: rgba(88, 204, 2, 0.14);
    color: #f8fafc;
}

.app-post-menu-item--danger {
    color: #dc2626;
}

.app-post-menu-item--danger:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #b91c1c;
}

.dark .app-post-menu-item--danger {
    color: #fca5a5;
}

.dark .app-post-menu-item--danger:hover {
    background: rgba(239, 68, 68, 0.14);
    color: #fecaca;
}

.app-discover-page {
    display: block;
}

.app-discover-page .app-section-head {
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.app-discover-page .app-section-copy {
    display: grid;
    gap: 0.28rem;
}

.app-discover-page .app-section-title {
    font-size: 1.28rem;
}

.app-discover-hero {
    margin-bottom: 2rem;
    padding: 1.35rem;
    overflow: hidden;
}

.app-discover-hero-grid {
    display: grid;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
}

.app-discover-hero-copy {
    max-width: 40rem;
}

.app-discover-hero-kicker {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.42rem 0.78rem;
    background: rgba(88, 204, 2, 0.14);
    color: #19703a;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.dark .app-discover-hero-kicker {
    background: rgba(88, 204, 2, 0.18);
    color: #bef264;
}

.app-discover-hero-title {
    margin: 0.8rem 0 0;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.04em;
    color: #0f172a;
}

.dark .app-discover-hero-title {
    color: #f8fafc;
}

.app-discover-hero-description {
    margin: 0.65rem 0 0;
    max-width: 32rem;
    font-size: var(--app-font-size-hero-copy);
    line-height: 1.65;
    color: #64748b;
}

.dark .app-discover-hero-description {
    color: #94a3b8;
}

.app-discover-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.app-discover-search-wrap {
    position: relative;
}

.app-discover-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    font-size: 0.98rem;
    line-height: 1;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
}

.app-discover-page .search-bar {
    min-height: 4.1rem;
    padding-left: 3.4rem;
    border-radius: 1.15rem;
}

@media (max-width: 640px) {
    .app-discover-search-icon {
        left: 0.95rem;
    }

    .app-discover-page .search-bar {
        padding-left: 3.15rem;
    }
}

.app-discover-result-card {
    padding: 1rem 1.1rem;
}

.app-discover-result-type {
    display: inline-flex;
    align-items: center;
    margin-top: 0.22rem;
    border-radius: 999px;
    padding: 0.22rem 0.55rem;
    background: rgba(88, 204, 2, 0.1);
    color: #2f7d1f;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
    text-transform: capitalize;
}

.dark .app-discover-result-type {
    background: rgba(88, 204, 2, 0.16);
    color: #9cf06b;
}

.app-discover-result-actions {
    justify-content: flex-end;
}

.app-discover-inline-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.2rem;
    height: 1.2rem;
    margin-left: 0.45rem;
    padding: 0 0.34rem;
    border-radius: 999px;
    background: rgba(88, 204, 2, 0.14);
    color: #2f7d1f;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
}

.dark .app-discover-inline-badge {
    background: rgba(88, 204, 2, 0.18);
    color: #b7f27d;
}

.app-inbox-modal {
    display: flex;
    flex-direction: column;
    min-height: min(85vh, 46rem);
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(88, 204, 2, 0.08), transparent 24%),
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.1), transparent 26%) !important;
}

.app-inbox-shell {
    display: grid;
    grid-template-columns: minmax(19rem, 23rem) minmax(0, 1fr);
    flex: 1 1 auto;
    min-height: 0;
}

.app-inbox-sidebar,
.app-inbox-thread,
.app-inbox-thread-shell {
    min-height: 0;
}

.app-inbox-sidebar {
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.24);
}

.dark .app-inbox-sidebar {
    border-right-color: rgba(74, 85, 104, 0.38);
    background: rgba(15, 23, 42, 0.18);
}

.app-inbox-sidebar-head,
.app-inbox-thread-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.25rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.dark .app-inbox-sidebar-head,
.dark .app-inbox-thread-head {
    border-bottom-color: rgba(74, 85, 104, 0.3);
    background: rgba(15, 23, 42, 0.22);
}

.app-inbox-sidebar-body,
.app-inbox-thread-body {
    min-height: 0;
    overflow-y: auto;
}

.app-inbox-conversation-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 0.95rem;
}

.app-inbox-conversation {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    width: 100%;
    padding: 0.9rem;
    text-align: left;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.04);
}

.dark .app-inbox-conversation {
    border-color: rgba(74, 85, 104, 0.3);
    background: rgba(15, 23, 42, 0.3);
    box-shadow: 0 16px 28px rgba(2, 6, 23, 0.12);
}

.app-inbox-conversation:hover,
.app-inbox-conversation--active {
    border-color: rgba(88, 204, 2, 0.28);
    background: rgba(88, 204, 2, 0.1);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
}

.dark .app-inbox-conversation:hover,
.dark .app-inbox-conversation--active {
    background: rgba(88, 204, 2, 0.12);
    border-color: rgba(88, 204, 2, 0.34);
    box-shadow: 0 22px 38px rgba(2, 6, 23, 0.2);
}

.app-inbox-conversation-avatar,
.app-inbox-thread-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    object-fit: cover;
    flex-shrink: 0;
}

.app-inbox-conversation-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.app-inbox-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 0.38rem;
    border-radius: 999px;
    padding: 0.3rem 0.62rem;
    background: rgba(88, 204, 2, 0.12);
    color: #1f7a3a;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dark .app-inbox-kicker {
    background: rgba(88, 204, 2, 0.16);
    color: #bef264;
}

.app-inbox-toolbar-button {
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.34);
    color: #64748b;
    box-shadow: none;
}

.app-inbox-toolbar-button:hover {
    background: rgba(148, 163, 184, 0.12);
    color: #1f2937;
}

.app-inbox-toolbar-button i,
.app-inbox-toolbar-button:hover i {
    transform: none;
}

.dark .app-inbox-toolbar-button {
    border-color: rgba(74, 85, 104, 0.32);
    background: rgba(15, 23, 42, 0.26);
    color: #94a3b8;
}

.dark .app-inbox-toolbar-button:hover {
    background: rgba(148, 163, 184, 0.12);
    color: #e2e8f0;
}

.app-inbox-conversation-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.8rem;
}

.app-inbox-conversation-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.app-inbox-conversation-name,
.app-inbox-thread-title {
    margin: 0;
    font-size: clamp(0.95rem, 0.1vw + 0.92rem, 1.02rem);
    font-weight: 700;
    color: #0f172a;
}

.dark .app-inbox-conversation-name,
.dark .app-inbox-thread-title {
    color: #f8fafc;
}

.app-inbox-conversation-time {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
}

.dark .app-inbox-conversation-time {
    color: #94a3b8;
}

.app-inbox-conversation-preview {
    margin: 0.28rem 0 0;
    font-size: clamp(0.84rem, 0.08vw + 0.82rem, 0.9rem);
    line-height: 1.45;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dark .app-inbox-conversation-preview {
    color: #94a3b8;
}

.app-inbox-conversation-preview--typing {
    color: #2f7d1f;
    font-weight: 700;
}

.dark .app-inbox-conversation-preview--typing {
    color: #b7f27d;
}

.app-inbox-conversation-preview--unread {
    color: #0f172a;
    font-weight: 700;
}

.dark .app-inbox-conversation-preview--unread {
    color: #f8fafc;
}

.app-inbox-conversation-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.3rem;
    height: 1.3rem;
    padding: 0 0.36rem;
    border-radius: 999px;
    background: rgba(88, 204, 2, 0.14);
    color: #2f7d1f;
    font-size: 0.69rem;
    font-weight: 800;
    line-height: 1;
}

.dark .app-inbox-conversation-badge {
    background: rgba(88, 204, 2, 0.18);
    color: #b7f27d;
}

.app-inbox-thread {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.12);
}

.dark .app-inbox-thread {
    background: rgba(2, 6, 23, 0.06);
}

.app-inbox-thread-shell {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.app-inbox-thread-identity {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.app-inbox-thread-back {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.54);
    color: #0f172a;
    flex-shrink: 0;
    padding-inline: 0.8rem;
}

.dark .app-inbox-thread-back {
    border-color: rgba(74, 85, 104, 0.36);
    background: rgba(15, 23, 42, 0.44);
    color: #f8fafc;
}

.app-inbox-thread-copy {
    min-width: 0;
}

.app-inbox-thread-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.7rem;
    margin-top: 0.28rem;
}

.app-inbox-thread-count {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.28rem 0.62rem;
    background: rgba(88, 204, 2, 0.1);
    color: #1f7a3a;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

.dark .app-inbox-thread-count {
    background: rgba(88, 204, 2, 0.14);
    color: #bef264;
}

.app-inbox-thread-status--typing {
    color: #2f7d1f !important;
    font-weight: 700;
}

.dark .app-inbox-thread-status--typing {
    color: #b7f27d !important;
}

.app-inbox-thread-body {
    padding: 1rem 1.25rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 20%),
        transparent;
}

.app-inbox-message-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    max-width: 42rem;
}

.app-inbox-message {
    display: flex;
}

.app-inbox-message--mine {
    justify-content: flex-end;
}

.app-inbox-message-bubble {
    max-width: min(100%, 30rem);
    padding: 0.95rem 1rem;
    border-radius: 1.2rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.05);
}

.app-inbox-message--mine .app-inbox-message-bubble {
    border-color: rgba(88, 204, 2, 0.24);
    background: linear-gradient(180deg, rgba(88, 204, 2, 0.16), rgba(88, 204, 2, 0.12));
}

.dark .app-inbox-message-bubble {
    border-color: rgba(74, 85, 104, 0.36);
    background: rgba(15, 23, 42, 0.44);
    box-shadow: 0 18px 32px rgba(2, 6, 23, 0.2);
}

.dark .app-inbox-message--mine .app-inbox-message-bubble {
    border-color: rgba(88, 204, 2, 0.28);
    background: rgba(22, 101, 52, 0.26);
}

.app-inbox-message-content {
    margin: 0;
    white-space: pre-wrap;
    color: #0f172a;
}

.dark .app-inbox-message-content {
    color: #f8fafc;
}

.app-inbox-message-sender {
    margin: 0 0 0.32rem;
    font-size: 0.72rem;
    font-weight: 800;
    color: #2f7d1f;
}

.dark .app-inbox-message-sender {
    color: #9cf06b;
}

.app-inbox-message-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.45rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
}

.dark .app-inbox-message-meta {
    color: #94a3b8;
}

.app-inbox-message-read {
    color: #64748b;
}

.app-inbox-message-read--seen {
    color: #2f7d1f;
    font-weight: 700;
}

.dark .app-inbox-message-read {
    color: #94a3b8;
}

.dark .app-inbox-message-read--seen {
    color: #b7f27d;
}

.app-inbox-composer {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    padding: 1rem 1.25rem 1.15rem;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.dark .app-inbox-composer {
    border-top-color: rgba(74, 85, 104, 0.3);
    background: rgba(15, 23, 42, 0.22);
}

.app-inbox-composer-input {
    min-height: 4.35rem;
    resize: none;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0.9rem 1rem 0.4rem !important;
}

.app-inbox-composer-shell {
    display: grid;
    gap: 0;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 1.35rem;
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.08), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(247, 252, 249, 0.9));
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.dark .app-inbox-composer-shell {
    border-color: rgba(74, 85, 104, 0.32);
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.12), transparent 30%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(12, 35, 41, 0.9));
    box-shadow: 0 22px 38px rgba(2, 6, 23, 0.22);
}

.app-inbox-composer-editor {
    min-height: 0;
}

.app-inbox-composer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.62rem 0.78rem 0.78rem;
}

.app-inbox-composer-context {
    min-width: 0;
    flex: 1 1 auto;
}

.app-inbox-composer-target {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    border-radius: 999px;
    padding: 0.42rem 0.72rem;
    background: rgba(148, 163, 184, 0.12);
    color: #475569;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dark .app-inbox-composer-target {
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
}

.app-inbox-send-button {
    min-width: 0;
    width: 2.6rem;
    height: 2.6rem;
    padding: 0;
    gap: 0;
    border-radius: 999px;
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.34);
    color: #475569;
    box-shadow: none;
    flex-shrink: 0;
}

.app-inbox-send-button:hover:not(:disabled) {
    border-color: rgba(88, 204, 2, 0.24);
    background: rgba(88, 204, 2, 0.1);
    color: #2f7d1f;
    box-shadow: none;
}

.dark .app-inbox-send-button {
    border-color: rgba(74, 85, 104, 0.32);
    background: rgba(15, 23, 42, 0.26);
    color: #cbd5e1;
}

.dark .app-inbox-send-button:hover:not(:disabled) {
    border-color: rgba(88, 204, 2, 0.3);
    background: rgba(88, 204, 2, 0.12);
    color: #bef264;
}

.app-inbox-composer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.72rem;
}

.app-inbox-composer-count {
    font-size: 0.74rem;
    font-weight: 700;
    color: #64748b;
}

.dark .app-inbox-composer-count {
    color: #94a3b8;
}

.app-inbox-composer-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.8rem;
}

.app-inbox-empty-state,
.app-inbox-thread-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 100%;
    padding: 2rem 1.5rem;
    text-align: center;
    color: #64748b;
}

.dark .app-inbox-empty-state,
.dark .app-inbox-thread-placeholder {
    color: #94a3b8;
}

.app-inbox-empty-state i {
    font-size: 1.35rem;
}

.app-challenge-live-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin-bottom: 1rem;
    padding: 0.72rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(28, 176, 246, 0.18);
    background: rgba(28, 176, 246, 0.08);
    color: #136b96;
    font-size: 0.82rem;
    font-weight: 800;
    text-align: center;
}

.dark .app-challenge-live-status {
    border-color: rgba(28, 176, 246, 0.26);
    background: rgba(28, 176, 246, 0.14);
    color: #93c5fd;
}

.app-discover-challenge-card,
.app-discover-pending-card,
.app-discover-learner-card,
.app-discover-feed-card {
    position: relative;
    overflow: hidden;
}

.app-discover-challenge-card::after,
.app-discover-pending-card::after,
.app-discover-feed-card::after {
    content: none;
}

.app-discover-learner-card::after {
    content: none;
}

.app-discover-card-kicker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.95rem;
}

.app-discover-card-kicker,
.app-discover-card-meta {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.38rem 0.72rem;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.app-discover-card-kicker {
    color: #2f7d1f;
    background: rgba(88, 204, 2, 0.12);
}

.app-discover-card-kicker--danger {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.11);
}

.app-discover-card-kicker--purple {
    color: #7c3aed;
    background: rgba(158, 96, 244, 0.11);
}

.app-discover-card-kicker--soft {
    color: #136b96;
    background: rgba(28, 176, 246, 0.11);
}

.app-discover-card-meta {
    color: #64748b;
    background: rgba(148, 163, 184, 0.12);
}

.dark .app-discover-card-kicker {
    color: #b7f27d;
    background: rgba(88, 204, 2, 0.18);
}

.dark .app-discover-card-kicker--danger {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.16);
}

.dark .app-discover-card-kicker--purple {
    color: #d8b4fe;
    background: rgba(158, 96, 244, 0.18);
}

.dark .app-discover-card-kicker--soft {
    color: #93c5fd;
    background: rgba(28, 176, 246, 0.18);
}

.dark .app-discover-card-meta {
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.16);
}

.app-discover-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.app-discover-card-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    padding: 0.5rem 0.78rem;
    border: 1px solid rgba(191, 219, 205, 0.62);
    background: rgba(255, 255, 255, 0.22);
    color: #334155;
    font-size: 0.79rem;
    font-weight: 700;
    white-space: nowrap;
}

.app-discover-card-stat i {
    color: #1cb0f6;
}

.dark .app-discover-card-stat {
    border-color: rgba(74, 85, 104, 0.56);
    background: rgba(15, 23, 42, 0.22);
    color: #e2e8f0;
}

.app-discover-pending-card .app-button:disabled {
    opacity: 0.72;
}

.app-discover-learner-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.18rem;
}

.app-discover-learner-xp {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.26rem 0.56rem;
    background: rgba(28, 176, 246, 0.1);
    color: #136b96;
    font-size: 0.73rem;
    font-weight: 800;
    line-height: 1;
}

.dark .app-discover-learner-xp {
    background: rgba(28, 176, 246, 0.18);
    color: #93c5fd;
}

.app-discover-learner-card .app-user-summary-metrics {
    margin-top: 0.8rem;
    padding: 0.95rem 0.3rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.dark .app-discover-learner-card .app-user-summary-metrics {
    background: rgba(15, 23, 42, 0.14);
}

.app-discover-feed-launcher {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
    border-color: rgba(226, 232, 240, 0.88);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.96));
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.app-discover-feed-launcher:hover {
    border-color: rgba(88, 204, 2, 0.22);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.app-discover-feed-launcher-avatar-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.9rem;
    height: 2.9rem;
    padding: 0.15rem;
    border-radius: 1rem;
    background: rgba(148, 163, 184, 0.12);
}

.app-discover-feed-launcher-avatar {
    width: 100%;
    height: 100%;
    border-radius: 0.9rem;
    object-fit: cover;
}

.app-discover-feed-launcher-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.22rem;
}

.app-discover-feed-launcher-kicker {
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.app-discover-feed-launcher-title {
    font-size: 0.96rem;
    line-height: 1.45;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-discover-feed-launcher-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 999px;
    background: rgba(88, 204, 2, 0.12);
    color: #19703a;
    font-size: 0.92rem;
    font-weight: 800;
    box-shadow: none;
    flex-shrink: 0;
}

.app-discover-feed-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1.15rem;
}

.app-discover-feed-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(88, 204, 2, 0.1);
    color: #19703a;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
}

.app-discover-feed-meta-pill--soft {
    background: rgba(28, 176, 246, 0.1);
    color: #136b96;
}

.dark .app-discover-feed-launcher-kicker {
    color: #94a3b8;
}

.dark .app-discover-feed-launcher-title {
    color: #e2e8f0;
}

.dark .app-discover-feed-launcher {
    border-color: rgba(51, 65, 85, 0.86);
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(12, 18, 30, 0.94));
}

.dark .app-discover-feed-launcher:hover {
    border-color: rgba(88, 204, 2, 0.24);
    box-shadow: 0 18px 36px rgba(2, 6, 23, 0.24);
}

.dark .app-discover-feed-launcher-avatar-wrap {
    background: rgba(71, 85, 105, 0.34);
}

.dark .app-discover-feed-launcher-action {
    background: rgba(88, 204, 2, 0.14);
    color: #bef264;
}

.dark .app-discover-feed-meta-pill {
    background: rgba(88, 204, 2, 0.16);
    color: #bef264;
}

.dark .app-discover-feed-meta-pill--soft {
    background: rgba(28, 176, 246, 0.16);
    color: #93c5fd;
}

.app-discover-feed-card {
    padding: 1.25rem 1.25rem 1.05rem;
    border-color: rgba(226, 232, 240, 0.86);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 251, 251, 0.98));
    box-shadow:
        0 20px 42px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.dark .app-discover-feed-card {
    border-color: rgba(51, 65, 85, 0.82);
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(12, 18, 30, 0.97));
    box-shadow:
        0 24px 46px rgba(2, 6, 23, 0.34),
        inset 0 1px 0 rgba(148, 163, 184, 0.05);
}

.app-discover-post-header {
    align-items: flex-start;
}

.app-discover-post-author {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    align-items: flex-start;
    gap: 0.85rem;
}

.app-discover-post-avatar {
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 1rem;
    object-fit: cover;
    flex-shrink: 0;
}

.app-discover-post-meta {
    min-width: 0;
}

.app-discover-post-time {
    margin-top: 0.18rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
}

.dark .app-discover-post-time {
    color: #94a3b8;
}

.app-discover-post-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.22rem 0.52rem;
    background: rgba(88, 204, 2, 0.12);
    color: #2f7d1f;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.dark .app-discover-post-badge {
    background: rgba(88, 204, 2, 0.16);
    color: #b7f27d;
}

.app-discover-post-badge--muted {
    background: rgba(148, 163, 184, 0.14);
    color: #475569;
}

.dark .app-discover-post-badge--muted {
    background: rgba(148, 163, 184, 0.16);
    color: #cbd5e1;
}

.app-discover-post-content {
    font-size: 0.98rem;
    line-height: 1.72;
}

.app-post-menu-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 999px;
    color: #94a3b8;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.app-post-menu-trigger:hover {
    background: rgba(148, 163, 184, 0.12);
    color: #475569;
}

.dark .app-post-menu-trigger {
    color: #94a3b8;
}

.dark .app-post-menu-trigger:hover {
    background: rgba(148, 163, 184, 0.14);
    color: #e2e8f0;
}

.app-discover-feed-card .app-post-actions {
    margin-top: 0.95rem;
    padding-top: 0.95rem;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.dark .app-discover-feed-card .app-post-actions {
    border-top-color: rgba(74, 85, 104, 0.34);
}

.app-discover-post-actions-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.app-discover-post-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-width: 2.8rem;
    height: 2.5rem;
    padding: 0 0.92rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.18);
    color: #475569;
    font-size: 0.84rem;
    font-weight: 800;
    transition:
        border-color 0.18s ease,
        background-color 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.app-discover-post-action:hover {
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(248, 250, 252, 0.7);
    color: #0f172a;
}

.app-discover-post-action--liked {
    border-color: rgba(248, 113, 113, 0.26);
    background: rgba(254, 226, 226, 0.74);
    color: #b91c1c;
}

.app-discover-post-action--comments {
    border-color: rgba(59, 130, 246, 0.22);
    background: rgba(219, 234, 254, 0.72);
    color: #1d4ed8;
}

.app-discover-post-action--bookmarked {
    border-color: rgba(28, 176, 246, 0.22);
    background: rgba(219, 234, 254, 0.72);
    color: #136b96;
}

.app-discover-post-action--bookmark {
    padding-inline: 0;
}

.dark .app-discover-post-action {
    border-color: rgba(71, 85, 105, 0.44);
    background: rgba(15, 23, 42, 0.32);
    color: #cbd5e1;
}

.dark .app-discover-post-action:hover {
    border-color: rgba(100, 116, 139, 0.56);
    background: rgba(30, 41, 59, 0.64);
    color: #f8fafc;
}

.dark .app-discover-post-action--liked {
    border-color: rgba(248, 113, 113, 0.3);
    background: rgba(127, 29, 29, 0.42);
    color: #fecaca;
}

.dark .app-discover-post-action--comments {
    border-color: rgba(96, 165, 250, 0.28);
    background: rgba(30, 58, 138, 0.3);
    color: #bfdbfe;
}

.dark .app-discover-post-action--bookmarked {
    border-color: rgba(56, 189, 248, 0.3);
    background: rgba(8, 47, 73, 0.42);
    color: #bae6fd;
}

.app-discover-comments-shell {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.dark .app-discover-comments-shell {
    border-top-color: rgba(71, 85, 105, 0.34);
}

.app-discover-comment-card {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
}

.app-discover-comment-avatar {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 0.82rem;
    object-fit: cover;
    flex-shrink: 0;
}

.app-discover-comment-bubble {
    flex: 1 1 auto;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(248, 250, 252, 0.9);
    padding: 0.75rem 0.85rem;
}

.dark .app-discover-comment-bubble {
    border-color: rgba(71, 85, 105, 0.4);
    background: rgba(15, 23, 42, 0.5);
}

.app-discover-comment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.3rem;
}

.app-discover-comment-time {
    font-size: 0.73rem;
    font-weight: 700;
    color: #94a3b8;
    white-space: nowrap;
}

.app-discover-comments-empty {
    margin-bottom: 0.8rem;
    font-size: 0.84rem;
    font-weight: 700;
    color: #94a3b8;
}

.app-discover-comment-composer {
    margin-top: 0.2rem;
}

.app-discover-comment-input-shell {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.4rem 0.35rem 0.82rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.94);
}

.dark .app-discover-comment-input-shell {
    border-color: rgba(71, 85, 105, 0.4);
    background: rgba(15, 23, 42, 0.44);
}

.app-discover-comment-input {
    min-height: 2.6rem;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.app-discover-comment-send {
    margin-left: 0;
    width: 2.4rem;
    height: 2.4rem;
    border-color: transparent;
    background: rgba(88, 204, 2, 0.12);
    color: #2f7d1f;
}

.app-discover-comment-send:hover {
    background: rgba(88, 204, 2, 0.18);
    color: #166534;
}

.dark .app-discover-comment-send {
    background: rgba(88, 204, 2, 0.16);
    color: #bef264;
}

.app-discover-feed-empty {
    overflow: hidden;
}

.app-discover-feed-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 1rem;
    border-radius: 1.25rem;
    background: rgba(88, 204, 2, 0.12);
    color: #2f7d1f;
    font-size: 1.2rem;
}

.app-discover-feed-empty-title {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 800;
    color: #0f172a;
}

.app-discover-feed-empty-copy {
    margin: 0.45rem auto 0;
    max-width: 28rem;
    color: #64748b;
}

.dark .app-discover-feed-empty-icon {
    background: rgba(88, 204, 2, 0.16);
    color: #bef264;
}

.dark .app-discover-feed-empty-title {
    color: #f8fafc;
}

.dark .app-discover-feed-empty-copy {
    color: #94a3b8;
}

@media (min-width: 1024px) {
    .app-discover-hero-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .app-discover-hero {
        padding: 1.1rem;
    }

    .app-discover-page .app-section-head {
        align-items: stretch;
    }

    .app-discover-feed-launcher {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 0.7rem;
        padding: 0.85rem 0.9rem;
    }

    .app-discover-feed-launcher-avatar-wrap {
        width: 2.45rem;
        height: 2.45rem;
        border-radius: 0.9rem;
    }

    .app-discover-feed-launcher-avatar {
        border-radius: 0.78rem;
    }

    .app-discover-feed-launcher-kicker {
        font-size: 0.64rem;
    }

    .app-discover-feed-launcher-title {
        font-size: 0.88rem;
    }

    .app-discover-feed-launcher-action {
        width: 2.2rem;
        height: 2.2rem;
        font-size: 0.82rem;
        justify-self: end;
    }

    .app-discover-post-header {
        gap: 0.65rem;
    }

    .app-discover-post-actions {
        align-items: stretch;
        gap: 0.75rem;
    }

    .app-discover-post-actions-group {
        flex: 1 1 auto;
        gap: 0.55rem;
    }

    .app-discover-post-action {
        height: 2.35rem;
        padding-inline: 0.82rem;
    }

    .app-discover-comment-input-shell {
        border-radius: 1.1rem;
    }

    .app-discover-result-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 960px) {
    .app-inbox-shell {
        display: block;
        height: 100%;
    }

    .app-inbox-sidebar {
        height: 100%;
        border-right: 0;
        background: transparent;
    }

    .dark .app-inbox-sidebar {
        border-right-color: transparent;
    }

    .app-inbox-thread,
    .app-inbox-thread-shell {
        height: 100%;
    }

    .app-inbox-shell--thread-active .app-inbox-sidebar {
        display: none;
    }

    .app-inbox-shell:not(.app-inbox-shell--thread-active) .app-inbox-thread {
        display: none;
    }

    .app-inbox-thread-back {
        display: inline-flex;
    }

    .app-inbox-thread-back span {
        display: none;
    }

    .app-inbox-sidebar-head,
    .app-inbox-thread-head,
    .app-inbox-composer {
        padding-inline: 1rem;
    }

    .app-inbox-sidebar-head,
    .app-inbox-thread-head {
        position: sticky;
        top: 0;
        z-index: 4;
    }

    .app-inbox-composer {
        position: sticky;
        bottom: 0;
        z-index: 4;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    }

    .app-inbox-thread-body {
        padding: 0.9rem 1rem;
    }

    .app-inbox-conversation-list {
        padding: 0.75rem;
    }

    .app-inbox-conversation {
        padding: 0.82rem;
    }

    .app-inbox-message-bubble {
        max-width: min(100%, 24rem);
    }

    .app-inbox-message-list {
        max-width: none;
    }

    .app-inbox-composer {
        padding-inline: 0.85rem;
    }

    .app-inbox-composer-footer {
        gap: 0.55rem;
        padding: 0.56rem 0.68rem 0.68rem;
    }

    .app-inbox-send-button {
        width: 2.5rem;
        height: 2.5rem;
    }
}

@media (min-width: 768px) {
    .app-inbox-send-button {
        width: 2.7rem;
        height: 2.7rem;
    }
}

.app-inbox-modal {
    display: flex;
    flex-direction: column;
    min-height: min(88vh, 52rem);
    border-radius: 1.75rem !important;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.96)) !important;
    box-shadow: 0 32px 90px rgba(15, 23, 42, 0.2);
}

.dark .app-inbox-modal {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.96)) !important;
    box-shadow: 0 34px 96px rgba(2, 6, 23, 0.42);
}

.app-inbox-shell {
    display: grid;
    grid-template-columns: minmax(20rem, 22rem) minmax(0, 1fr);
    flex: 1 1 auto;
    min-height: 0;
}

.app-inbox-sidebar,
.app-inbox-thread,
.app-inbox-thread-shell {
    min-height: 0;
}

.app-inbox-sidebar {
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.72);
}

.dark .app-inbox-sidebar {
    border-right-color: rgba(71, 85, 105, 0.34);
    background: rgba(15, 23, 42, 0.76);
}

.app-inbox-sidebar-head,
.app-inbox-thread-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.25rem 1rem;
    border-bottom: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.app-inbox-profile {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.app-inbox-profile-avatar-shell,
.app-inbox-thread-avatar-shell,
.app-inbox-conversation-avatar-shell {
    position: relative;
    flex-shrink: 0;
}

.app-inbox-profile-avatar {
    width: 3.35rem;
    height: 3.35rem;
    border-radius: 1.05rem;
    object-fit: cover;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.app-inbox-profile-indicator,
.app-inbox-thread-status-dot,
.app-inbox-conversation-status {
    position: absolute;
    right: -0.04rem;
    bottom: -0.04rem;
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.96);
    background: rgba(148, 163, 184, 0.35);
}

.app-inbox-profile-indicator {
    background: #58cc02;
}

.app-inbox-thread-status-dot--typing,
.app-inbox-conversation-status--active {
    background: #58cc02;
}

.dark .app-inbox-profile-indicator,
.dark .app-inbox-thread-status-dot,
.dark .app-inbox-conversation-status {
    border-color: rgba(15, 23, 42, 0.95);
}

.app-inbox-profile-copy {
    min-width: 0;
}

.app-inbox-profile-name {
    margin: 0.12rem 0 0;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
}

.app-inbox-profile-role {
    margin: 0.16rem 0 0;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.4;
}

.dark .app-inbox-profile-name {
    color: #f8fafc;
}

.dark .app-inbox-profile-role {
    color: #94a3b8;
}

.app-inbox-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 0;
    border-radius: 999px;
    padding: 0.3rem 0.62rem;
    background: rgba(88, 204, 2, 0.12);
    color: #1f7a3a;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dark .app-inbox-kicker {
    background: rgba(88, 204, 2, 0.16);
    color: #bef264;
}

.app-inbox-toolbar-button {
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.72);
    color: #475569;
}

.app-inbox-toolbar-button:hover {
    background: rgba(240, 249, 255, 0.92);
    color: #0f172a;
}

.dark .app-inbox-toolbar-button {
    border-color: rgba(71, 85, 105, 0.32);
    background: rgba(15, 23, 42, 0.8);
    color: #cbd5e1;
}

.dark .app-inbox-toolbar-button:hover {
    background: rgba(12, 74, 110, 0.4);
    color: #f8fafc;
}

.app-inbox-sidebar-toolbar {
    display: grid;
    gap: 0.8rem;
    padding: 0 1.25rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.dark .app-inbox-sidebar-toolbar {
    border-bottom-color: rgba(71, 85, 105, 0.28);
}

.app-inbox-search {
    position: relative;
}

.app-inbox-search-icon {
    position: absolute;
    top: 50%;
    left: 0.95rem;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.85rem;
}

.app-inbox-search-input {
    border-radius: 1rem !important;
    border: 1px solid rgba(148, 163, 184, 0.14) !important;
    background: rgba(255, 255, 255, 0.88) !important;
    padding: 0.82rem 0.95rem 0.82rem 2.6rem !important;
    box-shadow: none !important;
}

.app-inbox-search-input:focus {
    border-color: rgba(28, 176, 246, 0.24) !important;
    background: rgba(255, 255, 255, 0.96) !important;
}

.dark .app-inbox-search-input {
    border-color: rgba(71, 85, 105, 0.32) !important;
    background: rgba(15, 23, 42, 0.86) !important;
}

.dark .app-inbox-search-input:focus {
    border-color: rgba(56, 189, 248, 0.28) !important;
    background: rgba(15, 23, 42, 0.92) !important;
}

.app-inbox-sidebar-body,
.app-inbox-thread-body {
    min-height: 0;
    overflow-y: auto;
}

.app-inbox-conversation-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.8rem 0.85rem 1rem;
}

.app-inbox-conversation {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    padding: 0.85rem 0.9rem;
    text-align: left;
    border-radius: 1.15rem;
    border: 1px solid transparent;
    background: transparent;
    box-shadow: none;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.app-inbox-conversation:hover,
.app-inbox-conversation--active {
    transform: translateY(-1px);
    border-color: rgba(148, 163, 184, 0.12);
    background: rgba(255, 255, 255, 0.88);
}

.dark .app-inbox-conversation:hover,
.dark .app-inbox-conversation--active {
    border-color: rgba(71, 85, 105, 0.32);
    background: rgba(15, 23, 42, 0.88);
}

.app-inbox-conversation-avatar,
.app-inbox-thread-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    object-fit: cover;
    flex-shrink: 0;
}

.app-inbox-thread-avatar {
    width: 3.25rem;
    height: 3.25rem;
}

.app-inbox-conversation-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.app-inbox-conversation-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.7rem;
}

.app-inbox-conversation-name,
.app-inbox-thread-title {
    margin: 0;
    font-size: 0.97rem;
    font-weight: 800;
    line-height: 1.25;
    color: #0f172a;
}

.dark .app-inbox-conversation-name,
.dark .app-inbox-thread-title {
    color: #f8fafc;
}

.app-inbox-conversation-time {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
}

.dark .app-inbox-conversation-time {
    color: #94a3b8;
}

.app-inbox-conversation-preview {
    margin: 0.28rem 0 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dark .app-inbox-conversation-preview {
    color: #94a3b8;
}

.app-inbox-conversation-preview--typing {
    color: #2f7d1f;
    font-weight: 700;
}

.dark .app-inbox-conversation-preview--typing {
    color: #b7f27d;
}

.app-inbox-conversation-preview--unread {
    color: #0f172a;
    font-weight: 700;
}

.dark .app-inbox-conversation-preview--unread {
    color: #f8fafc;
}

.app-inbox-conversation-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

.app-inbox-conversation-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.38rem;
    border-radius: 999px;
    background: rgba(88, 204, 2, 0.14);
    color: #1f7a3a;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
}

.dark .app-inbox-conversation-badge {
    background: rgba(88, 204, 2, 0.18);
    color: #bef264;
}

.app-inbox-thread {
    display: flex;
    flex-direction: column;
    background: rgba(247, 250, 252, 0.64);
}

.dark .app-inbox-thread {
    background: rgba(2, 6, 23, 0.3);
}

.app-inbox-thread-shell {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.app-inbox-thread-identity {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.app-inbox-thread-kicker {
    margin: 0 0 0.16rem;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.dark .app-inbox-thread-kicker {
    color: #94a3b8;
}

.app-inbox-thread-back {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-width: 2.45rem;
    height: 2.45rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.8);
    color: #0f172a;
    flex-shrink: 0;
    padding-inline: 0.75rem;
}

.dark .app-inbox-thread-back {
    border-color: rgba(71, 85, 105, 0.32);
    background: rgba(15, 23, 42, 0.84);
    color: #f8fafc;
}

.app-inbox-thread-copy {
    min-width: 0;
}

.app-inbox-thread-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem 0.65rem;
    margin-top: 0.25rem;
}

.app-inbox-thread-count {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.28rem 0.62rem;
    background: rgba(88, 204, 2, 0.1);
    color: #1f7a3a;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

.dark .app-inbox-thread-count {
    background: rgba(88, 204, 2, 0.14);
    color: #bef264;
}

.app-inbox-thread-status--typing {
    color: #2f7d1f !important;
    font-weight: 700;
}

.dark .app-inbox-thread-status--typing {
    color: #b7f27d !important;
}

.app-inbox-thread-actions {
    flex-shrink: 0;
}

.app-inbox-thread-body {
    flex: 1 1 auto;
    padding: 1rem 1.35rem 0;
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.08), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 22%);
}

.dark .app-inbox-thread-body {
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.18), transparent 24%);
}

.app-inbox-message-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-width: none;
    padding-bottom: 1rem;
}

.app-inbox-message-day {
    display: flex;
    justify-content: center;
    margin-bottom: 0.15rem;
}

.app-inbox-message-day span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.34rem 0.72rem;
    background: rgba(255, 255, 255, 0.82);
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
}

.dark .app-inbox-message-day span {
    background: rgba(15, 23, 42, 0.82);
    color: #94a3b8;
}

.app-inbox-message {
    display: flex;
    align-items: flex-end;
    gap: 0.7rem;
}

.app-inbox-message--mine {
    flex-direction: row-reverse;
}

.app-inbox-message-avatar {
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 0.95rem;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.app-inbox-message-stack {
    display: grid;
    gap: 0.3rem;
    max-width: min(100%, 34rem);
}

.app-inbox-message--mine .app-inbox-message-stack {
    justify-items: end;
}

.app-inbox-message-bubble {
    max-width: 100%;
    padding: 0.86rem 0.95rem;
    border-radius: 1.2rem 1.2rem 1.2rem 0.35rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.app-inbox-message--mine .app-inbox-message-bubble {
    border-radius: 1.2rem 1.2rem 0.35rem 1.2rem;
    border-color: rgba(88, 204, 2, 0.22);
    background: linear-gradient(180deg, rgba(88, 204, 2, 0.2), rgba(88, 204, 2, 0.14));
}

.dark .app-inbox-message-bubble {
    border-color: rgba(71, 85, 105, 0.32);
    background: rgba(15, 23, 42, 0.86);
    box-shadow: 0 18px 34px rgba(2, 6, 23, 0.24);
}

.dark .app-inbox-message--mine .app-inbox-message-bubble {
    border-color: rgba(88, 204, 2, 0.26);
    background: rgba(22, 101, 52, 0.3);
}

.app-inbox-message-content {
    margin: 0;
    white-space: pre-wrap;
    color: #0f172a;
    line-height: 1.55;
}

.dark .app-inbox-message-content {
    color: #f8fafc;
}

.app-inbox-message-sender {
    margin: 0 0 0.32rem;
    font-size: 0.72rem;
    font-weight: 800;
    color: #2f7d1f;
}

.dark .app-inbox-message-sender {
    color: #9cf06b;
}

.app-inbox-message-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
    padding-inline: 0.15rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
}

.app-inbox-message-meta--mine {
    justify-content: flex-end;
}

.dark .app-inbox-message-meta {
    color: #94a3b8;
}

.app-inbox-message-read {
    color: #64748b;
}

.app-inbox-message-read--seen {
    color: #2f7d1f;
    font-weight: 700;
}

.dark .app-inbox-message-read {
    color: #94a3b8;
}

.dark .app-inbox-message-read--seen {
    color: #b7f27d;
}

.app-inbox-composer {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    padding: 1rem 1.35rem 1.2rem;
    background: rgba(255, 255, 255, 0.56);
}

.dark .app-inbox-composer {
    border-top-color: rgba(71, 85, 105, 0.28);
    background: rgba(15, 23, 42, 0.56);
}

.app-inbox-composer-shell {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: end;
    gap: 0.65rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 1.35rem;
    background: rgba(255, 255, 255, 0.92);
    padding: 0.55rem 0.6rem 0.55rem 0.7rem;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.dark .app-inbox-composer-shell {
    border-color: rgba(71, 85, 105, 0.3);
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 22px 40px rgba(2, 6, 23, 0.24);
}

.app-inbox-composer-icon {
    display: grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.9rem;
    background: rgba(148, 163, 184, 0.1);
    color: #64748b;
}

.dark .app-inbox-composer-icon {
    background: rgba(71, 85, 105, 0.34);
    color: #cbd5e1;
}

.app-inbox-composer-editor {
    min-height: 0;
}

.app-inbox-composer-input {
    min-height: 2.8rem;
    max-height: 9rem;
    resize: none;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0.5rem 0 0.45rem !important;
}

.app-inbox-send-button {
    min-width: 0;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    gap: 0;
    border: 0;
    border-radius: 1rem;
    background: linear-gradient(135deg, #58cc02, #1cb0f6);
    color: #fff;
    box-shadow: 0 16px 28px rgba(28, 176, 246, 0.28);
    flex-shrink: 0;
}

.app-inbox-send-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(28, 176, 246, 0.34);
}

.app-inbox-send-button:disabled {
    background: rgba(148, 163, 184, 0.4);
    color: rgba(255, 255, 255, 0.84);
    box-shadow: none;
}

.dark .app-inbox-send-button:disabled {
    background: rgba(71, 85, 105, 0.52);
}

.app-inbox-composer-helper {
    margin: 0.5rem 0.2rem 0;
    color: #64748b;
    font-size: 0.72rem;
    line-height: 1.4;
}

.dark .app-inbox-composer-helper {
    color: #94a3b8;
}

.app-inbox-empty-state,
.app-inbox-thread-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 100%;
    padding: 2rem 1.5rem;
    text-align: center;
    color: #64748b;
}

.dark .app-inbox-empty-state,
.dark .app-inbox-thread-placeholder {
    color: #94a3b8;
}

.app-inbox-empty-state i {
    font-size: 1.35rem;
}

@media (max-width: 960px) {
    .app-inbox-modal {
        min-height: min(92vh, 52rem);
        border-radius: 1.4rem !important;
    }

    .app-inbox-shell {
        display: block;
        height: 100%;
    }

    .app-inbox-sidebar {
        height: 100%;
        border-right: 0;
    }

    .app-inbox-thread,
    .app-inbox-thread-shell {
        height: 100%;
    }

    .app-inbox-shell--thread-active .app-inbox-sidebar {
        display: none;
    }

    .app-inbox-shell:not(.app-inbox-shell--thread-active) .app-inbox-thread {
        display: none;
    }

    .app-inbox-thread-back {
        display: inline-flex;
    }

    .app-inbox-thread-back span {
        display: none;
    }

    .app-inbox-sidebar-head,
    .app-inbox-thread-head {
        padding: 1rem 1rem 0.9rem;
    }

    .app-inbox-sidebar-toolbar {
        padding: 0 1rem 0.9rem;
    }

    .app-inbox-thread-head,
    .app-inbox-composer {
        position: sticky;
        z-index: 4;
    }

    .app-inbox-thread-head {
        top: 0;
    }

    .app-inbox-composer {
        bottom: 0;
        padding: 0.85rem;
        padding-bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
    }

    .app-inbox-thread-body {
        padding: 0.95rem 1rem 0;
    }

    .app-inbox-conversation-list {
        padding: 0.75rem;
    }

    .app-inbox-message-avatar {
        width: 2.2rem;
        height: 2.2rem;
        border-radius: 0.85rem;
    }

    .app-inbox-message-stack {
        max-width: min(100%, 22rem);
    }
}

@media (max-width: 640px) {
    .app-inbox-profile-role,
    .app-inbox-thread-kicker,
    .app-inbox-composer-helper {
        display: none;
    }

    .app-inbox-thread-actions .app-modal-close:first-child {
        display: none;
    }

    .app-inbox-thread-meta {
        gap: 0.38rem 0.55rem;
    }

    .app-inbox-thread-count {
        font-size: 0.68rem;
    }

    .app-inbox-message-bubble {
        padding: 0.8rem 0.9rem;
    }

    .app-inbox-composer-shell {
        gap: 0.55rem;
        padding: 0.45rem 0.5rem 0.45rem 0.6rem;
    }

    .app-inbox-composer-icon {
        width: 2.1rem;
        height: 2.1rem;
    }
}

.app-profile-hero-grid {
    align-items: stretch;
}

.app-profile-name-button {
    text-align: left;
    letter-spacing: -0.03em;
}

.app-profile-summary-pills {
    margin-top: 0.25rem;
}

.app-profile-sidecard {
    height: 100%;
    padding: 1rem 1.1rem;
    border-radius: 1.2rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.5);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.dark .app-profile-sidecard {
    border-color: rgba(74, 85, 104, 0.38);
    background: rgba(15, 23, 42, 0.42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.app-profile-sidecard-copy {
    margin: 0;
    line-height: 1.7;
}

.app-profile-sidecard-actions {
    padding-top: 0.35rem;
}

.app-profile-edit-grid {
    display: grid;
    gap: 1.5rem;
}

.app-profile-edit-media {
    display: grid;
    gap: 0.85rem;
    justify-items: center;
}

.app-profile-edit-avatar {
    width: 7rem;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 0;
    border-radius: 1.5rem;
    border: 1px solid rgba(191, 219, 205, 0.68);
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.14), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 252, 249, 0.9));
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
    color: #1cb0f6;
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.app-profile-edit-avatar:hover {
    transform: translateY(-2px);
    border-color: rgba(88, 204, 2, 0.42);
    box-shadow: 0 22px 42px rgba(15, 23, 42, 0.12);
}

.app-profile-edit-avatar:focus-visible {
    outline: none;
    border-color: rgba(88, 204, 2, 0.62);
    box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.18), 0 22px 42px rgba(15, 23, 42, 0.12);
}

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

.app-profile-edit-avatar-copy {
    margin: 0;
    text-align: center;
    font-size: 0.84rem;
    color: #64748b;
}

.app-profile-edit-fields {
    display: grid;
    gap: 1rem;
}

.app-profile-edit-row {
    display: grid;
    gap: 1rem;
}

.app-profile-visibility-card {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(191, 219, 205, 0.64);
    border-radius: 1.2rem;
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.1), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 252, 249, 0.84));
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
    cursor: pointer;
}

.dark .app-profile-edit-avatar {
    border-color: rgba(74, 85, 104, 0.48);
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(12, 35, 41, 0.88));
    box-shadow: 0 22px 42px rgba(2, 6, 23, 0.26);
    color: #8dddff;
}

.dark .app-profile-edit-avatar:hover {
    border-color: rgba(88, 204, 2, 0.34);
    box-shadow: 0 26px 48px rgba(2, 6, 23, 0.32);
}

.dark .app-profile-edit-avatar:focus-visible {
    box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.22), 0 26px 48px rgba(2, 6, 23, 0.32);
}

.dark .app-profile-edit-avatar-copy {
    color: #94a3b8;
}

.dark .app-profile-visibility-card {
    border-color: rgba(74, 85, 104, 0.48);
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.14), transparent 28%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.8), rgba(12, 35, 41, 0.84));
    box-shadow: 0 20px 36px rgba(2, 6, 23, 0.22);
}

@media (min-width: 768px) {
    .app-profile-edit-grid {
        grid-template-columns: minmax(8rem, 9.5rem) minmax(0, 1fr);
        align-items: start;
    }

    .app-profile-edit-media {
        justify-items: start;
    }

    .app-profile-edit-avatar-copy {
        text-align: left;
    }

    .app-profile-edit-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.app-leaderboard-page-hero {
    display: grid;
    justify-items: center;
    gap: 0.8rem;
}

@media (min-width: 1024px) {
    .app-home-hero-grid {
        grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 24rem);
    }
}

/* Light theme premium refinement */
body.app-shell:not(.dark) {
    --app-polish-surface-top: rgba(255, 255, 255, 0.975);
    --app-polish-surface-bottom: rgba(248, 252, 249, 0.955);
    --app-polish-surface-accent: rgba(28, 176, 246, 0.15);
    --app-polish-border: rgba(191, 219, 205, 0.72);
    --app-polish-border-strong: rgba(88, 204, 2, 0.36);
    --app-polish-shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.09), 0 4px 12px rgba(15, 23, 42, 0.05);
    --app-polish-shadow-medium: 0 28px 64px rgba(15, 23, 42, 0.14), 0 10px 24px rgba(15, 23, 42, 0.07);
    --app-polish-shadow-strong: 0 38px 88px rgba(15, 23, 42, 0.18), 0 16px 34px rgba(15, 23, 42, 0.09);
    --app-polish-active-wash: rgba(88, 204, 2, 0.14);
    background:
        radial-gradient(circle at 8% 0%, rgba(88, 204, 2, 0.2), transparent 32%),
        radial-gradient(circle at 92% 10%, rgba(28, 176, 246, 0.18), transparent 28%),
        radial-gradient(circle at 55% 100%, rgba(158, 96, 244, 0.08), transparent 32%),
        linear-gradient(180deg, #fdfffb 0%, #f4faf4 44%, #edf4f8 100%);
}

body.app-shell:not(.dark)::before {
    width: 24rem;
    height: 24rem;
    top: 3.75rem;
    right: -4rem;
    opacity: 1;
    background: radial-gradient(circle, rgba(28, 176, 246, 0.2) 0%, rgba(28, 176, 246, 0.06) 56%, transparent 74%);
}

body.app-shell:not(.dark)::after {
    width: 20rem;
    height: 20rem;
    left: -3rem;
    bottom: 7rem;
    opacity: 0.96;
    background: radial-gradient(circle, rgba(88, 204, 2, 0.17) 0%, rgba(88, 204, 2, 0.05) 56%, transparent 74%);
}

body.app-shell:not(.dark) .app-shell-header {
    border-bottom-color: rgba(191, 219, 205, 0.82) !important;
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 252, 248, 0.94)) !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.09), 0 4px 14px rgba(15, 23, 42, 0.04) !important;
}

body.app-shell:not(.dark) .app-shell-nav {
    border-top-color: rgba(191, 219, 205, 0.82) !important;
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.14), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 252, 248, 0.94)) !important;
    box-shadow: 0 -16px 40px rgba(15, 23, 42, 0.12), 0 -4px 14px rgba(15, 23, 42, 0.05) !important;
}

body.app-shell:not(.dark) .app-panel:not(.bg-gradient-to-r),
body.app-shell:not(.dark) .auth-card,
body.app-shell:not(.dark) .subject-card,
body.app-shell:not(.dark) .challenge-card,
body.app-shell:not(.dark) .post-card,
body.app-shell:not(.dark) .leaderboard-card:not(.app-leaderboard-entry),
body.app-shell:not(.dark) .stats-card,
body.app-shell:not(.dark) .pricing-card:not(.pro),
body.app-shell:not(.dark) .dropdown-content,
body.app-shell:not(.dark) .app-modal-panel {
    border-color: rgba(191, 219, 205, 0.72) !important;
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.14), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.975), rgba(248, 252, 249, 0.955)) !important;
}

body.app-shell:not(.dark) .app-panel:not(.bg-gradient-to-r),
body.app-shell:not(.dark) .auth-card,
body.app-shell:not(.dark) .subject-card,
body.app-shell:not(.dark) .challenge-card,
body.app-shell:not(.dark) .post-card,
body.app-shell:not(.dark) .leaderboard-card:not(.app-leaderboard-entry),
body.app-shell:not(.dark) .stats-card,
body.app-shell:not(.dark) .pricing-card:not(.pro),
body.app-shell:not(.dark) .dropdown-content {
    box-shadow: var(--app-polish-shadow-soft) !important;
}

body.app-shell:not(.dark) .app-panel-hero,
body.app-shell:not(.dark) .app-auth-panel,
body.app-shell:not(.dark) .app-home-progress-card,
body.app-shell:not(.dark) .app-profile-sidecard,
body.app-shell:not(.dark) .app-modal-panel {
    box-shadow: var(--app-polish-shadow-medium) !important;
}

body.app-shell:not(.dark) .app-home-progress-card,
body.app-shell:not(.dark) .app-profile-sidecard,
body.app-shell:not(.dark) .app-profile-bio-lead {
    border-color: rgba(191, 219, 205, 0.74) !important;
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.14), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 252, 249, 0.92)) !important;
}

body.app-shell:not(.dark) .app-stat-pill {
    border-color: rgba(255, 255, 255, 0.88);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

body.app-shell:not(.dark) .app-icon-button,
body.app-shell:not(.dark) .app-input,
body.app-shell:not(.dark) input:not([type='checkbox']):not([type='radio']):not([type='file']),
body.app-shell:not(.dark) textarea,
body.app-shell:not(.dark) select,
body.app-shell:not(.dark) .search-bar,
body.app-shell:not(.dark) .bg-ziva-gray,
body.app-shell:not(.dark) .app-button--secondary {
    border-color: rgba(191, 219, 205, 0.72) !important;
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(247, 252, 249, 0.94)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62), 0 10px 24px rgba(15, 23, 42, 0.06) !important;
}

body.app-shell:not(.dark) .app-input:focus,
body.app-shell:not(.dark) input:not([type='checkbox']):not([type='radio']):not([type='file']):focus,
body.app-shell:not(.dark) textarea:focus,
body.app-shell:not(.dark) select:focus,
body.app-shell:not(.dark) .search-bar:focus,
body.app-shell:not(.dark) .app-button--secondary:hover:not(:disabled),
body.app-shell:not(.dark) .app-icon-button:hover {
    border-color: rgba(88, 204, 2, 0.42) !important;
    box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.13), 0 16px 34px rgba(15, 23, 42, 0.08) !important;
}

body.app-shell:not(.dark) .app-home-hero-kicker,
body.app-shell:not(.dark) .app-profile-eyebrow,
body.app-shell:not(.dark) .app-profile-level-chip {
    border-color: rgba(191, 219, 205, 0.78) !important;
    background: rgba(255, 255, 255, 0.82) !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

body.app-shell:not(.dark) .app-home-hero-title,
body.app-shell:not(.dark) .app-page-hero h1,
body.app-shell:not(.dark) .app-page-hero h2,
body.app-shell:not(.dark) .app-profile-name,
body.app-shell:not(.dark) .app-panel-title,
body.app-shell:not(.dark) .app-section-title,
body.app-shell:not(.dark) .app-home-progress-title {
    color: #142132;
}

body.app-shell:not(.dark) .app-home-hero-description,
body.app-shell:not(.dark) .app-panel-subtitle,
body.app-shell:not(.dark) .app-section-description,
body.app-shell:not(.dark) .app-muted-meta,
body.app-shell:not(.dark) .app-profile-sidecard-copy,
body.app-shell:not(.dark) .app-profile-activity-detail {
    color: #475569;
}

body.app-shell:not(.dark) .app-profile-activity-body,
body.app-shell:not(.dark) .app-profile-activity-empty {
    border-color: rgba(191, 219, 205, 0.7);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
}

body.app-shell:not(.dark) .app-leaderboard-time-menu {
    box-shadow: 0 28px 56px rgba(15, 23, 42, 0.16), 0 12px 26px rgba(15, 23, 42, 0.08) !important;
}

.app-onboarding-view {
    background: transparent !important;
    overflow-x: clip;
}

.app-welcome-view {
    min-height: 100dvh;
    min-height: 100svh;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.75rem;
    padding-top: max(1.25rem, env(safe-area-inset-top, 0px));
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}

.app-welcome-hero {
    width: min(100%, 36rem);
    margin-inline: auto;
}

.app-welcome-logo {
    box-shadow: 0 28px 54px rgba(70, 163, 2, 0.24);
}

.app-welcome-logo .app-duotone-icon {
    font-size: clamp(3.2rem, 2.6rem + 1.6vw, 4rem);
    line-height: 1;
}

.app-welcome-logo .app-duotone-icon .svg-inline--fa,
.app-welcome-logo .app-duotone-icon svg,
.app-welcome-logo .app-duotone-icon i {
    width: 1em;
    height: 1em;
}

.app-welcome-logo .app-duotone-icon__secondary {
    transform: translate(0.08em, 0.08em) scale(1.02);
}

.app-welcome-title {
    display: inline-flex;
    align-items: baseline;
    gap: 0.08em;
    font-size: clamp(2.3rem, 1.2rem + 4.6vw, 3.7rem);
    line-height: 0.98;
}

.app-welcome-typed-word {
    min-width: 0.2em;
}

.app-welcome-cursor {
    display: inline-block;
    width: 0.12em;
    height: 0.95em;
    margin-left: 0.02em;
    border-radius: 999px;
    background: #58cc02;
    animation: appTypingCursorBlink 1s steps(1, end) infinite;
}

.dark .app-welcome-cursor {
    background: #9cf06b;
}

.app-welcome-signature-wrap {
    display: flex;
    justify-content: center;
}

.app-welcome-signature {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.8rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(191, 219, 205, 0.64);
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.12), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 252, 249, 0.78));
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.app-welcome-signature-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 1.7rem;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: rgba(88, 204, 2, 0.12);
    color: #2f8d11;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-welcome-signature-name {
    color: #526174;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dark .app-welcome-signature {
    border-color: rgba(74, 85, 104, 0.48);
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.14), transparent 30%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(12, 35, 41, 0.82));
    box-shadow: 0 22px 38px rgba(2, 6, 23, 0.26);
}

.dark .app-welcome-signature-kicker {
    background: rgba(88, 204, 2, 0.16);
    color: #9ded78;
}

.dark .app-welcome-signature-name {
    color: #a8b8cc;
}

@keyframes appTypingCursorBlink {
    0%,
    45% {
        opacity: 1;
    }
    50%,
    100% {
        opacity: 0;
    }
}

.app-onboarding-wizard {
    min-height: 100dvh;
}

.app-onboarding-shell {
    width: min(100%, 42rem);
}

.app-onboarding-header {
    border-radius: 1.5rem;
    width: min(100%, var(--app-content-width));
    margin-inline: auto;
}

.app-onboarding-progress {
    padding: 1.2rem 1.25rem;
    border: 1px solid rgba(191, 219, 205, 0.64);
    border-radius: 1.5rem;
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.13), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 252, 249, 0.9));
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.dark .app-onboarding-progress {
    border-color: rgba(74, 85, 104, 0.48);
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(12, 35, 41, 0.9));
    box-shadow: 0 24px 48px rgba(2, 6, 23, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.app-onboarding-step-dot {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 8px 20px rgba(15, 23, 42, 0.08);
}

.dark .app-onboarding-step-dot {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 24px rgba(2, 6, 23, 0.22);
}

.app-onboarding-progress-track {
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

.dark .app-onboarding-progress-track {
    box-shadow: inset 0 1px 2px rgba(2, 6, 23, 0.28);
}

.app-onboarding-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    align-items: start;
}

.app-onboarding-step {
    min-width: 0;
}

.app-onboarding-step-label {
    display: block;
    min-width: 0;
    font-size: clamp(0.72rem, 0.06vw + 0.71rem, 0.8rem);
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.app-onboarding-panel {
    box-shadow: var(--app-polish-shadow-medium) !important;
}

.app-onboarding-choice {
    position: relative;
    overflow: hidden;
    border-radius: 1.1rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.app-onboarding-choice::before {
    content: none;
}

.dark .app-onboarding-choice {
    box-shadow: 0 18px 34px rgba(2, 6, 23, 0.22);
}

.app-onboarding-choice:hover {
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.1);
}

.dark .app-onboarding-choice:hover {
    box-shadow: 0 22px 42px rgba(2, 6, 23, 0.28);
}

.app-onboarding-subject-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(191, 219, 205, 0.64);
    border-radius: 1.25rem;
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 252, 249, 0.88));
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.dark .app-onboarding-subject-toolbar {
    border-color: rgba(74, 85, 104, 0.46);
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.14), transparent 28%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(12, 35, 41, 0.86));
    box-shadow: 0 20px 38px rgba(2, 6, 23, 0.22);
}

.app-onboarding-subject-panel {
    position: relative;
    overflow: hidden;
}

.app-onboarding-subject-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(255, 200, 0, 0.1), transparent 24%),
        radial-gradient(circle at bottom right, rgba(28, 176, 246, 0.08), transparent 28%);
    pointer-events: none;
}

.app-onboarding-subject-intro {
    position: relative;
    z-index: 1;
}

.app-onboarding-subject-intro h2 {
    letter-spacing: -0.03em;
}

.app-onboarding-subject-intro p {
    max-width: 34rem;
    margin-inline: auto;
}

.app-onboarding-subject-intro-icon {
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.14);
}

.dark .app-onboarding-subject-intro-icon {
    box-shadow: 0 18px 38px rgba(245, 158, 11, 0.18);
}

.app-onboarding-subject-toolbar-copy {
    min-width: 0;
    flex: 1 1 18rem;
}

.app-onboarding-subject-toolbar-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #142132;
}

.dark .app-onboarding-subject-toolbar-title {
    color: #e2e8f0;
}

.app-onboarding-subject-toolbar-text {
    margin: 0.3rem 0 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #526174;
}

.dark .app-onboarding-subject-toolbar-text {
    color: #9fb0c7;
}

.app-onboarding-subject-toolbar-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.app-onboarding-subject-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.2rem;
    padding: 0.4rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 800;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.app-onboarding-subject-pill--count {
    color: #2f8d11;
    background: linear-gradient(135deg, rgba(88, 204, 2, 0.14), rgba(255, 255, 255, 0.86));
    border: 1px solid rgba(88, 204, 2, 0.2);
}

.dark .app-onboarding-subject-pill--count {
    color: #9ded78;
    background: linear-gradient(135deg, rgba(88, 204, 2, 0.18), rgba(15, 23, 42, 0.78));
    border-color: rgba(88, 204, 2, 0.26);
}

.app-onboarding-subject-pill--hint {
    color: #0369a1;
    background: linear-gradient(135deg, rgba(28, 176, 246, 0.12), rgba(255, 255, 255, 0.84));
    border: 1px solid rgba(28, 176, 246, 0.18);
}

.dark .app-onboarding-subject-pill--hint {
    color: #8dddff;
    background: linear-gradient(135deg, rgba(28, 176, 246, 0.18), rgba(15, 23, 42, 0.78));
    border-color: rgba(28, 176, 246, 0.24);
}

.app-onboarding-subject-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
}

.app-onboarding-subject-choice {
    display: flex;
    min-height: 11.25rem;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
    position: relative;
    overflow: hidden;
    border-width: 1px !important;
    border-radius: 1.35rem !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 249, 0.92)) !important;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.07);
}

.app-onboarding-subject-choice::after {
    content: none;
}

.app-onboarding-subject-choice-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.app-onboarding-subject-icon {
    position: relative;
    z-index: 1;
    width: 3rem !important;
    height: 3rem !important;
    border-radius: 1rem !important;
    background:
        linear-gradient(135deg, rgba(88, 204, 2, 0.12), rgba(28, 176, 246, 0.12)) !important;
    border: 1px solid rgba(191, 219, 205, 0.65);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 10px 22px rgba(15, 23, 42, 0.06);
}

.dark .app-onboarding-subject-icon {
    border-color: rgba(74, 85, 104, 0.42);
    background:
        linear-gradient(135deg, rgba(88, 204, 2, 0.16), rgba(28, 176, 246, 0.14)) !important;
}

.app-onboarding-subject-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.85rem;
    padding: 0.32rem 0.62rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(191, 219, 205, 0.7);
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.dark .app-onboarding-subject-badge {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(74, 85, 104, 0.46);
    color: #9fb0c7;
}

.app-onboarding-subject-badge--selected {
    color: #2f8d11;
    border-color: rgba(88, 204, 2, 0.26);
    background: linear-gradient(135deg, rgba(88, 204, 2, 0.14), rgba(255, 255, 255, 0.9));
}

.dark .app-onboarding-subject-badge--selected {
    color: #9ded78;
    border-color: rgba(88, 204, 2, 0.28);
    background: linear-gradient(135deg, rgba(88, 204, 2, 0.18), rgba(15, 23, 42, 0.82));
}

.app-onboarding-subject-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #58cc02, #46a302);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(88, 204, 2, 0.24);
}

.app-onboarding-subject-choice-copy {
    position: relative;
    z-index: 1;
    margin-top: 1rem;
}

.app-onboarding-subject-choice-copy h3 {
    margin: 0;
    font-size: 1.08rem;
    letter-spacing: -0.025em;
}

.app-onboarding-subject-choice-copy p {
    margin: 0.45rem 0 0;
    line-height: 1.55;
    color: #526174;
}

.dark .app-onboarding-subject-choice-copy p {
    color: #9fb0c7;
}

.app-onboarding-subject-choice-footer {
    position: relative;
    z-index: 1;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(191, 219, 205, 0.54);
}

.dark .app-onboarding-subject-choice-footer {
    border-top-color: rgba(74, 85, 104, 0.42);
}

.app-onboarding-subject-state {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 800;
    color: #5b6b82;
}

.dark .app-onboarding-subject-state {
    color: #9fb0c7;
}

.app-onboarding-subject-choice.border-ziva-green {
    border-color: rgba(88, 204, 2, 0.46) !important;
    background:
        radial-gradient(circle at top right, rgba(88, 204, 2, 0.14), transparent 28%),
        linear-gradient(180deg, rgba(250, 255, 246, 0.98), rgba(242, 250, 243, 0.94)) !important;
    box-shadow: 0 24px 48px rgba(88, 204, 2, 0.12), 0 12px 26px rgba(15, 23, 42, 0.08);
}

.dark .app-onboarding-subject-choice.border-ziva-green {
    border-color: rgba(88, 204, 2, 0.32) !important;
    background:
        radial-gradient(circle at top right, rgba(88, 204, 2, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(19, 39, 29, 0.88), rgba(12, 35, 41, 0.9)) !important;
    box-shadow: 0 24px 50px rgba(2, 6, 23, 0.3), 0 0 0 1px rgba(88, 204, 2, 0.12);
}

.app-onboarding-subject-choice.border-ziva-green .app-onboarding-subject-state {
    color: #2f8d11;
}

.dark .app-onboarding-subject-choice.border-ziva-green .app-onboarding-subject-state {
    color: #9ded78;
}

.app-onboarding-profile-panel {
    position: relative;
    overflow: visible;
}

.app-onboarding-profile-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        radial-gradient(circle at top left, rgba(88, 204, 2, 0.08), transparent 24%),
        radial-gradient(circle at bottom right, rgba(28, 176, 246, 0.08), transparent 28%);
    pointer-events: none;
}

.app-onboarding-profile-grid {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.25rem;
    align-items: start;
}

.app-onboarding-profile-media {
    display: grid;
    gap: 1rem;
    justify-items: center;
}

.app-onboarding-avatar-preview {
    width: clamp(8.75rem, 34vw, 11rem);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(191, 219, 205, 0.68);
    border-radius: 1.5rem;
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.14), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 252, 249, 0.9));
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
    color: #1cb0f6;
    font-size: clamp(2.4rem, 7vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.app-onboarding-avatar-preview:hover {
    transform: translateY(-2px);
    border-color: rgba(88, 204, 2, 0.42);
    box-shadow: 0 22px 42px rgba(15, 23, 42, 0.12);
}

.app-onboarding-avatar-preview:focus-visible {
    outline: none;
    border-color: rgba(88, 204, 2, 0.62);
    box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.18), 0 22px 42px rgba(15, 23, 42, 0.12);
}

.app-onboarding-profile-media .app-button--block,
.app-onboarding-profile-media .app-onboarding-privacy-card {
    width: min(100%, 11rem);
}

.app-onboarding-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dark .app-onboarding-avatar-preview {
    border-color: rgba(74, 85, 104, 0.48);
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(12, 35, 41, 0.88));
    box-shadow: 0 22px 42px rgba(2, 6, 23, 0.26);
    color: #8dddff;
}

.dark .app-onboarding-avatar-preview:hover {
    border-color: rgba(88, 204, 2, 0.34);
    box-shadow: 0 26px 48px rgba(2, 6, 23, 0.32);
}

.dark .app-onboarding-avatar-preview:focus-visible {
    box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.22), 0 26px 48px rgba(2, 6, 23, 0.32);
}

.app-onboarding-privacy-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(191, 219, 205, 0.64);
    border-radius: 1.2rem;
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.1), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 252, 249, 0.84));
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.app-onboarding-privacy-card--full {
    width: 100%;
}

.dark .app-onboarding-privacy-card {
    border-color: rgba(74, 85, 104, 0.48);
    background:
        radial-gradient(circle at top right, rgba(28, 176, 246, 0.14), transparent 28%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.8), rgba(12, 35, 41, 0.84));
    box-shadow: 0 20px 36px rgba(2, 6, 23, 0.22);
}

.app-onboarding-privacy-title {
    display: block;
    font-size: 0.92rem;
    font-weight: 800;
    color: #142132;
}

.dark .app-onboarding-privacy-title {
    color: #e2e8f0;
}

.app-onboarding-privacy-copy {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.86rem;
    line-height: 1.5;
    color: #64748b;
}

.dark .app-onboarding-privacy-copy {
    color: #94a3b8;
}

.app-onboarding-checkbox {
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 0.5rem;
    border: 1.5px solid rgba(148, 163, 184, 0.7);
    background: rgba(255, 255, 255, 0.88);
    color: transparent;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.app-onboarding-checkbox i {
    font-size: 0.75rem;
}

.app-onboarding-checkbox--checked {
    border-color: rgba(88, 204, 2, 0.92);
    background: linear-gradient(135deg, rgba(88, 204, 2, 0.96), rgba(70, 163, 2, 0.96));
    color: #fff;
    box-shadow: 0 10px 20px rgba(88, 204, 2, 0.2);
}

.dark .app-onboarding-checkbox {
    border-color: rgba(100, 116, 139, 0.72);
    background: rgba(15, 23, 42, 0.88);
}

.dark .app-onboarding-checkbox--checked {
    border-color: rgba(88, 204, 2, 0.96);
    background: linear-gradient(135deg, rgba(88, 204, 2, 0.96), rgba(70, 163, 2, 0.96));
    color: #fff;
}

.app-searchable-select-flag,
.app-searchable-select-option-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.app-searchable-select-flag {
    min-width: 2.15rem;
}

.app-searchable-select-option-flag {
    min-width: 1.85rem;
}

.app-searchable-select-flag .fi {
    font-size: 1.85rem;
    line-height: 1;
}

.app-searchable-select-option-flag .fi {
    font-size: 1.55rem;
    line-height: 1;
}

.app-searchable-select-option-flag--fallback {
    color: #136b96;
}

@media (min-width: 1024px) {
    .app-onboarding-profile-grid {
        grid-template-columns: minmax(11rem, 13rem) minmax(0, 1fr);
    }

    .app-onboarding-profile-media {
        justify-items: start;
    }

    .app-onboarding-avatar-preview {
        margin-inline: 0;
    }
}

@media (max-width: 767px) {
    .app-date-picker-backdrop {
        position: fixed;
        inset: 0;
        z-index: 44;
        display: block;
        background: rgba(8, 15, 28, 0.28);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
    }

    .app-date-picker--inline .app-date-picker-backdrop {
        display: none !important;
    }

    .app-date-picker-menu {
        position: fixed;
        top: calc(env(safe-area-inset-top, 0px) + 0.9rem);
        right: 0.9rem;
        left: 0.9rem;
        width: auto;
        max-width: none;
        max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1.8rem);
        padding: 0.8rem;
        border-radius: 1.15rem;
    }

    .app-date-picker--inline .app-date-picker-menu {
        position: absolute;
        top: calc(100% + 0.6rem);
        right: 0;
        left: 0;
        width: 100%;
        max-width: none;
        max-height: min(22rem, 60dvh);
    }

    .app-date-picker-toolbar {
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 0.7rem;
        padding-bottom: 0.7rem;
    }

    .app-date-picker-toolbar-copy {
        flex-direction: column;
        gap: 0.42rem;
    }

    .app-date-picker-select,
    .app-date-picker-select--year {
        width: 100%;
        max-width: none;
        flex: 1 1 auto;
    }

    .app-date-picker-nav-button {
        width: 1.95rem;
        height: 1.95rem;
    }

    .app-date-picker-weekdays,
    .app-date-picker-grid {
        gap: 0.25rem;
    }

    .app-date-picker-weekday {
        font-size: 0.66rem;
    }

    .app-date-picker-day {
        min-height: 1.95rem;
        font-size: 0.88rem;
        border-radius: 0.75rem;
    }

    .app-onboarding-header {
        border-radius: 1.15rem;
    }

    .app-onboarding-progress {
        padding: 1rem;
    }

    .app-onboarding-steps {
        gap: 0.5rem;
    }

    .app-onboarding-step {
        flex-direction: column;
        justify-content: flex-start;
        text-align: center;
        gap: 0.45rem;
    }

    .app-onboarding-step-dot {
        margin-right: 0 !important;
        width: 2rem;
        height: 2rem;
    }

    .app-onboarding-step-label {
        font-size: 0.72rem;
    }

    .app-onboarding-subject-toolbar {
        padding: 0.95rem;
    }

    .app-onboarding-subject-toolbar-pills {
        width: 100%;
    }

    .app-onboarding-subject-badge {
        font-size: 0.68rem;
    }

    .app-onboarding-profile-grid {
        gap: 1rem;
    }
}

@media (min-width: 768px) {
    .app-onboarding-subject-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .app-notification-panel {
        position: fixed !important;
        top: calc(var(--app-header-height) + 0.55rem) !important;
        left: 1rem !important;
        right: 1rem !important;
        width: calc(100vw - 2rem) !important;
        max-width: calc(100vw - 2rem) !important;
        max-height: calc(100dvh - var(--app-header-height) - 1.35rem) !important;
        border-radius: 1.05rem !important;
        margin: 0 !important;
    }

    .app-notification-panel-head {
        padding: 0.82rem 0.82rem 0.68rem;
    }

    .app-notification-panel-body {
        padding: 0.58rem;
    }

    .app-notification-inbox-summary {
        width: calc(100% - 1.16rem);
        margin: 0.68rem 0.58rem 0;
        padding: 0.72rem 0.78rem;
    }

    .app-notification-item {
        gap: 0.7rem;
        padding: 0.82rem 0.82rem 0.82rem 0.94rem;
    }

    .app-notification-item-avatar,
    .app-notification-item-icon {
        width: 2.28rem;
        height: 2.28rem;
    }

    .app-notification-item-marker {
        left: 0.35rem;
        top: 0.82rem;
        height: calc(100% - 1.64rem);
    }
}

@keyframes app-surface-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes app-surface-rise-in {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes app-surface-scale-in {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

body.app-shell:not(.app-shell--reduced-motion) .app-shell-header,
body.app-shell:not(.app-shell--reduced-motion) .app-shell-nav,
body.app-shell:not(.app-shell--reduced-motion) .app-page-hero,
body.app-shell:not(.app-shell--reduced-motion) .app-panel-hero,
body.app-shell:not(.app-shell--reduced-motion) .app-onboarding-progress,
body.app-shell:not(.app-shell--reduced-motion) .app-onboarding-panel,
body.app-shell:not(.app-shell--reduced-motion) .app-inbox-shell,
body.app-shell:not(.app-shell--reduced-motion) .app-notification-panel {
    animation: app-surface-fade-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.app-shell:not(.app-shell--reduced-motion) .subject-card,
body.app-shell:not(.app-shell--reduced-motion) .challenge-card,
body.app-shell:not(.app-shell--reduced-motion) .post-card,
body.app-shell:not(.app-shell--reduced-motion) .stats-card,
body.app-shell:not(.app-shell--reduced-motion) .app-discover-learner-card,
body.app-shell:not(.app-shell--reduced-motion) .app-discover-pending-card,
body.app-shell:not(.app-shell--reduced-motion) .app-discover-feed-card,
body.app-shell:not(.app-shell--reduced-motion) .app-profile-activity-item,
body.app-shell:not(.app-shell--reduced-motion) .app-leaderboard-entry,
body.app-shell:not(.app-shell--reduced-motion) .app-inbox-conversation,
body.app-shell:not(.app-shell--reduced-motion) .app-notification-item,
body.app-shell:not(.app-shell--reduced-motion) .app-onboarding-choice {
    opacity: 0;
    animation: app-surface-rise-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.app-shell:not(.app-shell--reduced-motion) .subject-card:nth-child(2),
body.app-shell:not(.app-shell--reduced-motion) .challenge-card:nth-child(2),
body.app-shell:not(.app-shell--reduced-motion) .post-card:nth-child(2),
body.app-shell:not(.app-shell--reduced-motion) .stats-card:nth-child(2),
body.app-shell:not(.app-shell--reduced-motion) .app-discover-learner-card:nth-child(2),
body.app-shell:not(.app-shell--reduced-motion) .app-discover-pending-card:nth-child(2),
body.app-shell:not(.app-shell--reduced-motion) .app-discover-feed-card:nth-child(2),
body.app-shell:not(.app-shell--reduced-motion) .app-profile-activity-item:nth-child(2),
body.app-shell:not(.app-shell--reduced-motion) .app-leaderboard-entry:nth-child(2),
body.app-shell:not(.app-shell--reduced-motion) .app-inbox-conversation:nth-child(2),
body.app-shell:not(.app-shell--reduced-motion) .app-notification-item:nth-child(2),
body.app-shell:not(.app-shell--reduced-motion) .app-onboarding-choice:nth-child(2) {
    animation-delay: 0.05s;
}

body.app-shell:not(.app-shell--reduced-motion) .subject-card:nth-child(3),
body.app-shell:not(.app-shell--reduced-motion) .challenge-card:nth-child(3),
body.app-shell:not(.app-shell--reduced-motion) .post-card:nth-child(3),
body.app-shell:not(.app-shell--reduced-motion) .stats-card:nth-child(3),
body.app-shell:not(.app-shell--reduced-motion) .app-discover-learner-card:nth-child(3),
body.app-shell:not(.app-shell--reduced-motion) .app-discover-pending-card:nth-child(3),
body.app-shell:not(.app-shell--reduced-motion) .app-discover-feed-card:nth-child(3),
body.app-shell:not(.app-shell--reduced-motion) .app-profile-activity-item:nth-child(3),
body.app-shell:not(.app-shell--reduced-motion) .app-leaderboard-entry:nth-child(3),
body.app-shell:not(.app-shell--reduced-motion) .app-inbox-conversation:nth-child(3),
body.app-shell:not(.app-shell--reduced-motion) .app-notification-item:nth-child(3),
body.app-shell:not(.app-shell--reduced-motion) .app-onboarding-choice:nth-child(3) {
    animation-delay: 0.1s;
}

body.app-shell:not(.app-shell--reduced-motion) .subject-card:nth-child(4),
body.app-shell:not(.app-shell--reduced-motion) .challenge-card:nth-child(4),
body.app-shell:not(.app-shell--reduced-motion) .post-card:nth-child(4),
body.app-shell:not(.app-shell--reduced-motion) .stats-card:nth-child(4),
body.app-shell:not(.app-shell--reduced-motion) .app-discover-learner-card:nth-child(4),
body.app-shell:not(.app-shell--reduced-motion) .app-discover-pending-card:nth-child(4),
body.app-shell:not(.app-shell--reduced-motion) .app-discover-feed-card:nth-child(4),
body.app-shell:not(.app-shell--reduced-motion) .app-profile-activity-item:nth-child(4),
body.app-shell:not(.app-shell--reduced-motion) .app-leaderboard-entry:nth-child(4),
body.app-shell:not(.app-shell--reduced-motion) .app-inbox-conversation:nth-child(4),
body.app-shell:not(.app-shell--reduced-motion) .app-notification-item:nth-child(4),
body.app-shell:not(.app-shell--reduced-motion) .app-onboarding-choice:nth-child(4) {
    animation-delay: 0.15s;
}

body.app-shell:not(.app-shell--reduced-motion) .dropdown-content,
body.app-shell:not(.app-shell--reduced-motion) .app-searchable-select-menu,
body.app-shell:not(.app-shell--reduced-motion) .app-date-picker-menu {
    transform-origin: top right;
    animation: app-surface-scale-in 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.app-shell.app-shell--reduced-motion *,
body.app-shell.app-shell--reduced-motion *::before,
body.app-shell.app-shell--reduced-motion *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

/* Layered duotone-style icon treatment using the local free Font Awesome bundle. */
.app-duotone-icon {
    --app-duotone-primary: currentColor;
    --app-duotone-secondary: rgba(15, 23, 42, 0.18);
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 1.1em;
    height: 1.1em;
    line-height: 1;
    vertical-align: middle;
    color: var(--app-duotone-primary);
    flex-shrink: 0;
}

.app-duotone-icon > * {
    grid-area: 1 / 1;
}

.app-duotone-icon__secondary {
    color: var(--app-duotone-secondary);
    opacity: 0.94;
    transform: translate(0.11em, 0.09em) scale(1.05);
}

.app-duotone-icon__primary {
    color: var(--app-duotone-primary);
}

.app-duotone-icon--sm {
    font-size: 0.88rem;
}

.app-duotone-icon--md {
    font-size: 1rem;
}

.app-duotone-icon--lg {
    font-size: 1.18rem;
}

.app-duotone-icon--xl {
    font-size: 1.46rem;
}

.app-duotone-icon--current {
    --app-duotone-primary: currentColor;
    --app-duotone-secondary: currentColor;
}

.app-duotone-icon--white {
    --app-duotone-primary: #ffffff;
    --app-duotone-secondary: rgba(255, 255, 255, 0.34);
}

.app-duotone-icon--slate {
    --app-duotone-primary: #0f172a;
    --app-duotone-secondary: rgba(100, 116, 139, 0.28);
}

.app-duotone-icon--green {
    --app-duotone-primary: #2f8d11;
    --app-duotone-secondary: rgba(88, 204, 2, 0.28);
}

.app-duotone-icon--blue {
    --app-duotone-primary: #136b96;
    --app-duotone-secondary: rgba(28, 176, 246, 0.3);
}

.app-duotone-icon--gold {
    --app-duotone-primary: #b45309;
    --app-duotone-secondary: rgba(251, 191, 36, 0.32);
}

.app-duotone-icon--orange {
    --app-duotone-primary: #c2410c;
    --app-duotone-secondary: rgba(249, 115, 22, 0.32);
}

.app-duotone-icon--violet {
    --app-duotone-primary: #7c3aed;
    --app-duotone-secondary: rgba(168, 85, 247, 0.32);
}

.app-duotone-icon--red {
    --app-duotone-primary: #dc2626;
    --app-duotone-secondary: rgba(248, 113, 113, 0.32);
}

.dark .app-duotone-icon--slate {
    --app-duotone-primary: #f8fafc;
    --app-duotone-secondary: rgba(148, 163, 184, 0.3);
}

.dark .app-duotone-icon--green {
    --app-duotone-primary: #b7ff91;
}

.dark .app-duotone-icon--blue {
    --app-duotone-primary: #8dddff;
}

.dark .app-duotone-icon--gold {
    --app-duotone-primary: #fcd34d;
}

.dark .app-duotone-icon--orange {
    --app-duotone-primary: #fdba74;
}

.dark .app-duotone-icon--violet {
    --app-duotone-primary: #d8b4fe;
}

.dark .app-duotone-icon--red {
    --app-duotone-primary: #fca5a5;
}

.logo .app-duotone-icon {
    font-size: 2.3rem;
}

.app-shell-nav-link .app-duotone-icon {
    margin-bottom: 0.25rem;
}

.app-notification-pill-glyph .app-duotone-icon,
.app-notification-inbox-summary-icon .app-duotone-icon,
.app-home-hero-pill .app-duotone-icon,
.app-subject-card-badge .app-duotone-icon,
.app-subject-card-stat-label .app-duotone-icon,
.app-subject-card-footer-arrow .app-duotone-icon,
.app-discover-hero-actions .app-duotone-icon,
.app-discover-search-wrap .app-duotone-icon,
.app-profile-summary-pills .app-duotone-icon,
.app-profile-name-button .app-duotone-icon,
.badge-icon .app-duotone-icon,
.edit-overlay .app-duotone-icon,
.app-profile-activity-pill .app-duotone-icon,
.app-onboarding-panel .app-duotone-icon {
    flex-shrink: 0;
}

.app-subject-card-icon .app-duotone-icon {
    font-size: 1.55rem;
}

.app-rich-post-modal-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.app-rich-post-modal-kicker {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.38rem 0.72rem;
    background: rgba(88, 204, 2, 0.12);
    color: #19703a;
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.app-rich-post-modal-copy {
    margin: 0;
    max-width: 17rem;
    font-size: 0.92rem;
    line-height: 1.55;
    font-weight: 700;
    color: #64748b;
    text-align: right;
}

.dark .app-rich-post-modal-kicker {
    background: rgba(88, 204, 2, 0.16);
    color: #bef264;
}

.dark .app-rich-post-modal-copy {
    color: #94a3b8;
}

.app-rich-post-composer {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 1.35rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.98));
    box-shadow:
        0 20px 40px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
    overflow: hidden;
}

.dark .app-rich-post-composer {
    border-color: rgba(71, 85, 105, 0.6);
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(17, 24, 39, 0.97));
    box-shadow:
        0 24px 45px rgba(2, 6, 23, 0.42),
        inset 0 1px 0 rgba(148, 163, 184, 0.08);
}

.app-rich-post-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.75rem 0.8rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.94), rgba(255, 255, 255, 0.88));
}

.dark .app-rich-post-toolbar {
    border-bottom-color: rgba(71, 85, 105, 0.52);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.62));
}

.app-rich-post-math-row {
    display: grid;
    gap: 0.72rem;
    padding: 0.82rem 0.9rem 0.95rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(244, 247, 250, 0.92), rgba(255, 255, 255, 0.9));
}

.dark .app-rich-post-math-row {
    border-bottom-color: rgba(71, 85, 105, 0.48);
    background: linear-gradient(180deg, rgba(10, 19, 34, 0.78), rgba(15, 23, 42, 0.68));
}

.app-rich-post-math-head {
    display: grid;
    gap: 0.32rem;
}

.app-rich-post-math-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    border-radius: 999px;
    padding: 0.34rem 0.7rem;
    background: rgba(28, 176, 246, 0.1);
    color: #0f6c91;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dark .app-rich-post-math-kicker {
    background: rgba(28, 176, 246, 0.18);
    color: #8dddff;
}

.app-rich-post-math-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.app-rich-post-math-input {
    flex: 1 1 100%;
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.96);
    color: #0f172a;
    padding: 0.78rem 0.92rem;
    font-size: 0.93rem;
    line-height: 1.3;
    font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.app-rich-post-math-input::placeholder {
    color: #94a3b8;
    font-family: 'Nunito', sans-serif;
}

.app-rich-post-math-input:focus {
    outline: none;
    border-color: rgba(88, 204, 2, 0.44);
    box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.15);
}

.dark .app-rich-post-math-input {
    border-color: rgba(71, 85, 105, 0.6);
    background: rgba(15, 23, 42, 0.88);
    color: #f8fafc;
}

.dark .app-rich-post-math-input::placeholder {
    color: #64748b;
}

.dark .app-rich-post-math-input:focus {
    border-color: rgba(88, 204, 2, 0.52);
    box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.18);
}

.app-rich-post-math-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5.75rem;
    border: 1px solid rgba(88, 204, 2, 0.2);
    border-radius: 0.95rem;
    background: rgba(88, 204, 2, 0.1);
    color: #166534;
    padding: 0.74rem 0.95rem;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.app-rich-post-math-button:hover {
    background: rgba(88, 204, 2, 0.16);
    border-color: rgba(88, 204, 2, 0.3);
}

.app-rich-post-math-button--block {
    background: rgba(28, 176, 246, 0.1);
    border-color: rgba(28, 176, 246, 0.2);
    color: #0f6c91;
}

.app-rich-post-math-button--block:hover {
    background: rgba(28, 176, 246, 0.16);
    border-color: rgba(28, 176, 246, 0.3);
}

.dark .app-rich-post-math-button {
    background: rgba(88, 204, 2, 0.16);
    border-color: rgba(88, 204, 2, 0.24);
    color: #c9ffad;
}

.dark .app-rich-post-math-button:hover {
    background: rgba(88, 204, 2, 0.24);
    border-color: rgba(88, 204, 2, 0.34);
}

.dark .app-rich-post-math-button--block {
    background: rgba(28, 176, 246, 0.18);
    border-color: rgba(28, 176, 246, 0.24);
    color: #8dddff;
}

.dark .app-rich-post-math-button--block:hover {
    background: rgba(28, 176, 246, 0.26);
    border-color: rgba(28, 176, 246, 0.34);
}

.app-rich-post-toolbar-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border: 0;
    border-radius: 0.9rem;
    background: transparent;
    color: #475569;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.app-rich-post-toolbar-button:hover {
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
}

.app-rich-post-toolbar-button:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    transform: none;
}

.app-rich-post-toolbar-button--active {
    background: rgba(88, 204, 2, 0.14);
    color: #19703a;
    box-shadow: inset 0 0 0 1px rgba(88, 204, 2, 0.16);
}

.dark .app-rich-post-toolbar-button {
    color: #cbd5e1;
}

.dark .app-rich-post-toolbar-button:hover {
    background: rgba(148, 163, 184, 0.12);
    color: #f8fafc;
}

.dark .app-rich-post-toolbar-button--active {
    background: rgba(88, 204, 2, 0.18);
    color: #c9ffad;
    box-shadow: inset 0 0 0 1px rgba(88, 204, 2, 0.18);
}

.app-rich-post-editor {
    min-height: 14rem;
    position: relative;
}

.app-rich-post-editor__surface {
    min-height: 14rem;
    padding: 1rem 1.05rem 1.1rem;
    outline: none;
    position: relative;
    color: #0f172a;
    font-size: 0.98rem;
    line-height: 1.75;
    word-break: break-word;
    caret-color: #58cc02;
}

.dark .app-rich-post-editor__surface {
    color: #f8fafc;
}

.app-rich-post-editor__surface > :first-child {
    margin-top: 0;
}

.app-rich-post-editor__surface > :last-child {
    margin-bottom: 0;
}

.app-rich-post-editor__surface p {
    margin: 0;
}

.app-rich-post-editor__surface p + p,
.app-rich-post-editor__surface ul + p,
.app-rich-post-editor__surface ol + p,
.app-rich-post-editor__surface blockquote + p,
.app-rich-post-editor__surface p + ul,
.app-rich-post-editor__surface p + ol,
.app-rich-post-editor__surface p + blockquote,
.app-rich-post-editor__surface ul + ol,
.app-rich-post-editor__surface ol + ul {
    margin-top: 0.9rem;
}

.app-rich-post-editor__surface ul,
.app-rich-post-editor__surface ol,
.app-rich-post-render ul,
.app-rich-post-render ol {
    padding-left: 1.3rem;
}

.app-rich-post-editor__surface li + li,
.app-rich-post-render li + li {
    margin-top: 0.35rem;
}

.app-rich-post-editor__surface blockquote,
.app-rich-post-render blockquote {
    margin: 1rem 0;
    padding: 0.9rem 1rem;
    border-left: 4px solid rgba(88, 204, 2, 0.92);
    border-radius: 1rem;
    background: rgba(88, 204, 2, 0.08);
    color: #166534;
}

.dark .app-rich-post-editor__surface blockquote,
.dark .app-rich-post-render blockquote {
    background: rgba(88, 204, 2, 0.12);
    color: #dcfce7;
}

.app-rich-post-editor__surface h2,
.app-rich-post-render h2 {
    margin: 1.2rem 0 0.65rem;
    font-size: 1.18rem;
    line-height: 1.3;
    font-weight: 800;
    color: #0f172a;
}

.app-rich-post-editor__surface h3,
.app-rich-post-render h3 {
    margin: 1.1rem 0 0.6rem;
    font-size: 1.04rem;
    line-height: 1.35;
    font-weight: 800;
    color: #1e293b;
}

.dark .app-rich-post-editor__surface h2,
.dark .app-rich-post-render h2,
.dark .app-rich-post-editor__surface h3,
.dark .app-rich-post-render h3 {
    color: #f8fafc;
}

.app-rich-post-editor__surface a,
.app-rich-post-render a {
    color: #15803d;
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 0.16em;
    font-weight: 700;
}

.dark .app-rich-post-editor__surface a,
.dark .app-rich-post-render a {
    color: #b7ff91;
}

.app-rich-post-editor__surface code,
.app-rich-post-render code {
    font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
}

.app-rich-post-editor__surface :not(pre) > code,
.app-rich-post-render :not(pre) > code {
    padding: 0.18rem 0.45rem;
    border-radius: 0.5rem;
    background: rgba(148, 163, 184, 0.14);
    color: #0f172a;
    font-size: 0.92em;
}

.dark .app-rich-post-editor__surface :not(pre) > code,
.dark .app-rich-post-render :not(pre) > code {
    background: rgba(71, 85, 105, 0.34);
    color: #f8fafc;
}

.app-rich-post-editor__surface pre,
.app-rich-post-render pre {
    margin: 1rem 0;
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    background: #0f172a;
    color: #e2e8f0;
    overflow-x: auto;
}

.app-rich-post-editor__surface pre code,
.app-rich-post-render pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.app-rich-post-editor__surface.is-editor-empty::before {
    content: attr(data-placeholder);
    position: absolute;
    left: 1.05rem;
    top: 1rem;
    color: #94a3b8;
    pointer-events: none;
}

.dark .app-rich-post-editor__surface.is-editor-empty::before {
    color: #64748b;
}

.app-rich-post-help {
    margin-top: 0.8rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
}

.app-rich-post-math-help {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.55;
    font-weight: 700;
    color: #64748b;
}

.app-rich-post-math-help code {
    padding: 0.14rem 0.38rem;
    border-radius: 0.5rem;
    background: rgba(148, 163, 184, 0.14);
    color: #0f172a;
    font-size: 0.92em;
    font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
}

.dark .app-rich-post-help {
    color: #94a3b8;
}

.dark .app-rich-post-math-help {
    color: #94a3b8;
}

.dark .app-rich-post-math-help code {
    background: rgba(71, 85, 105, 0.36);
    color: #f8fafc;
}

.app-rich-post-media-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.95rem;
}

.app-rich-post-media-trigger,
.app-rich-post-media-remove {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 0;
    border-radius: 999px;
    padding: 0.6rem 0.95rem;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.app-rich-post-media-trigger {
    background: rgba(88, 204, 2, 0.12);
    color: #19703a;
}

.app-rich-post-media-trigger:hover {
    background: rgba(88, 204, 2, 0.18);
}

.app-rich-post-media-remove {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
}

.app-rich-post-media-remove:hover {
    background: rgba(239, 68, 68, 0.16);
}

.dark .app-rich-post-media-trigger {
    background: rgba(88, 204, 2, 0.16);
    color: #c9ffad;
}

.dark .app-rich-post-media-trigger:hover {
    background: rgba(88, 204, 2, 0.24);
}

.dark .app-rich-post-media-remove {
    background: rgba(239, 68, 68, 0.18);
    color: #fecaca;
}

.dark .app-rich-post-media-remove:hover {
    background: rgba(239, 68, 68, 0.26);
}

.app-rich-post-image-preview {
    margin-top: 0.85rem;
    overflow: hidden;
    border-radius: 1.2rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(248, 250, 252, 0.9);
}

.dark .app-rich-post-image-preview {
    border-color: rgba(71, 85, 105, 0.58);
    background: rgba(15, 23, 42, 0.72);
}

.app-rich-post-image-preview img {
    display: block;
    width: 100%;
    max-height: 18rem;
    object-fit: cover;
}

.app-rich-post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.9rem;
}

.app-rich-post-footer-meta {
    min-width: 0;
}

.app-rich-post-count {
    display: inline-flex;
    align-items: center;
    margin-top: 0.4rem;
    border-radius: 999px;
    padding: 0.32rem 0.62rem;
    background: rgba(148, 163, 184, 0.12);
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1;
}

.dark .app-rich-post-count {
    background: rgba(71, 85, 105, 0.42);
    color: #cbd5e1;
}

.app-rich-post-footer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.app-rich-post-render {
    font-size: 0.98rem;
    line-height: 1.72;
    color: inherit;
}

.app-rich-post-render > :first-child {
    margin-top: 0;
}

.app-rich-post-render > :last-child {
    margin-bottom: 0;
}

.app-rich-post-render p {
    margin: 0;
}

.app-rich-post-render p + p,
.app-rich-post-render p + ul,
.app-rich-post-render p + ol,
.app-rich-post-render p + blockquote,
.app-rich-post-render ul + p,
.app-rich-post-render ol + p,
.app-rich-post-render blockquote + p,
.app-rich-post-render pre + p {
    margin-top: 0.85rem;
}

.app-rich-post-render .katex {
    max-width: 100%;
}

.app-rich-post-render .katex-display {
    margin: 1rem 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.1rem 0.1rem 0.35rem;
}

.app-discover-post-media {
    overflow: hidden;
    border-radius: 1.35rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(248, 250, 252, 0.94);
}

.dark .app-discover-post-media {
    border-color: rgba(71, 85, 105, 0.56);
    background: rgba(15, 23, 42, 0.82);
}

.app-discover-post-image {
    display: block;
    width: 100%;
    max-height: min(26rem, 62vh);
    object-fit: cover;
}

@media (min-width: 641px) {
    .app-home-timetable-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
    }

    .app-home-timetable-overview {
        gap: 0.8rem;
    }

    .app-home-timetable-next {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    .app-home-timetable-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-home-timetable-switcher {
        display: flex;
        flex-wrap: wrap;
    }

    .app-home-timetable-switcher-button {
        width: auto;
        min-width: min(100%, 14rem);
    }

    .app-home-timetable-grid-shell {
        overflow-x: auto;
        padding-bottom: 0.35rem;
    }

    .app-home-timetable-weekdays,
    .app-home-timetable-grid {
        min-width: 40rem;
        gap: 0.5rem;
    }

    .app-home-timetable-cell {
        min-height: 0;
        padding: 0.46rem;
    }

    .app-home-timetable-cell-important-badge {
        display: none;
    }

    .app-home-timetable-cell-marker {
        display: inline-flex;
    }

    .app-home-timetable-cell-events {
        display: none;
    }

    .app-home-timetable-chip-time {
        display: block;
    }

    .app-home-timetable-chip {
        padding: 0.4rem 0.48rem;
    }

    .app-home-timetable-chip-label {
        font-size: 0.72rem;
    }

    .app-home-timetable-entry,
    .app-home-timetable-upcoming-item {
        grid-template-columns: auto 1fr;
    }

    .app-home-timetable-date {
        min-width: 4.75rem;
        width: auto;
    }

    .app-home-timetable-entry-title-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .app-home-timetable-upcoming-item {
        grid-template-columns: auto 1fr auto;
    }
}

@media (min-width: 821px) {
    .app-home-timetable-toolbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .app-home-timetable-toolbar-actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .app-home-timetable-grid-shell {
        overflow-x: visible;
        padding-bottom: 0;
    }

    .app-home-timetable-weekdays,
    .app-home-timetable-grid {
        min-width: 0;
        gap: 0.55rem;
    }

    .app-home-timetable-cell {
        min-height: 0;
    }
}

@media (min-width: 1081px) {
    .app-home-timetable-summary-grid {
        max-width: none;
    }

    .app-home-timetable-toolbar-actions {
        justify-content: flex-end;
    }

    .app-home-timetable-weekdays,
    .app-home-timetable-grid {
        gap: 0.65rem;
    }

    .app-home-timetable-cell {
        min-height: 0;
        padding: 0.72rem;
    }
}

@media (min-width: 900px) {
    .app-home-timetable-overview {
        grid-template-columns: minmax(0, 1.3fr) minmax(16rem, 0.8fr);
        align-items: stretch;
    }

    .app-home-timetable-next {
        height: 100%;
        align-content: center;
    }

    .app-home-timetable-summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .app-home-timetable-card {
        padding: 1rem;
    }

    .app-home-timetable-head {
        gap: 0.75rem;
    }

    .app-home-timetable-head-meta {
        gap: 0.35rem;
    }

    .app-home-timetable-kicker {
        padding: 0.32rem 0.55rem;
        font-size: 0.64rem;
    }

    .app-home-timetable-title {
        font-size: 1rem;
    }

    .app-home-timetable-description {
        display: none;
    }

    .app-home-timetable-head-meta .app-home-timetable-pill:first-child {
        display: none;
    }

    .app-home-timetable-pill {
        padding: 0.38rem 0.58rem;
        font-size: 0.7rem;
    }

    .app-home-timetable-overview {
        gap: 0.75rem;
    }

    .app-home-timetable-next {
        gap: 0.7rem;
        padding: 0.9rem;
    }

    .app-home-timetable-next-title {
        font-size: 0.96rem;
    }

    .app-home-timetable-next-meta,
    .app-home-timetable-next-note {
        font-size: 0.8rem;
    }

    .app-home-timetable-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .app-home-timetable-summary-card {
        padding: 0.72rem 0.78rem;
    }

    .app-home-timetable-summary-label {
        font-size: 0.63rem;
        letter-spacing: 0.06em;
    }

    .app-home-timetable-summary-value {
        font-size: 1rem;
    }

    .app-home-timetable-summary-note {
        display: none;
    }

    .app-home-timetable-calendar-wrap {
        gap: 0.85rem;
    }

    .app-home-timetable-calendar-panel {
        gap: 0.8rem;
        padding: 0.9rem;
    }

    .app-home-timetable-toolbar {
        gap: 0.75rem;
    }

    .app-home-timetable-toolbar-description {
        display: none;
    }

    .app-home-timetable-legend {
        display: none;
    }

    .app-home-timetable-legend-item {
        font-size: 0.7rem;
    }

    .app-home-timetable-weekdays,
    .app-home-timetable-grid {
        gap: 0.28rem;
    }

    .app-home-timetable-cell {
        border-radius: 0.74rem;
    }

    .app-home-timetable-cell-badge {
        display: none;
    }

    .app-home-timetable-cell-important-badge {
        width: 0.95rem;
        height: 0.95rem;
        font-size: 0.56rem;
    }

    .app-rich-post-modal-intro {
        flex-direction: column;
        gap: 0.65rem;
    }

    .app-rich-post-modal-copy {
        max-width: none;
        text-align: left;
    }

    .app-rich-post-composer {
        border-radius: 1.15rem;
    }

    .app-rich-post-toolbar {
        gap: 0.35rem;
        padding: 0.7rem;
    }

    .app-rich-post-math-row {
        padding: 0.75rem;
    }

    .app-rich-post-math-controls {
        gap: 0.5rem;
    }

    .app-rich-post-math-button {
        flex: 1 1 calc(50% - 0.25rem);
    }

    .app-rich-post-toolbar-button {
        width: 2.1rem;
        height: 2.1rem;
        border-radius: 0.82rem;
    }

    .app-rich-post-editor,
    .app-rich-post-editor__surface {
        min-height: 12rem;
    }

    .app-rich-post-editor__surface {
        padding: 0.92rem 0.9rem 1rem;
        font-size: 0.95rem;
    }

    .app-rich-post-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .app-rich-post-media-row {
        flex-wrap: wrap;
    }

    .app-rich-post-footer-actions {
        width: 100%;
    }

    .app-rich-post-footer-actions .app-button {
        flex: 1 1 auto;
    }
}
