/* ============================================ */
/* RESET & VARIABEL                             */
/* ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --c-primary: #176b3a;
    --c-primary-dark: #12552f;
    --c-primary-light: #2f8f57;
    --c-accent: #84cc16;
    --c-accent-soft: #d9f99d;
    --c-gold: #eab308;
    --c-danger: #dc2626;
    --c-danger-soft: #fee2e2;
    --c-text: #0f172a;
    --c-text-soft: #475569;
    --c-muted: #64748b;
    --c-bg-soft: #eaf6ed;
    --c-border-soft: #dce4df;
    --c-card-border: #c8e6d0;
    --shadow-card: 0 15px 30px -12px rgba(16, 64, 40, 0.12);
    --shadow-card-hover: 0 28px 40px -15px rgba(16, 64, 40, 0.25);
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(145deg, #f4f9f5 0%, #e8f0ea 100%);
    color: var(--c-text);
    padding: 1.5rem 0 5rem;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

/* ============================================ */
/* CONTAINER                                    */
/* ============================================ */
.container {
    max-width: 1180px;
    margin: 0 auto;
    width: 100%;
    padding: 0 1.5rem;
}

/* ============================================ */
/* HEADER                                       */
/* ============================================ */
.header {
    background: linear-gradient(135deg, #0f4a28 0%, #176b3a 50%, #2f8f57 100%);
    padding: 1.5rem;
    border-radius: 28px;
    box-shadow: 0 20px 32px -12px rgba(15, 74, 40, 0.4);
    margin-bottom: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.header::before {
    content: "🏥";
    font-size: 9rem;
    position: absolute;
    right: -10px; bottom: -40px;
    opacity: 0.08;
    transform: rotate(12deg);
    pointer-events: none;
    line-height: 1;
}

.header-title-wrap {
    display: flex; align-items: center; gap: 14px;
    z-index: 2; position: relative; min-width: 0; flex: 1 1 auto;
}

.header-logo-wrap {
    width: clamp(52px, 11vw, 80px);
    height: clamp(52px, 11vw, 80px);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    padding: 6px;
    box-shadow: 0 8px 20px -5px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: clamp(1.6rem, 5vw, 2.4rem);
    overflow: hidden;
}

.header-logo { width: 100%; height: 100%; object-fit: contain; }

.header-text { min-width: 0; flex: 1; }

.header-text h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: clamp(1.1rem, 3.2vw, 1.9rem);
    letter-spacing: -0.5px;
    line-height: 1.2;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.header-text .subhead {
    font-size: clamp(0.75rem, 2vw, 0.9rem);
    opacity: 0.92;
    margin-top: 5px;
    display: flex; align-items: center; gap: 6px;
    flex-wrap: wrap; line-height: 1.4;
}

.stats-badge {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 100px;
    padding: 0.55rem 1.1rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.28);
    display: flex; gap: 12px;
    font-size: clamp(0.7rem, 1.9vw, 0.85rem);
    z-index: 2; position: relative; flex-wrap: wrap;
}

.stats-badge span i { margin-right: 5px; color: var(--c-accent-soft); }

/* ============================================ */
/* HERO IMAGE                                   */
/* ============================================ */
.hero-image {
    margin: 0 0 1.5rem 0;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px -15px rgba(15, 74, 40, 0.35);
    border: 3px solid rgba(255, 255, 255, 0.9);
    position: relative;
    background: linear-gradient(135deg, #176b3a, #2f8f57);
    width: 100%;
}

.hero-image img {
    display: block; width: 100%;
    height: clamp(160px, 32vw, 340px);
    object-fit: cover; object-position: center;
    transition: transform 0.6s ease;
    background-color: #e8f0ea;
}

@media (hover: hover) {
    .hero-image:hover img { transform: scale(1.03); }
}

.hero-image figcaption {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 0.75rem 1rem;
    background: linear-gradient(to top, rgba(15, 74, 40, 0.95), rgba(15, 74, 40, 0));
    color: white;
    font-size: clamp(0.78rem, 2vw, 0.9rem);
    font-weight: 600;
    display: flex; align-items: center; gap: 8px;
}

.hero-image figcaption i { color: var(--c-accent-soft); }

/* ============================================ */
/* QUICK NAV                                    */
/* ============================================ */
.quick-nav {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-bottom: 1.25rem;
    padding: 0.6rem 0.8rem;
    background: white; border-radius: 20px;
    box-shadow: 0 8px 20px -10px rgba(16, 64, 40, 0.15);
    border: 1px solid var(--c-card-border);
    width: 100%;
}

.quick-nav a {
    flex: 1 1 auto; text-align: center;
    padding: 0.65rem 0.85rem;
    border-radius: 14px; text-decoration: none;
    font-weight: 600; font-size: clamp(0.75rem, 1.9vw, 0.85rem);
    color: var(--c-primary);
    background: #eef7f0;
    border: 1px solid #d0e7d6;
    transition: background 0.2s ease, color 0.2s ease;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 42px; white-space: nowrap;
}

.quick-nav a:hover { background: var(--c-primary); color: white; }

/* ============================================ */
/* MINI STATS                                   */
/* ============================================ */
.mini-stats {
    display: flex; gap: 1rem; flex-wrap: wrap;
    margin-bottom: 1.15rem;
    background: #e6f2e9;
    border-radius: 50px;
    padding: 0.55rem 1.3rem;
    width: fit-content;
    font-size: clamp(0.74rem, 1.9vw, 0.85rem);
    font-weight: 600; color: var(--c-primary);
    border: 1px solid #c2dfcb;
}

.mini-stats i { margin-right: 5px; color: var(--c-primary-light); }

/* ============================================ */
/* PROGRESS PANEL                               */
/* ============================================ */
.progress-panel { margin-bottom: 1.25rem; width: 100%; }

.progress-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
}

.stat-box {
    background: white;
    border: 1px solid var(--c-card-border);
    border-radius: 16px;
    padding: 0.9rem 1rem;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.stat-box::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
    opacity: 0.9;
}

@media (hover: hover) {
    .stat-box:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
}

.stat-box b {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.25rem, 3.4vw, 1.6rem);
    color: var(--c-primary);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.stat-box span {
    font-size: clamp(0.66rem, 1.7vw, 0.76rem);
    color: var(--c-muted);
    font-weight: 500;
    display: block;
    margin-top: 3px;
    line-height: 1.35;
}

.progress-bar-wrap {
    height: 5px;
    background: #e5e7eb;
    border-radius: 99px;
    overflow: hidden;
    margin-top: 9px;
}

.progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--c-primary-light), var(--c-accent));
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 99px;
}

/* ============================================ */
/* NOTICE                                       */
/* ============================================ */
.notice {
    background: white;
    border: 1px solid var(--c-border-soft);
    border-left: 4px solid var(--c-primary);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    margin-bottom: 1.5rem;
    font-size: clamp(0.76rem, 1.9vw, 0.83rem);
    line-height: 1.55;
    color: var(--c-text-soft);
    box-shadow: 0 4px 12px -6px rgba(16, 64, 40, 0.1);
    display: flex;
    gap: 10px;
    align-items: flex-start;
    width: 100%;
}

.notice i {
    color: var(--c-primary);
    font-size: 1.05rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.notice b { color: var(--c-text); }

/* ============================================ */
/* TOOLBAR                                      */
/* ============================================ */
.toolbar {
    display: flex; flex-wrap: wrap; gap: 0.75rem;
    margin-bottom: 1.75rem; align-items: center;
    justify-content: space-between;
    width: 100%;
}

.search-box {
    display: flex; align-items: center;
    background: white; border-radius: 60px;
    padding: 0 0.4rem 0 1.1rem;
    box-shadow: 0 8px 20px -8px rgba(16, 64, 40, 0.15);
    border: 1px solid rgba(47, 143, 87, 0.2);
    flex: 1 1 260px; max-width: 440px;
    height: 46px; min-height: 46px;
    position: relative;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.search-box:focus-within {
    border-color: var(--c-primary-light);
    box-shadow: 0 0 0 3px rgba(47, 143, 87, 0.12), 0 8px 20px -8px rgba(16, 64, 40, 0.15);
}

.search-box > i { color: var(--c-primary-light); font-size: 1rem; }

.search-box input {
    border: none; padding: 0 0.75rem;
    font-size: 0.9rem; width: 100%; height: 100%;
    outline: none; background: transparent;
    font-family: inherit; color: var(--c-text); min-width: 0;
}

.search-clear {
    display: none;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: #f1f5f3;
    border: none;
    color: var(--c-muted);
    cursor: pointer;
    align-items: center; justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease;
}

.search-clear:hover { background: #e2e8e4; color: var(--c-danger); }
.search-clear.show { display: inline-flex; }

.filter-pills { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.pill {
    background: white;
    border: 1.5px solid #d0e2d6;
    color: #1e4b30; font-weight: 600;
    padding: 0 1rem;
    height: 40px; min-height: 40px;
    border-radius: 50px; font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    font-family: inherit; white-space: nowrap;
}

.pill i { font-size: 0.78rem; opacity: 0.7; margin: 0; }
.pill:hover { background: #e3f2e9; border-color: var(--c-primary-light); }
.pill.active { background: var(--c-primary); color: white; border-color: var(--c-primary); }
.pill.active i { opacity: 1; color: var(--c-accent-soft); }

/* ============================================ */
/* SECTION HEADER                               */
/* ============================================ */
.section {
    margin: 1.75rem 0 0.9rem;
    width: 100%;
}

.section h2 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.95rem, 2.4vw, 1.15rem);
    margin: 0 0 4px;
    color: var(--c-primary-dark);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    letter-spacing: -0.2px;
    line-height: 1.3;
}

.section h2 .code-chip {
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-light));
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: clamp(0.66rem, 1.7vw, 0.75rem);
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
    box-shadow: 0 4px 10px -3px rgba(23, 107, 58, 0.4);
}

.section p {
    margin: 0;
    color: var(--c-muted);
    font-size: clamp(0.76rem, 1.9vw, 0.83rem);
    line-height: 1.5;
}

/* ============================================ */
/* EP GRID                                      */
/* ============================================ */
.ep-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 1.25rem;
    margin-bottom: 1rem;
    width: 100%;
    align-items: start;
}

/* ============================================ */
/* EP CARD                                      */
/* ============================================ */
.ep-card {
    background: white;
    border-radius: 20px;
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-top: 5px solid var(--c-primary);
    transition: transform 0.25s ease, box-shadow 0.3s ease;
    display: flex; flex-direction: column;
    position: relative; overflow: hidden;
    will-change: transform;
    width: 100%;
    max-width: 100%;
}

@media (hover: hover) {
    .ep-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card-hover); }
}

.card-head {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 0.9rem;
    flex-wrap: wrap;
}

.card-badge {
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-light));
    color: white;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    box-shadow: 0 8px 16px -6px rgba(23, 107, 58, 0.4);
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.card-title-wrap { flex: 1; min-width: 0; }

.card-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.92rem, 2.2vw, 1rem);
    font-weight: 600;
    line-height: 1.35;
    color: var(--c-primary-dark);
    margin-bottom: 4px;
    letter-spacing: -0.2px;
}

.card-desc {
    font-size: clamp(0.74rem, 1.8vw, 0.8rem);
    color: var(--c-text-soft);
    line-height: 1.5;
}

/* EP Items */
.ep-list {
    list-style: none;
    padding: 0; margin: 0;
    display: flex; flex-direction: column;
    gap: 10px;
    flex: 1;
}

.ep-item {
    border: 1px solid #e8ece9;
    border-radius: 14px;
    padding: 0.85rem;
    background: #fbfdfb;
    transition: border-color 0.2s ease, background 0.2s ease;
    position: relative;
    overflow: hidden;
}

.ep-item:hover { border-color: #b9d9c3; background: #f5fbf6; }

.ep-item.is-done {
    border-color: #a7d8b6;
    background: linear-gradient(135deg, #f0faf3, #fafffb);
}

.ep-item.is-done::before {
    content: "";
    position: absolute;
    left: 0; top: 12px; bottom: 12px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: var(--c-primary-light);
}

.ep-head {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 6px;
}

.ep-check {
    width: 20px; height: 20px;
    min-width: 20px;
    accent-color: var(--c-primary);
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.ep-head strong {
    font-size: clamp(0.78rem, 1.9vw, 0.84rem);
    font-weight: 700;
    color: var(--c-text);
    line-height: 1.4;
    letter-spacing: -0.1px;
    flex: 1;
    min-width: 0;
}

.ep-item.is-done .ep-head strong { color: var(--c-primary-dark); }

.ep-desc {
    display: block;
    font-size: clamp(0.7rem, 1.7vw, 0.75rem);
    color: var(--c-muted);
    line-height: 1.55;
    margin-left: 30px;
    margin-bottom: 8px;
}

/* DRIVE ROW */
.ep-drive-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: 30px;
}

.ep-drive-info {
    flex: 1;
    min-width: 0;
    font-size: clamp(0.7rem, 1.7vw, 0.75rem);
    color: var(--c-muted);
    font-style: italic;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-drive {
    flex-shrink: 0;
    width: 34px; height: 34px;
    border-radius: 10px;
    background: linear-gradient(145deg, var(--c-primary-light), var(--c-primary));
    color: white;
    border: none;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.85rem;
    text-decoration: none;
    transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 10px -3px rgba(23, 107, 58, 0.4);
}

.mini-drive:hover {
    background: linear-gradient(145deg, #34a862, var(--c-primary-light));
    transform: scale(1.06);
}

.mini-drive:active { transform: scale(0.94); }

.mini-drive.drive-empty {
    background: linear-gradient(145deg, #f87171, var(--c-danger));
    box-shadow: 0 4px 10px -3px rgba(220, 38, 38, 0.4);
    animation: drive-pulse 1.6s ease-in-out infinite;
}

@keyframes drive-pulse {
    0%, 100% { box-shadow: 0 4px 10px -3px rgba(220, 38, 38, 0.4), 0 0 0 0 rgba(220, 38, 38, 0.5); }
    50% { box-shadow: 0 4px 10px -3px rgba(220, 38, 38, 0.4), 0 0 0 7px rgba(220, 38, 38, 0); }
}

/* ============================================ */
/* EMPTY STATE                                  */
/* ============================================ */
.empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--c-muted);
    background: white;
    border-radius: 20px;
    border: 2px dashed var(--c-border-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.88rem;
    width: 100%;
}

.empty-state i { font-size: 2.4rem; color: #cbd5e1; }
.empty-state strong { color: var(--c-text-soft); font-weight: 600; }

/* ============================================ */
/* FOOTER                                       */
/* ============================================ */
.footer-note {
    margin-top: 2.5rem;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 22px;
    padding: 1.15rem 1.35rem;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 0.85rem;
    border: 1px solid var(--c-card-border);
    color: #1e4b30;
    width: 100%;
}

.footer-left {
    display: flex; align-items: center; gap: 10px;
    flex: 1 1 auto; min-width: 0;
}

.footer-note i { font-size: 1.4rem; color: var(--c-primary-light); flex-shrink: 0; }
.footer-note p { font-weight: 500; font-size: 0.85rem; line-height: 1.5; }
.footer-note .highlight {
    background: var(--c-primary); color: white;
    padding: 0.45rem 1.1rem; border-radius: 60px;
    font-weight: 600; font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ============================================ */
/* OVERLAY PEMBUKA                              */
/* ============================================ */
.music-overlay {
    position: fixed; inset: 0;
    background: linear-gradient(160deg, #0f4a28 0%, #062a17 100%);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 20px;
    padding: 1.5rem;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    cursor: pointer; text-align: center;
}

.music-overlay.hide { opacity: 0; visibility: hidden; pointer-events: none; }

.music-logo-container {
    position: relative;
    width: clamp(130px, 38vw, 170px);
    height: clamp(130px, 38vw, 170px);
    display: flex; align-items: center; justify-content: center;
}

.music-logo-container::before,
.music-logo-container::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%;
    background: rgba(47, 143, 87, 0.35);
    animation: pulse-ring 2.5s ease-out infinite;
}

.music-logo-container::after {
    animation-delay: 1.2s;
    background: rgba(217, 249, 157, 0.25);
}

@keyframes pulse-ring {
    0% { transform: scale(0.9); opacity: 0.7; }
    100% { transform: scale(1.5); opacity: 0; }
}

.music-logo {
    width: clamp(105px, 30vw, 145px);
    height: clamp(105px, 30vw, 145px);
    border-radius: 50%;
    background: linear-gradient(145deg, #ffffff, #e0f0e5);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.5), 0 0 0 6px rgba(255, 255, 255, 0.1);
    position: relative; z-index: 2;
}

.music-logo i {
    font-size: clamp(2.3rem, 8vw, 3.2rem);
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-left: 6px;
}

.music-logo.playing i {
    background: linear-gradient(135deg, var(--c-gold), var(--c-primary));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-left: 0;
}

.music-text { color: white; max-width: 480px; }

.music-text h2 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.1rem, 3.8vw, 1.5rem);
    font-weight: 600; letter-spacing: -0.4px;
    margin-bottom: 6px;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
}

.music-text p { opacity: 0.88; font-size: clamp(0.82rem, 2.3vw, 0.95rem); line-height: 1.5; }
.music-hint { margin-top: 10px; font-size: clamp(0.72rem, 1.9vw, 0.82rem); opacity: 0.65; }

.equalizer {
    display: flex; align-items: flex-end; gap: 4px;
    height: 28px; justify-content: center;
}

.equalizer span {
    width: 5px;
    background: linear-gradient(to top, var(--c-accent-soft), var(--c-accent));
    border-radius: 4px;
    animation: eq-bounce 1s ease-in-out infinite;
}

.equalizer span:nth-child(1) { animation-delay: 0s; height: 60%; }
.equalizer span:nth-child(2) { animation-delay: 0.15s; height: 100%; }
.equalizer span:nth-child(3) { animation-delay: 0.3s; height: 40%; }
.equalizer span:nth-child(4) { animation-delay: 0.45s; height: 80%; }
.equalizer span:nth-child(5) { animation-delay: 0.6s; height: 55%; }

@keyframes eq-bounce {
    0%, 100% { transform: scaleY(0.5); opacity: 0.7; }
    50% { transform: scaleY(1.2); opacity: 1; }
}

/* ============================================ */
/* FLOATING BUTTONS                             */
/* ============================================ */
.music-float-btn,
.auto-scroll-btn,
.back-top-btn {
    position: fixed;
    right: 18px;
    width: 52px; height: 52px; border-radius: 50%;
    color: white; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease, background 0.3s ease;
    opacity: 0; visibility: hidden;
}

.music-float-btn {
    bottom: max(140px, calc(env(safe-area-inset-bottom, 20px) + 122px));
    background: linear-gradient(145deg, var(--c-primary), var(--c-primary-light));
    box-shadow: 0 12px 25px -8px rgba(23, 107, 58, 0.6), 0 0 0 3px rgba(132, 204, 22, 0.2);
    font-size: 1.2rem;
}

.auto-scroll-btn {
    bottom: max(80px, calc(env(safe-area-inset-bottom, 20px) + 62px));
    background: linear-gradient(145deg, var(--c-primary-light), var(--c-primary));
    box-shadow: 0 12px 25px -8px rgba(47, 143, 87, 0.6), 0 0 0 3px rgba(23, 107, 58, 0.15);
    font-size: 1.1rem;
}

.back-top-btn {
    bottom: max(20px, env(safe-area-inset-bottom, 20px));
    background: linear-gradient(145deg, #64748b, #334155);
    box-shadow: 0 12px 25px -8px rgba(51, 65, 85, 0.5);
    font-size: 1.05rem;
}

.music-float-btn.show,
.auto-scroll-btn.show,
.back-top-btn.show { opacity: 1; visibility: visible; }

.music-float-btn:active,
.auto-scroll-btn:active,
.back-top-btn:active { transform: scale(0.94); }

.auto-scroll-btn.active {
    background: linear-gradient(145deg, var(--c-gold), #ca8a04);
    animation: scroll-pulse 1.6s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { box-shadow: 0 12px 25px -8px rgba(234, 179, 8, 0.6), 0 0 0 0 rgba(234, 179, 8, 0.5); }
    50% { box-shadow: 0 12px 25px -8px rgba(234, 179, 8, 0.6), 0 0 0 10px rgba(234, 179, 8, 0); }
}

/* ============================================ */
/* TOAST                                        */
/* ============================================ */
.toast {
    position: fixed;
    left: 50%;
    bottom: max(30px, calc(env(safe-area-inset-bottom, 20px) + 10px));
    transform: translate(-50%, 20px);
    background: #0f172a;
    color: white;
    padding: 0.65rem 1.1rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 7px;
    max-width: calc(100vw - 32px);
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast i { color: var(--c-accent); }

/* ============================================ */
/* TABLET — 1 Kolom Center                      */
/* ============================================ */
@media (min-width: 701px) and (max-width: 1100px) {
    .ep-grid {
        grid-template-columns: 1fr;
        max-width: 820px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ============================================ */
/* MOBILE                                       */
/* ============================================ */
@media (max-width: 700px) {
    body { padding: 0.75rem 0 5.5rem; }
    .container { padding: 0 0.85rem; }

    .header {
        padding: 0.9rem;
        border-radius: 18px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 1rem;
    }
    .header-logo-wrap { width: 46px; height: 46px; padding: 4px; font-size: 1.4rem; }
    .header-text h1 { font-size: 1rem; line-height: 1.2; }
    .header-text .subhead { font-size: 0.68rem; gap: 4px; }
    .header-text .subhead span { display: none; }

    .stats-badge {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        padding: 0.45rem 0.6rem;
        font-size: 0.62rem;
        border-radius: 12px;
        gap: 3px;
        width: 100%;
    }
    .stats-badge span {
        flex: 1 1 0;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 0 2px;
    }
    .stats-badge span i { margin-right: 3px; font-size: 0.6rem; }

    .hero-image { border-radius: 14px; border-width: 2px; margin-bottom: 1rem; }
    .hero-image img { height: clamp(130px, 38vw, 180px); }
    .hero-image figcaption { padding: 0.5rem 0.7rem; font-size: 0.68rem; }

    .quick-nav {
        gap: 6px; padding: 0.45rem; border-radius: 14px;
        overflow-x: auto; flex-wrap: nowrap;
        scrollbar-width: none; -webkit-overflow-scrolling: touch;
        margin-bottom: 1rem;
    }
    .quick-nav::-webkit-scrollbar { display: none; }
    .quick-nav a {
        flex: 0 0 auto; padding: 0.5rem 0.75rem;
        font-size: 0.7rem; border-radius: 10px; min-height: 38px;
        gap: 4px;
    }
    .quick-nav a i { font-size: 0.7rem; }

    .mini-stats {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 5px 8px;
        padding: 0.5rem 0.75rem;
        font-size: 0.64rem;
        border-radius: 12px;
        margin-bottom: 0.9rem;
    }
    .mini-stats span:last-child { grid-column: 1 / -1; text-align: center; }

    .progress-panel { margin-bottom: 0.9rem; }
    .progress-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .stat-box { padding: 0.7rem 0.8rem; border-radius: 12px; }
    .stat-box b { font-size: 1.2rem; }
    .stat-box span { font-size: 0.64rem; }
    .progress-bar-wrap { height: 4px; margin-top: 7px; }

    .notice {
        font-size: 0.72rem;
        padding: 0.7rem 0.85rem;
        gap: 8px;
        border-radius: 12px;
        margin-bottom: 1rem;
        line-height: 1.5;
    }
    .notice i { font-size: 0.95rem; }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.55rem;
        margin-bottom: 1.1rem;
    }
    .search-box {
        max-width: 100%;
        width: 100%;
        height: 44px;
        min-height: 44px;
        flex: 0 0 auto;
        padding: 0 0.35rem 0 1rem;
    }
    .search-box input { font-size: 0.85rem; height: 44px; padding: 0 0.6rem; }
    .search-box > i { font-size: 0.9rem; }
    .search-clear { width: 30px; height: 30px; font-size: 0.75rem; }

    .filter-pills {
        display: flex;
        flex-wrap: nowrap;
        gap: 6px;
        overflow-x: auto;
        padding: 2px 2px 6px 2px;
        width: 100%;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .filter-pills::-webkit-scrollbar { display: none; }
    .pill {
        flex: 0 0 auto;
        padding: 0 0.75rem;
        height: 36px;
        min-height: 36px;
        font-size: 0.72rem;
        gap: 4px;
    }
    .pill i { font-size: 0.7rem; }

    .section { margin: 1.25rem 0 0.7rem; }
    .section h2 { font-size: 0.88rem; gap: 6px; }
    .section h2 .code-chip { font-size: 0.64rem; padding: 0.2rem 0.6rem; }
    .section p { font-size: 0.72rem; }

    .ep-grid {
        grid-template-columns: 1fr;
        gap: 0.9rem;
        margin-bottom: 0.6rem;
    }

    .ep-card {
        padding: 0.95rem;
        border-radius: 16px;
        border-top-width: 4px;
    }
    .card-head { gap: 8px; margin-bottom: 0.75rem; }
    .card-badge { font-size: 0.66rem; padding: 0.32rem 0.65rem; }
    .card-title { font-size: 0.85rem; }
    .card-desc { font-size: 0.7rem; }

    .ep-list { gap: 8px; }
    .ep-item { padding: 0.7rem; border-radius: 11px; }
    .ep-head { gap: 8px; margin-bottom: 5px; }
    .ep-head strong { font-size: 0.76rem; line-height: 1.35; }
    .ep-check { width: 18px; height: 18px; min-width: 18px; }
    .ep-desc { font-size: 0.68rem; margin-left: 26px; margin-bottom: 7px; line-height: 1.5; }
    .ep-drive-row { margin-left: 26px; gap: 6px; }
    .ep-drive-info { font-size: 0.66rem; }
    .mini-drive { width: 30px; height: 30px; font-size: 0.75rem; border-radius: 9px; }

    .footer-note {
        padding: 0.85rem 1rem;
        border-radius: 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.7rem;
        margin-top: 1.75rem;
    }
    .footer-left { gap: 8px; }
    .footer-note i { font-size: 1.15rem; }
    .footer-note p { font-size: 0.72rem; line-height: 1.45; }
    .footer-note .highlight {
        font-size: 0.7rem;
        padding: 0.35rem 0.85rem;
        align-self: stretch;
        text-align: center;
    }

    .music-float-btn,
    .auto-scroll-btn,
    .back-top-btn {
        width: 46px; height: 46px;
        right: 12px;
    }
    .music-float-btn {
        bottom: max(126px, calc(env(safe-area-inset-bottom, 12px) + 112px));
        font-size: 1.05rem;
    }
    .auto-scroll-btn {
        bottom: max(72px, calc(env(safe-area-inset-bottom, 12px) + 58px));
        font-size: 1rem;
    }
    .back-top-btn {
        bottom: max(12px, env(safe-area-inset-bottom, 12px));
        font-size: 0.95rem;
    }
}

@media (max-width: 380px) {
    body { padding: 0.65rem 0 5.5rem; }
    .container { padding: 0 0.7rem; }
    .header-text h1 { font-size: 0.92rem; }
    .header-logo-wrap { width: 42px; height: 42px; font-size: 1.25rem; }
    .stats-badge { font-size: 0.58rem; }
    .stat-box b { font-size: 1.05rem; }
    .stat-box span { font-size: 0.6rem; }
    .mini-stats { font-size: 0.6rem; }
    .ep-card { padding: 0.85rem; }
    .ep-head strong { font-size: 0.73rem; }
    .ep-desc { font-size: 0.65rem; margin-left: 24px; }
    .ep-drive-row { margin-left: 24px; }
    .section h2 { font-size: 0.82rem; }
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================ */
/* EP ITEM ALTERNATIF (merah muda)              */
/* Untuk EP Panduan/SPO di PAP 5                */
/*                                              */
/* CATATAN:                                     */
/* Tombol .mini-drive TIDAK diubah warnanya     */
/* di sini. Tetap ikut aturan asli:             */
/*   - Hijau kalau ada link                     */
/*   - Merah (drive-empty) kalau link kosong    */
/* ============================================ */
.ep-item.ep-item-alt {
    background: linear-gradient(135deg, #fef2f2, #fef7f7);
    border: 1px solid #fecaca;
    border-left: 4px solid var(--c-danger);
}

.ep-item.ep-item-alt:hover {
    background: linear-gradient(135deg, #fee2e2, #fef2f2);
    border-color: #f87171;
}

.ep-item.ep-item-alt .ep-head strong {
    color: #991b1b;
}

.ep-item.ep-item-alt .ep-desc {
    color: #7f1d1d;
    opacity: 0.85;
}

.ep-item.ep-item-alt.is-done {
    background: linear-gradient(135deg, #fef2f2, #ffffff);
    border-color: #fca5a5;
}

.ep-item.ep-item-alt.is-done::before {
    background: var(--c-danger);
}