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

:root {
    --bg-0: #06080d;
    --bg-1: #0c1018;
    --bg-2: #131825;
    --bg-3: #1a2033;
    --bg-4: #222940;
    --bg-5: #2c3550;
    --border-1: #1e2538;
    --border-2: #2a3348;
    --border-3: #354060;
    --text-1: #f1f3f8;
    --text-2: #b0b8cc;
    --text-3: #7a849e;
    --text-4: #505a72;
    --blue: #4f8fff;
    --blue-dim: rgba(79,143,255,0.12);
    --blue-glow: rgba(79,143,255,0.25);
    --green: #22c55e;
    --green-dim: rgba(34,197,94,0.12);
    --green-glow: rgba(34,197,94,0.3);
    --red: #ef4444;
    --red-dim: rgba(239,68,68,0.12);
    --amber: #f59e0b;
    --amber-dim: rgba(245,158,11,0.12);
    --purple: #a855f7;
    --r: 10px;
    --r-lg: 14px;
    --r-sm: 7px;
    --r-xs: 5px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html { font-size: 14px; }
body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg-0);
    color: var(--text-1);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
#bgCanvas {
    position: fixed; inset: 0; z-index: 0;
    width: 100%; height: 100%;
    pointer-events: none;
}

/* ===== LOGIN GATE ===== */
.login-gate {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    background: transparent;
    position: relative; z-index: 1;
}
.login-card {
    width: 100%; max-width: 360px;
    background: rgba(19,24,37,0.85);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-2);
    border-radius: 16px;
    padding: 40px 32px 36px;
    display: flex; flex-direction: column; align-items: center;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(79,143,255,0.05);
}
.login-logo {
    width: 56px; height: 56px;
    border-radius: 14px;
    object-fit: contain;
    margin-bottom: 16px;
}
.login-title {
    font-size: 1.4rem; font-weight: 800;
    letter-spacing: -0.03em; color: var(--text-1);
    margin-bottom: 4px;
}
.login-sub {
    font-size: 0.8rem; color: var(--text-4);
    margin-bottom: 28px;
}
.login-form { width: 100%; display: flex; flex-direction: column; gap: 16px; }
.login-field { display: flex; flex-direction: column; gap: 5px; }
.login-label {
    font-size: 0.72rem; font-weight: 600; color: var(--text-3);
    text-transform: uppercase; letter-spacing: 0.05em;
}
.login-input {
    width: 100%; padding: 10px 14px;
    background: var(--bg-3); border: 1px solid var(--border-1);
    border-radius: var(--r-sm); color: var(--text-1);
    font-family: inherit; font-size: 0.9rem;
    transition: border-color 0.15s var(--ease);
}
.login-input::placeholder { color: var(--text-4); }
.login-input:focus { outline: none; border-color: var(--blue); }
.login-error {
    font-size: 0.78rem; color: var(--red);
    text-align: center; padding: 8px;
    background: var(--red-dim); border-radius: var(--r-xs);
}
.login-btn {
    width: 100%; padding: 11px;
    background: var(--blue); color: #fff;
    border: none; border-radius: var(--r-sm);
    font-family: inherit; font-size: 0.88rem; font-weight: 700;
    cursor: pointer;
    transition: all 0.15s var(--ease);
}
.login-btn:hover { filter: brightness(1.1); }
.login-btn:active { transform: scale(0.98); }
.login-shake {
    animation: shake 0.4s ease;
}
@keyframes shake {
    0%,100% { transform: translateX(0); }
    20%,60% { transform: translateX(-8px); }
    40%,80% { transform: translateX(8px); }
}

/* ===== HEADER ===== */
.header {
    background: var(--bg-1);
    border-bottom: 1px solid var(--border-1);
    position: sticky; top: 0; z-index: 100;
}
.header-inner {
    max-width: 1480px; margin: 0 auto;
    padding: 12px 20px;
    display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; cursor: pointer; }
.logo-mark {
    width: 34px; height: 34px;
    border-radius: 9px;
    object-fit: contain;
}
.logo-text { display: flex; flex-direction: column; }
.logo-title { font-weight: 800; font-size: 1.1rem; letter-spacing: -0.03em; line-height: 1.1; }
.logo-sub { font-size: 0.65rem; color: var(--text-3); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }

.header-stats { display: flex; gap: 16px; font-size: 0.78rem; color: var(--text-3); }
.stat { display: flex; align-items: center; gap: 5px; }
.stat-val { font-weight: 700; color: var(--text-1); font-size: 0.85rem; }
.stat-live {
    color: var(--green);
    display: flex; align-items: center; gap: 5px;
}
.stat-soon {
    color: var(--amber);
}
.stat-clickable {
    cursor: pointer; padding: 3px 8px; border-radius: 6px;
    transition: all 0.15s var(--ease);
    border: 1px solid transparent;
}
.stat-clickable:hover { background: var(--bg-3); }
.stat-clickable.stat-active.stat-live {
    background: var(--green-dim); border-color: rgba(34,197,94,0.3);
}
.stat-clickable.stat-active.stat-soon {
    background: var(--amber-dim); border-color: rgba(245,158,11,0.3);
}
.live-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green-glow);
    animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* ===== CONTROLS ===== */
.controls {
    background: var(--bg-1);
    border-bottom: 1px solid var(--border-1);
    position: sticky; top: 59px; z-index: 99;
    overflow: visible;
}
.controls-inner {
    max-width: 1480px; margin: 0 auto;
    padding: 10px 20px 12px;
    display: flex; flex-direction: column; gap: 10px;
    overflow: visible;
}

/* Date pills */
.date-nav { display: flex; align-items: center; gap: 4px; }
.date-arrow {
    background: var(--bg-3); border: 1px solid var(--border-1);
    color: var(--text-3); cursor: pointer;
    width: 32px; height: 32px; border-radius: var(--r-sm);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s var(--ease); flex-shrink: 0;
}
.date-arrow:hover { background: var(--bg-4); color: var(--text-1); border-color: var(--border-2); }
.date-pills {
    display: flex; gap: 3px; overflow-x: auto; flex: 1;
    scrollbar-width: none; padding: 2px 0;
}
.date-pills::-webkit-scrollbar { display: none; }
.date-pill {
    padding: 5px 12px; border-radius: 20px;
    font-size: 0.78rem; font-weight: 500;
    white-space: nowrap; cursor: pointer;
    background: transparent; border: 1px solid transparent;
    color: var(--text-3); transition: all 0.15s var(--ease);
    display: flex; flex-direction: column; align-items: center; gap: 1px;
    font-family: inherit;
}
.date-pill:hover { color: var(--text-2); background: var(--bg-3); }
.date-pill.active {
    background: var(--blue-dim); color: var(--blue);
    border-color: rgba(79,143,255,0.25); font-weight: 700;
}
.date-pill .dp-day { font-size: 0.68rem; opacity: 0.7; text-transform: uppercase; }
.date-pill .dp-num { font-size: 0.9rem; font-weight: 700; line-height: 1; }

/* Filters */
.filters-row {
    display: flex; flex-direction: column; gap: 8px;
    overflow: visible;
}
.filter-chip-group {
    display: flex; gap: 4px; flex-wrap: wrap; width: 100%;
}
.filter-chip {
    padding: 4px 10px; border-radius: 16px;
    font-size: 0.72rem; font-weight: 600;
    white-space: nowrap; cursor: pointer;
    background: var(--bg-3); border: 1px solid var(--border-1);
    color: var(--text-3); transition: all 0.15s var(--ease);
    font-family: inherit;
}
.filter-chip:hover { background: var(--bg-4); color: var(--text-2); }
.filter-chip.active {
    background: var(--blue-dim); color: var(--blue);
    border-color: rgba(79,143,255,0.3);
}
.filter-controls { display: flex; gap: 6px; flex-shrink: 0; }
.search-wrap {
    position: relative; width: 200px;
}
.search-icon {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    color: var(--text-4); pointer-events: none;
}
.search-input {
    width: 100%; padding: 6px 28px 6px 32px;
    background: var(--bg-3); border: 1px solid var(--border-1);
    border-radius: var(--r-sm); color: var(--text-1);
    font-family: inherit; font-size: 0.8rem;
    transition: border-color 0.15s var(--ease);
}
.search-input::placeholder { color: var(--text-4); }
.search-input:focus { outline: none; border-color: var(--blue); }
.search-clear {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--text-4); cursor: pointer;
    font-size: 1.1rem; line-height: 1; padding: 2px;
}
.filter-select {
    padding: 6px 28px 6px 10px;
    background: var(--bg-3); border: 1px solid var(--border-1);
    border-radius: var(--r-sm); color: var(--text-2);
    font-family: inherit; font-size: 0.8rem; cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23505a72' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 6px center;
    transition: border-color 0.15s var(--ease);
}
.filter-select:focus { outline: none; border-color: var(--blue); }

/* ===== MAIN ===== */
.main {
    max-width: 1480px; margin: 0 auto;
    padding: 16px 20px 48px;
}
.state-msg {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 80px 20px; color: var(--text-4); gap: 8px;
}
.spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--border-2); border-top-color: var(--blue);
    border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-icon { font-size: 2.5rem; opacity: 0.5; }
.empty-title { font-size: 1rem; font-weight: 600; color: var(--text-3); }
.empty-sub { font-size: 0.82rem; }

/* ===== LEAGUE SECTION ===== */
.league-section { margin-bottom: 24px; }
.league-header {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 0; margin-bottom: 10px;
    z-index: 10;
    background: var(--bg-0);
}
.league-badge {
    width: 24px; height: 24px; object-fit: contain; border-radius: 4px;
    flex-shrink: 0;
}
.league-badge-placeholder {
    width: 24px; height: 24px; border-radius: 4px;
    background: var(--bg-4); display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700; color: var(--text-4); flex-shrink: 0;
}
.league-title {
    font-size: 0.82rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--text-2);
}
.league-sport {
    font-size: 0.7rem; color: var(--text-4); font-weight: 500;
}
.league-line { flex: 1; height: 1px; background: var(--border-1); }
.league-count {
    font-size: 0.7rem; color: var(--text-4); font-weight: 600;
    background: var(--bg-3); padding: 2px 8px; border-radius: 10px;
}

.league-events {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 10px;
}

/* ===== EVENT CARD ===== */
.ev-card {
    background: var(--bg-2);
    border: 1px solid var(--border-1);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: all 0.2s var(--ease);
    cursor: pointer;
    display: flex; flex-direction: column;
}
.ev-card:hover {
    border-color: var(--border-2);
    background: var(--bg-3);
    transform: translateY(-1px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.ev-card-live {
    border-color: rgba(34,197,94,0.3);
    box-shadow: 0 0 12px rgba(34,197,94,0.08);
}
.ev-card-live:hover {
    border-color: rgba(34,197,94,0.5);
}
.ev-live-bar {
    display: flex; align-items: center; gap: 6px;
    padding: 4px 16px;
    background: var(--green-dim);
    color: var(--green);
    font-size: 0.65rem; font-weight: 800;
    letter-spacing: 0.06em;
}

/* Card body */
.ev-body {
    padding: 14px 16px 10px;
    display: flex; align-items: center; gap: 12px;
    flex: 1;
}

/* Time column */
.ev-time-col {
    display: flex; flex-direction: column; align-items: center;
    min-width: 54px; gap: 2px;
}
.ev-time {
    font-size: 0.95rem; font-weight: 700; color: var(--text-1);
    line-height: 1;
}
.ev-time-ampm {
    font-size: 0.6rem; font-weight: 600; color: var(--text-3);
    text-transform: uppercase;
}
.ev-status-badge {
    font-size: 0.62rem; font-weight: 800; padding: 2px 6px;
    border-radius: 4px; text-transform: uppercase; letter-spacing: 0.04em;
    line-height: 1.3;
}
.badge-live { background: var(--green-dim); color: var(--green); text-transform: none; }
.badge-ft { background: rgba(100,116,139,0.15); color: var(--text-4); text-transform: none; }
.badge-soon { background: var(--amber-dim); color: var(--amber); text-transform: none; }
.badge-upcoming { background: var(--blue-dim); color: var(--blue); }
.badge-ppd { background: var(--amber-dim); color: var(--amber); }

/* Matchup area */
.ev-matchup { flex: 1; min-width: 0; }

/* Team event */
.ev-teams {
    display: flex; flex-direction: column; gap: 6px;
}
.ev-team-row {
    display: flex; align-items: center; gap: 8px;
}
.ev-team-logo {
    width: 28px; height: 28px; object-fit: contain;
    border-radius: 4px; flex-shrink: 0;
}
.ev-team-logo-ph {
    width: 28px; height: 28px; border-radius: 4px;
    background: var(--bg-4);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.72rem; font-weight: 800; color: var(--text-4);
    flex-shrink: 0;
}
.ev-team-name {
    font-size: 0.88rem; font-weight: 600; color: var(--text-1);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ev-team-tag {
    font-size: 0.58rem; font-weight: 600; color: var(--text-4);
    text-transform: uppercase; letter-spacing: 0.04em;
    flex-shrink: 0;
}
.ev-at {
    font-size: 0.62rem; color: var(--text-4); font-weight: 600;
    padding-left: 36px; line-height: 1;
}

/* Non-team event */
.ev-single {
    display: flex; flex-direction: column; gap: 3px;
}
.ev-single-name {
    font-size: 0.92rem; font-weight: 700; color: var(--text-1);
    line-height: 1.3;
}
.ev-single-sub {
    font-size: 0.72rem; color: var(--text-3);
}

/* Venue */
.ev-venue {
    font-size: 0.68rem; color: var(--text-4); padding-left: 36px;
    margin-top: 2px; display: flex; align-items: center; gap: 4px;
}
.ev-venue svg { flex-shrink: 0; }

/* Channels bar */
.ev-channels {
    padding: 8px 16px 10px;
    border-top: 1px solid var(--border-1);
    display: flex; align-items: center; gap: 6px;
    flex-wrap: wrap;
}
.ch-pill {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 2px 7px; border-radius: 4px;
    background: var(--bg-4); font-size: 0.68rem; font-weight: 500;
    color: var(--text-3); white-space: nowrap;
    border: 1px solid transparent;
    transition: all 0.12s var(--ease);
}
.ch-pill:hover { border-color: var(--border-3); color: var(--text-2); }
.ch-flag { font-size: 0.72rem; }
.ch-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.ch-more {
    font-size: 0.68rem; color: var(--blue); font-weight: 600; cursor: pointer;
    padding: 2px 4px;
}
.ch-count {
    font-size: 0.62rem; color: var(--text-4); font-weight: 600;
    margin-left: auto; flex-shrink: 0;
    display: flex; align-items: center; gap: 3px;
}
.ch-count svg { opacity: 0.5; }

/* ===== MODAL ===== */
.modal {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    overflow: hidden;
}
.modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.65); backdrop-filter: blur(6px);
}
.modal-sheet {
    position: relative; background: var(--bg-2);
    border: 1px solid var(--border-2);
    border-radius: 16px;
    max-width: 640px; width: calc(100% - 40px);
    max-height: calc(100vh - 40px); overflow-y: auto; overflow-x: hidden;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    animation: modalIn 0.2s var(--ease);
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-handle { display: none; }
.modal-head {
    padding: 16px 20px; display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border-1);
}
.modal-league-info { display: flex; align-items: center; gap: 10px; }
.modal-league-info img { width: 28px; height: 28px; object-fit: contain; border-radius: 4px; }
.modal-league-text { display: flex; flex-direction: column; }
.modal-league-name { font-size: 0.92rem; font-weight: 700; }
.modal-sport-name { font-size: 0.7rem; color: var(--text-4); }
.modal-close {
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--bg-4); border: 1px solid var(--border-2);
    color: var(--text-3); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.12s var(--ease);
}
.modal-close:hover { background: var(--bg-5); color: var(--text-1); }

.modal-matchup {
    padding: 24px 20px; display: flex; align-items: center;
    gap: 16px; justify-content: center;
}
.modal-team { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; }
.modal-team-badge {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--bg-4); border: 2px solid var(--border-2);
    display: flex; align-items: center; justify-content: center; padding: 8px;
}
.modal-team-badge img { width: 100%; height: 100%; object-fit: contain; }
.modal-team-name { font-size: 0.95rem; font-weight: 700; text-align: center; }
.modal-vs { font-size: 0.9rem; font-weight: 900; color: var(--text-4); }

.modal-event-name {
    padding: 24px 20px; text-align: center;
    font-size: 1.15rem; font-weight: 700; line-height: 1.4;
}

.modal-meta {
    padding: 0 20px 16px; display: flex; flex-wrap: wrap;
    gap: 8px; justify-content: center;
}
.meta-tag {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 10px; border-radius: var(--r-sm);
    background: var(--bg-3); border: 1px solid var(--border-1);
    font-size: 0.78rem; color: var(--text-2);
}
.meta-tag svg { width: 13px; height: 13px; color: var(--blue); flex-shrink: 0; }

.modal-ch-section {
    padding: 14px 20px 20px; border-top: 1px solid var(--border-1);
}
.modal-ch-title {
    font-size: 0.75rem; font-weight: 700; color: var(--text-4);
    text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px;
}
.modal-ch-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.modal-ch-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; background: var(--bg-3);
    border: 1px solid var(--border-1); border-radius: var(--r-sm);
    transition: all 0.12s var(--ease);
    min-width: 0; overflow: hidden;
}
.modal-ch-item:hover { border-color: var(--border-2); background: var(--bg-4); }
.modal-ch-flag { font-size: 1.1rem; flex-shrink: 0; }
.modal-ch-details { flex: 1; min-width: 0; overflow: hidden; }
.modal-ch-name {
    font-size: 0.8rem; font-weight: 600; color: var(--text-1);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: 100%;
}
.modal-ch-section { overflow: hidden; }
.modal-ch-grid { overflow: hidden; }
.modal-ch-id {
    font-size: 0.65rem; color: var(--text-4);
    font-family: 'SF Mono', 'Fira Code', monospace;
}
.modal-ch-country {
    font-size: 0.62rem; font-weight: 700; color: var(--blue);
    background: var(--blue-dim); padding: 1px 6px; border-radius: 3px;
    flex-shrink: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .league-events { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    /* Header: stack logo + stats vertically */
    .header-inner {
        flex-wrap: wrap; gap: 8px;
        padding: 10px 14px;
    }
    .header-stats {
        display: flex; width: 100%;
        gap: 8px; font-size: 0.72rem;
        overflow-x: auto; scrollbar-width: none;
    }
    .header-stats::-webkit-scrollbar { display: none; }
    /* Hide non-essential stats on mobile, keep Live & Starting Soon */
    .header-stats .stat:not(.stat-live):not(.stat-soon) { display: none; }

    /* Controls */
    .controls-inner { padding: 8px 12px 10px; gap: 8px; }
    .filters-row { flex-direction: column; }
    .filter-controls { width: 100%; }
    .search-wrap { flex: 1; width: auto; }
    .filter-select { flex: 1; min-width: 0; }
    .date-nav { gap: 2px; }
    .date-pill { padding: 4px 8px; font-size: 0.72rem; }
    .date-pill .dp-num { font-size: 0.82rem; }
    .date-arrow { width: 28px; height: 28px; }

    /* Sport chips: smaller on mobile */
    .filter-chip { padding: 3px 8px; font-size: 0.68rem; }

    /* Cards */
    .ev-body { padding: 10px 12px 8px; gap: 10px; }
    .ev-channels { padding: 6px 12px 8px; }
    .ev-time-col { min-width: 48px; }
    .ev-time { font-size: 0.88rem; }
    .ev-team-name { font-size: 0.82rem; }
    .ev-team-logo, .ev-team-logo-ph { width: 24px; height: 24px; }
    .ev-at { padding-left: 32px; }
    .ev-venue { padding-left: 32px; }
    .ev-single-name { font-size: 0.85rem; }

    /* League headers */
    .league-header { gap: 8px; }
    .league-title { font-size: 0.75rem; }
    .league-badge, .league-badge-placeholder { width: 20px; height: 20px; }
    .league-section { margin-bottom: 16px; }

    /* Main content */
    .main { padding: 12px 12px 40px; }

    /* Modal: bottom sheet on mobile */
    .modal { align-items: flex-end; padding: 0; }
    .modal-sheet {
        width: 100%; max-width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 90vh;
        animation: modalSlideUp 0.25s var(--ease);
    }
    .modal-handle {
        display: block; width: 36px; height: 4px;
        background: var(--border-2); border-radius: 2px;
        margin: 8px auto 4px;
    }
    .modal-ch-grid { grid-template-columns: 1fr; }
    .modal-matchup { gap: 10px; padding: 16px 16px; }
    .modal-team-badge { width: 48px; height: 48px; }
    .modal-team-name { font-size: 0.85rem; }
    .modal-head { padding: 12px 16px; }
    .modal-meta { padding: 0 16px 12px; gap: 6px; }
    .modal-ch-section { padding: 12px 16px 16px; }
    .meta-tag { font-size: 0.72rem; padding: 4px 8px; }
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 400px) {
    html { font-size: 13px; }
    .header-inner { padding: 8px 10px; }
    .controls-inner { padding: 6px 10px 8px; }
    .main { padding: 10px 10px 32px; }
    .ev-body { padding: 8px 10px 6px; gap: 8px; }
    .ev-channels { padding: 5px 10px 6px; }
    .ev-time-col { min-width: 44px; }
    .ev-time { font-size: 0.82rem; }
    .ev-status-badge { font-size: 0.58rem; padding: 1px 5px; }
    .ch-pill { font-size: 0.62rem; padding: 1px 5px; }
    .date-pill { padding: 3px 6px; }
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
