/* ==========================================================================
   Marilyn Córdova Studio - Academy LMS (Material 3 Adaptive Design)
   Window Size Classes:
   - Expanded: >= 840px (Two-Pane Supporting Layout)
   - Medium: 600px - 839px (Vertical Hierarchy / Collapsible Accordion)
   - Compact: < 600px (Sticky Player + Bottom Sheet Drawer)
   ========================================================================== */

:root {
    color-scheme: dark light;
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Palette Marilyn Córdova */
    --chocolate-900: #1C1615;
    --chocolate-800: #2C211F;
    --chocolate-700: #423330;
    --chocolate-500: #56443F;
    --chocolate-300: #887069;
    --cream-500: #E4C7B7;
    --cream-200: #F3ECE7;
    --cream-100: #FBF8F6;
    --gold-500: #C5A880;
    --gold-600: #B09267;
    --gold-300: #E4D5BE;
    --gold-glow: rgba(197, 168, 128, 0.25);

    /* Material 3 Surface Tokens */
    --md-sys-color-surface: #FBF8F6;
    --md-sys-color-surface-dim: #F0EAE5;
    --md-sys-color-surface-container: #F6F1EC;
    --md-sys-color-surface-container-high: #EDE5DE;
    --md-sys-color-surface-container-highest: #E4DCD5;
    --md-sys-color-on-surface: #261D1A;
    --md-sys-color-on-surface-variant: #6E5C57;
    --md-sys-color-outline: #D7CBC3;
    --md-sys-color-outline-variant: #E8DFD8;
    --md-sys-color-primary: #56443F;
    --md-sys-color-on-primary: #FFFFFF;

    /* Player Dark Canvas */
    --player-canvas: #0E0B0A;
    --player-surface: #181312;
    --player-text: #FBF8F6;
    --player-text-muted: #B8A8A2;
    --player-accent: #C5A880;

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 9999px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(35, 27, 25, 0.05);
    --shadow-md: 0 8px 24px rgba(35, 27, 25, 0.08);
    --shadow-lg: 0 16px 40px rgba(35, 27, 25, 0.12);
}

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

html {
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    min-height: 100vh;
    max-width: 100vw;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
    box-sizing: border-box;
}

/* ==========================================================================
   Top Navigation
   ========================================================================== */
.academy-navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(251, 248, 246, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    height: 64px;
}

.navbar-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Official Brand Architecture (Manual de Marca) */
.brand-container {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-decoration: none;
    color: var(--chocolate-900);
    white-space: nowrap;
    flex-shrink: 0;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: filter 0.3s ease;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    align-items: baseline;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.brand-main {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 24px;
    letter-spacing: -0.5px;
    color: var(--chocolate-900);
    line-height: 1;
    white-space: nowrap;
}

.brand-sub {
    font-family: 'Outfit', sans-serif;
    font-weight: 200;
    font-size: 24px;
    opacity: 0.7;
    color: var(--chocolate-900);
    line-height: 1;
    white-space: nowrap;
}

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

.btn-app-tabletop, .btn-app-fullscreen {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(197, 168, 128, 0.12);
    border: 1px solid var(--gold-500);
    color: var(--gold-300);
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-app-tabletop:hover, .btn-app-fullscreen:hover,
.btn-app-tabletop.active {
    background: var(--gold-500);
    color: var(--chocolate-900);
}

.user-profile-bar {
    display: flex;
    align-items: center;
    gap: 16px;
}

.student-info {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.student-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--chocolate-900);
}

.student-email {
    font-size: 0.75rem;
    color: var(--md-sys-color-on-surface-variant);
}

.btn-ghost-logout {
    background: transparent;
    border: 1px solid var(--md-sys-color-outline);
    color: var(--chocolate-500);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-ghost-logout:hover {
    background: var(--chocolate-500);
    color: #FFFFFF;
    border-color: var(--chocolate-500);
}

/* Utilities */
.hidden {
    display: none !important;
}

/* ==========================================================================
   Auth Gate & Access Alerts
   ========================================================================== */
.auth-gate-section, .no-access-section {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(circle at 50% 20%, #F5ECE5 0%, #EFE5DE 100%);
}

.auth-gate-card, .no-access-card {
    background: #FFFFFF;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--radius-lg);
    padding: 48px 36px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.auth-badge-icon, .lock-icon {
    font-size: 2.2rem;
    color: var(--gold-600);
    margin-bottom: 16px;
}

.auth-gate-title, .no-access-card h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--chocolate-900);
    margin-bottom: 12px;
    line-height: 1.2;
}

.auth-gate-desc, .no-access-card p {
    font-size: 0.95rem;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.6;
    margin-bottom: 32px;
}

.btn-google-sign {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    border-radius: var(--radius-pill);
    background: #FFFFFF;
    border: 1px solid #DADCE0;
    color: #3C4043;
    font-family: var(--font-body);
    font-size: 0.98rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
}

.btn-google-sign:hover {
    box-shadow: var(--shadow-md);
    border-color: #C0C4C8;
    background: #FAFBFB;
}

.btn-whatsapp-access {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    border-radius: var(--radius-pill);
    background: #25D366;
    color: #FFFFFF;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, filter 0.2s ease;
    margin-bottom: 12px;
}

.btn-whatsapp-access:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.btn-text-secondary {
    background: transparent;
    border: none;
    color: var(--chocolate-500);
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 6px;
}

.auth-gate-error {
    margin-top: 16px;
    padding: 12px;
    background: #FDEDEC;
    color: #C0392B;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

/* ==========================================================================
   Material 3 Adaptive Layout: Media Detail (Two-Pane Supporting)
   ========================================================================== */
.academy-layout {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 12px 16px 32px;
    display: grid;
    gap: 20px;
    box-sizing: border-box;
}

/* -------------------------------------------------------------
   Expanded Width (>= 840px): Fullscreen Immersion (68% / 32%)
   ------------------------------------------------------------- */
@media (min-width: 840px) {
    .academy-layout {
        grid-template-columns: minmax(0, 1fr) 360px;
        padding: 12px 20px 32px;
        gap: 24px;
        align-items: start;
    }

    .supporting-pane {
        position: sticky;
        top: 76px;
        height: calc(100vh - 96px);
        display: flex;
        flex-direction: column;
    }
}

@media (min-width: 1200px) {
    .academy-layout {
        grid-template-columns: minmax(0, 1fr) 400px;
        padding: 16px 28px 36px;
    }
}

/* -------------------------------------------------------------
   Medium Width (600px - 839px): Single Column Stacked
   ------------------------------------------------------------- */
@media (max-width: 839px) and (min-width: 600px) {
    .academy-layout {
        grid-template-columns: 1fr;
        padding: 12px 16px 24px;
        gap: 20px;
    }

    .supporting-pane {
        position: static;
        height: auto;
    }
}

/* -------------------------------------------------------------
   Compact Width (< 600px): Sticky Top Player + Drawer
   ------------------------------------------------------------- */
@media (max-width: 599px) {
    .academy-layout {
        grid-template-columns: 1fr;
        padding: 0;
        gap: 12px;
    }

    .player-viewport {
        border-radius: 0 !important;
        position: sticky;
        top: 0;
        z-index: 95;
    }

    .lesson-meta-card {
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        padding: 16px 14px !important;
    }

    /* Hide desktop supporting pane, reveal mobile FAB */
    .supporting-pane {
        display: none !important;
    }

    .mobile-playlist-fab {
        display: inline-flex !important;
    }
}

/* ==========================================================================
   Responsive Adaptations & Anti-Overflow Rules
   ========================================================================== */
@media (max-width: 900px) {
    .navbar-container {
        padding: 0 16px;
    }
    .btn-app-tabletop span,
    .btn-app-fullscreen span {
        display: none !important;
    }
    .btn-app-tabletop,
    .btn-app-fullscreen {
        padding: 6px 10px;
    }
    .student-email {
        display: none !important;
    }
    .student-name {
        font-size: 0.8rem;
    }
    .user-profile-bar {
        gap: 8px;
    }
    .btn-ghost-logout {
        padding: 4px 10px;
        font-size: 0.72rem;
    }
    .brand-main, .brand-sub {
        font-size: 20px;
    }
}

/* Tablets and Mobile Phones (< 768px) */
@media (max-width: 767px) {
    .btn-app-tabletop {
        display: none !important; /* Mobile phones are not foldables */
    }
    .student-info {
        display: none !important; /* Save ~120px in navbar */
    }
}

/* Compact Mobile Screens (< 600px, e.g. iPhone 16 Pro 402px, Galaxy S24, Pixel) */
@media (max-width: 599px) {
    .academy-navbar {
        height: 54px;
        width: 100vw;
        max-width: 100vw;
        box-sizing: border-box;
    }
    .navbar-container {
        padding: 0 12px;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        gap: 6px;
    }
    .brand-container {
        gap: 6px;
        max-width: calc(100vw - 80px);
        overflow: hidden;
    }
    .logo-img {
        height: 28px;
    }
    .brand-main {
        font-size: 16px;
        letter-spacing: -0.3px;
    }
    .brand-sub {
        font-size: 16px;
    }
    .navbar-actions {
        gap: 6px;
    }
    .btn-app-fullscreen {
        padding: 5px 8px;
        height: 30px;
    }
    .btn-ghost-logout {
        padding: 4px 10px;
        font-size: 0.72rem;
    }

    /* Player Controls Bar on Mobile: Zero Horizontal Stretch */
    .custom-controls-bar {
        padding: 8px 10px 10px;
        gap: 6px;
        box-sizing: border-box;
        width: 100%;
    }
    .volume-range {
        display: none !important; /* Mobile uses physical buttons */
    }
    #btnToggleTabletop {
        display: none !important; /* Standard mobile phones can't fold */
    }
    #btnToggleAspect {
        display: none !important;
    }
    .controls-left, .controls-right {
        gap: 4px;
    }
    .ctrl-btn {
        width: 32px;
        height: 32px;
    }
    .time-display {
        font-size: 0.75rem;
        margin-left: 2px;
        gap: 2px;
    }
    .ctrl-btn-text {
        padding: 2px 6px;
        font-size: 0.72rem;
    }

    /* Lesson Card and Layout on Mobile */
    .academy-layout {
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
        margin: 0;
        padding: 0 0 32px;
    }
    .lesson-meta-card {
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        overflow-x: hidden;
        padding: 16px 14px 36px !important;
        margin-top: 0 !important;
    }
    .lesson-headline {
        font-size: 1.4rem !important;
        line-height: 1.25 !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        margin-bottom: 12px !important;
    }
    .meta-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .meta-progress-box {
        width: 100%;
        justify-content: space-between;
    }
    .start-cover-title {
        font-size: 1.15rem;
    }
    .btn-start-play {
        padding: 10px 20px;
        font-size: 0.86rem;
    }
}

/* Extra Compact Screens (< 360px) */
@media (max-width: 360px) {
    .brand-main, .brand-sub {
        font-size: 14px;
    }
    .logo-img {
        height: 24px;
    }
}

/* Landscape on mobile/foldables (short viewport height) */
@media (orientation: landscape) and (max-height: 600px) {
    .academy-navbar {
        height: 44px;
    }
    .navbar-container {
        padding: 0 14px;
    }
    .logo-img {
        height: 28px;
    }
    .brand-main, .brand-sub {
        font-size: 16px;
    }
    .btn-app-tabletop span,
    .btn-app-fullscreen span {
        display: none !important;
    }
    .student-email {
        display: none !important;
    }
    .academy-layout {
        padding: 8px 14px 20px;
        gap: 16px;
    }
    .video-aspect-box {
        max-height: calc(100vh - 120px) !important;
    }
    .custom-controls-bar {
        padding: 3px 12px 5px;
    }
}

/* ==========================================================================
   Google Material 3 Foldable Tabletop Posture (Flex Mode)
   Active when device is folded horizontally or manually activated.
   Top screen (48dvh): Video Player pinned cleanly, centered on black.
   Bottom screen (52dvh): 2-pane split: Lesson Details on Left, Playlist on Right.
   Zero scroll lock. Smooth independent scrolling. Zero white gaps.
   ========================================================================== */
body.has-tabletop {
    background-color: #120E0D !important;
    overflow: hidden !important;
}

body.has-tabletop .academy-navbar {
    height: 44px !important;
    background: rgba(18, 14, 13, 0.98) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.has-tabletop .logo-img {
    height: 28px !important;
    filter: brightness(0) invert(1) !important;
}

body.has-tabletop .brand-main {
    font-size: 18px !important;
    color: #FFFFFF !important;
}

body.has-tabletop .brand-sub {
    font-size: 18px !important;
    color: var(--gold-300) !important;
    opacity: 0.9 !important;
}

.academy-layout.tabletop-mode {
    display: grid !important;
    grid-template-rows: 48dvh calc(52dvh - 44px) !important;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) !important;
    width: 100% !important;
    height: calc(100dvh - 44px) !important;
    max-height: calc(100dvh - 44px) !important;
    padding: 0 !important;
    gap: 0 !important;
    background: #120E0D !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* Flatten media-pane so player-viewport and lesson-meta-card become direct grid items */
.academy-layout.tabletop-mode .media-pane {
    display: contents !important;
}

/* Top Screen (Upright Half): Pinned Shielded Video Player */
.academy-layout.tabletop-mode #playerViewport {
    grid-row: 1 / 2 !important;
    grid-column: 1 / 3 !important;
    height: 100% !important;
    max-height: 48dvh !important;
    width: 100% !important;
    background: #000000 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    position: relative !important;
    border-bottom: 2px solid rgba(197, 168, 128, 0.5) !important;
    z-index: 50 !important;
}

.academy-layout.tabletop-mode .video-aspect-box {
    flex: 1 1 auto !important;
    height: calc(100% - 46px) !important;
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    margin: 0 auto !important;
    background: #000000 !important;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.academy-layout.tabletop-mode.vertical-video-mode .video-aspect-box {
    aspect-ratio: 9 / 16 !important;
    max-height: calc(48dvh - 46px) !important;
}

.academy-layout.tabletop-mode .custom-controls-bar {
    flex-shrink: 0 !important;
    height: 46px !important;
    border-radius: 0 !important;
    background: #140F0D !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 2px 14px 6px !important;
    box-sizing: border-box !important;
}

/* Bottom Screen - Left Column: Lesson Metadata & Editorial Details */
.academy-layout.tabletop-mode .lesson-meta-card {
    grid-row: 2 / 3 !important;
    grid-column: 1 / 2 !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: #171110 !important;
    padding: 16px 20px 36px !important;
    color: #FFFFFF !important;
    box-sizing: border-box !important;
}

.academy-layout.tabletop-mode .lesson-meta-card .tag-module {
    background: rgba(197, 168, 128, 0.15) !important;
    color: var(--gold-300) !important;
}

.academy-layout.tabletop-mode .lesson-meta-card .tag-duration {
    color: #A89F9B !important;
}

.academy-layout.tabletop-mode .lesson-meta-card .meta-progress-label {
    color: var(--gold-300) !important;
}

.academy-layout.tabletop-mode .lesson-meta-card .lesson-headline {
    color: #FFFFFF !important;
    font-size: 1.25rem !important;
    line-height: 1.3 !important;
    margin-bottom: 14px !important;
}

.academy-layout.tabletop-mode .lesson-meta-card .instructor-row {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
    padding-bottom: 14px !important;
    margin-bottom: 14px !important;
}

.academy-layout.tabletop-mode .lesson-meta-card .instructor-name {
    color: #FFFFFF !important;
    font-size: 0.9rem !important;
}

.academy-layout.tabletop-mode .lesson-meta-card .instructor-label {
    color: #A89F9B !important;
}

.academy-layout.tabletop-mode .lesson-meta-card .section-subheading {
    color: #E8D9CE !important;
    font-size: 1.05rem !important;
}

.academy-layout.tabletop-mode .lesson-meta-card .lesson-description-text {
    color: #D5C2B9 !important;
    font-size: 0.88rem !important;
    line-height: 1.6 !important;
}

.academy-layout.tabletop-mode .lesson-meta-card .lesson-resources-box {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
    margin-top: 18px !important;
    padding-top: 14px !important;
}

.academy-layout.tabletop-mode .lesson-meta-card .resource-card {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #FFFFFF !important;
    padding: 10px 14px !important;
}

.academy-layout.tabletop-mode .lesson-meta-card .resource-title {
    color: #FFFFFF !important;
    font-size: 0.84rem !important;
}

.academy-layout.tabletop-mode .lesson-meta-card .resource-type {
    color: #A89F9B !important;
}

/* Bottom Screen - Right Column: Scrollable Playlist & Progress */
.academy-layout.tabletop-mode .supporting-pane {
    grid-row: 2 / 3 !important;
    grid-column: 2 / 3 !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    background: #140E0D !important;
    display: flex !important;
    flex-direction: column !important;
    position: static !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

.academy-layout.tabletop-mode .supporting-pane .supporting-header {
    background: #1C1513 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 14px 16px 12px !important;
}

.academy-layout.tabletop-mode .supporting-pane .supporting-title {
    color: #FFFFFF !important;
    font-size: 1.05rem !important;
}

.academy-layout.tabletop-mode .supporting-pane .supporting-stats {
    color: var(--gold-300) !important;
    font-size: 0.76rem !important;
}

.academy-layout.tabletop-mode .supporting-pane .course-overall-progress {
    margin-top: 10px !important;
}

.academy-layout.tabletop-mode .supporting-pane .progress-info-row {
    color: #D5C2B9 !important;
    font-size: 0.74rem !important;
}

.academy-layout.tabletop-mode .supporting-pane .playlist-container {
    background: #140E0D !important;
    padding: 8px 10px 32px !important;
    flex: 1 !important;
    overflow-y: auto !important;
}

.academy-layout.tabletop-mode .supporting-pane .module-group-title {
    color: var(--gold-500) !important;
    font-size: 0.7rem !important;
    padding: 10px 8px 6px !important;
}

.academy-layout.tabletop-mode .supporting-pane .lesson-item-card {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    margin-bottom: 6px !important;
    padding: 8px 10px !important;
}

.academy-layout.tabletop-mode .supporting-pane .lesson-item-card:hover {
    background: rgba(255, 255, 255, 0.07) !important;
}

.academy-layout.tabletop-mode .supporting-pane .lesson-item-card.active {
    background: rgba(197, 168, 128, 0.16) !important;
    border-color: var(--gold-500) !important;
}

.academy-layout.tabletop-mode .supporting-pane .lesson-item-title {
    color: #FFFFFF !important;
    font-size: 0.82rem !important;
}

.academy-layout.tabletop-mode .supporting-pane .lesson-num-badge {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #FFFFFF !important;
    width: 26px !important;
    height: 26px !important;
    font-size: 0.72rem !important;
}

.academy-layout.tabletop-mode .supporting-pane .lesson-item-card.active .lesson-num-badge {
    background: var(--gold-500) !important;
    color: var(--chocolate-900) !important;
}

/* Narrow Foldables in Portrait Tabletop (e.g. Clamshell Fold / Z Flip) */
@media (max-width: 640px) {
    .academy-layout.tabletop-mode {
        grid-template-columns: 1fr !important;
        grid-template-rows: 46dvh calc(54dvh - 44px) !important;
    }

    .academy-layout.tabletop-mode #playerViewport {
        grid-column: 1 / 2 !important;
    }

    .academy-layout.tabletop-mode .lesson-meta-card {
        grid-column: 1 / 2 !important;
        grid-row: 2 / 3 !important;
        border-right: none !important;
    }

    .academy-layout.tabletop-mode .supporting-pane {
        display: none !important;
    }

    .academy-layout.tabletop-mode .mobile-playlist-fab {
        display: inline-flex !important;
        bottom: 16px !important;
        right: 16px !important;
        z-index: 80 !important;
    }
}

/* ==========================================================================
   Google Material 3 Vertical Media Layout (9:16 Shorts / Reels / Formato Vertical)
   Reference: Supporting Pane on Left, Vertical Video on Right
   ========================================================================== */
@media (min-width: 840px) {
    .academy-layout.vertical-video-mode:not(.tabletop-mode) {
        grid-template-columns: minmax(340px, 420px) minmax(0, 1fr) !important;
        align-items: start !important;
        gap: 28px !important;
    }

    .academy-layout.vertical-video-mode:not(.tabletop-mode) .supporting-pane {
        order: 1 !important; /* Left Column: Course Explorer / Playlist */
        position: sticky !important;
        top: 80px !important;
        height: calc(100vh - 104px) !important;
    }

    .academy-layout.vertical-video-mode:not(.tabletop-mode) .media-pane {
        order: 2 !important; /* Right Column: 9:16 Vertical Video */
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }

    .academy-layout.vertical-video-mode:not(.tabletop-mode) .player-viewport {
        max-width: 440px !important;
        width: 100% !important;
        margin: 0 auto !important;
    }

    .academy-layout.vertical-video-mode:not(.tabletop-mode) .video-aspect-box {
        aspect-ratio: 9 / 16 !important;
        max-height: calc(100vh - 180px) !important;
        width: 100% !important;
    }

    .academy-layout.vertical-video-mode:not(.tabletop-mode) .lesson-meta-card {
        max-width: 440px !important;
        width: 100% !important;
        margin: 16px auto 0 !important;
    }
}

@media (max-width: 839px) {
    .academy-layout.vertical-video-mode:not(.tabletop-mode) .player-viewport {
        max-width: 100% !important;
    }
    .academy-layout.vertical-video-mode:not(.tabletop-mode) .video-aspect-box {
        aspect-ratio: 9 / 16 !important;
        max-height: 72vh !important;
    }
}

/* ==========================================================================
   Blind Video Player Viewport (Decoupled & Shielded)
   ========================================================================== */
.player-viewport {
    background: var(--player-canvas);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
}

.video-aspect-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    overflow: hidden;
}

/* YouTube IFrame Mount */
#ytPlayerContainer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Secondary defense */
}

#ytPlayerContainer iframe {
    width: 100% !important;
    height: 100% !important;
    border: none;
    pointer-events: none;
}

/* Transparent Anti-Tamper Shield Layer */
.video-shield {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: rgba(0, 0, 0, 0.001); /* Invisible touch & click interceptor */
    cursor: pointer;
    touch-action: manipulation;
}

/* Buffering Ring */
.player-buffering {
    position: absolute;
    inset: 0;
    z-index: 15;
    background: rgba(14, 11, 10, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--gold-300);
    font-size: 0.9rem;
}

.spinner-ring {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(197, 168, 128, 0.2);
    border-top-color: var(--gold-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Branded Luxury Start Poster Overlay (Completely hides native YouTube UI before play) */
.player-start-cover {
    position: absolute;
    inset: 0;
    z-index: 25;
    background: radial-gradient(circle at center, rgba(32, 22, 19, 0.94) 0%, rgba(14, 11, 10, 0.98) 100%);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    cursor: pointer;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.player-start-cover.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.start-cover-content {
    text-align: center;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.start-cover-badge {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: rgba(197, 168, 128, 0.18);
    border: 1px solid var(--gold-500);
    color: var(--gold-300);
    padding: 4px 14px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
}

.start-cover-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 500;
    color: #FFFFFF;
    line-height: 1.25;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.btn-start-play {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    border: none;
    color: var(--chocolate-900);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 14px 28px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(197, 168, 128, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 8px;
}

.btn-start-play:hover {
    transform: scale(1.04);
    box-shadow: 0 12px 32px rgba(197, 168, 128, 0.5);
}

/* Branded End-Screen Overlay (Intercepts & completely hides YouTube recommendation cards) */
.player-end-screen {
    position: absolute;
    inset: 0;
    z-index: 30;
    background: radial-gradient(circle at center, rgba(32, 22, 19, 0.96) 0%, rgba(14, 11, 10, 0.98) 100%);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeInEndScreen 0.35s ease-out forwards;
}

@keyframes fadeInEndScreen {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.end-screen-card {
    text-align: center;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.end-screen-card .end-badge-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(197, 168, 128, 0.15);
    border: 1px solid var(--gold-500);
    color: var(--gold-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 0 24px rgba(197, 168, 128, 0.25);
    margin-bottom: 4px;
}

.end-screen-title {
    font-family: var(--font-headline);
    color: #FFFFFF;
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin: 0;
}

.end-screen-sub {
    color: var(--gold-300);
    font-size: 0.9rem;
    font-weight: 400;
    margin: 0 0 16px;
    line-height: 1.4;
}

.end-screen-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-end-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
}

.btn-end-replay {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-end-replay:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.btn-end-next {
    background: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-300) 100%);
    color: var(--chocolate-900);
    box-shadow: 0 4px 16px rgba(197, 168, 128, 0.35);
}

.btn-end-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(197, 168, 128, 0.5);
    filter: brightness(1.05);
}

/* ==========================================================================
   Decoupled Custom Controls Bar
   ========================================================================== */
.custom-controls-bar {
    background: var(--player-surface);
    padding: 12px 20px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Seekbar */
.seek-container {
    position: relative;
    width: 100%;
    height: 18px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.seek-range {
    position: absolute;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-pill);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    z-index: 4;
    cursor: pointer;
}

.seek-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold-500);
    box-shadow: 0 0 10px rgba(197, 168, 128, 0.8);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.seek-range:hover::-webkit-slider-thumb {
    transform: scale(1.3);
}

.buffered-bar {
    position: absolute;
    left: 0;
    top: 6px;
    height: 6px;
    width: 0%;
    background: rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-pill);
    z-index: 2;
    pointer-events: none;
    transition: width 0.3s ease;
}

.played-bar {
    position: absolute;
    left: 0;
    top: 6px;
    height: 6px;
    width: 0%;
    background: var(--gold-500);
    border-radius: var(--radius-pill);
    z-index: 3;
    pointer-events: none;
}

/* Controls Line */
.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.controls-left, .controls-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ctrl-btn {
    background: transparent;
    border: none;
    color: var(--player-text);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--gold-300);
}

.ctrl-btn-text {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--player-text);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ctrl-btn-text:hover {
    background: rgba(255, 255, 255, 0.18);
    color: var(--gold-300);
}

.time-display {
    font-size: 0.84rem;
    font-family: var(--font-body);
    font-variant-numeric: tabular-nums;
    color: var(--player-text-muted);
    margin-left: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.time-display #timeCurrent {
    color: var(--player-text);
    font-weight: 500;
}

/* Volume Slider */
.volume-box {
    display: flex;
    align-items: center;
    gap: 6px;
}

.volume-range {
    width: 70px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-pill);
    outline: none;
    cursor: pointer;
}

.volume-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--player-text);
    cursor: pointer;
}

/* Speed Menu */
.speed-selector-wrapper {
    position: relative;
}

.speed-menu {
    position: absolute;
    bottom: 44px;
    right: 0;
    background: #231C1A;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    padding: 6px;
    display: flex;
    flex-direction: column;
    min-width: 120px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 30;
}

.speed-menu button {
    background: transparent;
    border: none;
    color: var(--player-text-muted);
    padding: 8px 12px;
    text-align: left;
    font-size: 0.82rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.speed-menu button:hover, .speed-menu button.active {
    background: rgba(197, 168, 128, 0.2);
    color: var(--gold-300);
}

/* ==========================================================================
   Lesson Metadata & Editorial Content
   ========================================================================== */
.lesson-meta-card {
    background: #FFFFFF;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-top: 24px;
    box-shadow: var(--shadow-sm);
}

.meta-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.meta-tags {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tag-module {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    background: var(--md-sys-color-surface-container-high);
    color: var(--chocolate-700);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
}

.tag-duration {
    font-size: 0.76rem;
    color: var(--md-sys-color-on-surface-variant);
}

.badge-status-completed {
    font-size: 0.74rem;
    font-weight: 600;
    background: #E8F8F0;
    color: #1E8449;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid #A9DFBF;
}

.meta-progress-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.meta-progress-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--chocolate-500);
}

.lesson-progress-track {
    width: 80px;
    height: 6px;
    background: var(--md-sys-color-outline-variant);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.lesson-progress-fill {
    height: 100%;
    background: var(--gold-500);
    transition: width 0.3s ease;
}

.lesson-headline {
    font-family: var(--font-heading);
    font-size: 2.1rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--chocolate-900);
    margin-bottom: 20px;
}

.instructor-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    margin-bottom: 24px;
}

.instructor-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--chocolate-900);
    color: var(--gold-300);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--gold-500);
}

.instructor-details {
    display: flex;
    flex-direction: column;
}

.instructor-label {
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    color: var(--md-sys-color-on-surface-variant);
}

.instructor-name {
    font-size: 0.96rem;
    color: var(--chocolate-900);
}

.instructor-dot {
    color: var(--md-sys-color-outline);
}

.recorded-date {
    font-size: 0.82rem;
    color: var(--md-sys-color-on-surface-variant);
}

.section-subheading {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--chocolate-900);
    margin-bottom: 10px;
}

.lesson-description-text {
    font-size: 0.94rem;
    line-height: 1.7;
    color: var(--md-sys-color-on-surface-variant);
}

/* Resources Box */
.lesson-resources-box {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px dashed var(--md-sys-color-outline);
}

.resources-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.resource-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--md-sys-color-surface-container);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.resource-card:hover {
    background: #FFFFFF;
    border-color: var(--gold-500);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.resource-icon {
    font-size: 1.4rem;
}

.resource-info {
    display: flex;
    flex-direction: column;
}

.resource-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--chocolate-900);
}

.resource-type {
    font-size: 0.72rem;
    color: var(--md-sys-color-on-surface-variant);
}

/* ==========================================================================
   Supporting Pane: Playlist & Modules (Material 3 Two-Pane)
   ========================================================================== */
.supporting-pane {
    background: #FFFFFF;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.supporting-header {
    padding: 24px 20px 20px;
    background: var(--md-sys-color-surface-container);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.supporting-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--chocolate-900);
    line-height: 1.25;
}

.supporting-stats {
    font-size: 0.8rem;
    color: var(--md-sys-color-on-surface-variant);
    margin-top: 4px;
}

.course-overall-progress {
    margin-top: 16px;
}

.progress-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--chocolate-700);
    font-weight: 500;
    margin-bottom: 6px;
}

.overall-progress-track {
    height: 8px;
    background: var(--md-sys-color-outline-variant);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

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

/* Playlist Items */
.playlist-container {
    padding: 12px;
    overflow-y: auto;
    flex: 1;
}

.module-group-title {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--chocolate-500);
    padding: 16px 12px 8px;
}

.lesson-item-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    margin-bottom: 8px;
    background: transparent;
}

.lesson-item-card:hover {
    background: var(--md-sys-color-surface-container);
}

.lesson-item-card.active {
    background: #FAF5F0;
    border-color: var(--gold-500);
    box-shadow: 0 4px 14px rgba(197, 168, 128, 0.2);
}

.lesson-num-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--md-sys-color-surface-container-high);
    color: var(--chocolate-700);
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lesson-item-card.active .lesson-num-badge {
    background: var(--chocolate-900);
    color: var(--gold-300);
}

.lesson-item-card.completed .lesson-num-badge {
    background: #E8F8F0;
    color: #1E8449;
}

.lesson-item-details {
    flex: 1;
    min-width: 0;
}

.lesson-item-title {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--chocolate-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lesson-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.74rem;
    color: var(--md-sys-color-on-surface-variant);
    margin-top: 4px;
}

.item-pill {
    padding: 2px 6px;
    border-radius: var(--radius-pill);
    font-size: 0.68rem;
    font-weight: 600;
}

.item-pill.completed {
    background: #E8F8F0;
    color: #1E8449;
}

.item-pill.in-progress {
    background: #FEF9E7;
    color: #B7950B;
}

.item-pill.pending {
    background: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-on-surface-variant);
}

/* ==========================================================================
   Mobile Bottom Sheet Drawer & Floating Action Button
   ========================================================================== */
.mobile-playlist-fab {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 20px;
    z-index: 120;
    background: var(--chocolate-900);
    color: var(--gold-300);
    border: 1px solid var(--gold-500);
    border-radius: var(--radius-pill);
    padding: 12px 20px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.mobile-badge {
    background: var(--gold-500);
    color: var(--chocolate-900);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
}

.mobile-bottom-sheet {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.bottom-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.bottom-sheet-content {
    position: relative;
    background: #FFFFFF;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.bottom-sheet-handle {
    width: 44px;
    height: 5px;
    background: var(--md-sys-color-outline);
    border-radius: var(--radius-pill);
    margin: 12px auto 6px;
}

.bottom-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.bottom-sheet-header h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--chocolate-900);
}

.btn-close-sheet {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: var(--chocolate-500);
    cursor: pointer;
    padding: 6px;
}

.bottom-sheet-body {
    padding: 16px;
    overflow-y: auto;
}

/* ==========================================================================
   Toasts & Tripwire Alerts
   ========================================================================== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: var(--chocolate-900);
    color: #FFFFFF;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    font-size: 0.88rem;
    line-height: 1.4;
    max-width: 380px;
    border-left: 4px solid var(--gold-500);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastIn 0.3s ease;
}

.toast.warning {
    border-left-color: #E67E22;
    background: #231612;
}

.toast.danger {
    border-left-color: #E74C3C;
    background: #2A1211;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
