:root {
  color-scheme: dark;
  --bg: #070609;
  --bg-soft: #0d0b11;
  --panel: #121016;
  --panel-2: #18131f;
  --panel-3: #21172c;
  --line: rgba(192, 132, 252, .13);
  --line-strong: rgba(192, 132, 252, .28);
  --text: #f7f1ff;
  --muted: #9b91a5;
  --purple: #9d4edd;
  --purple-light: #c77dff;
  --purple-dark: #5a189a;
  --green: #42d392;
  --amber: #f6c85f;
  --red: #ff6b7a;
  --blue: #6da8ff;
  --radius: 16px;
  --shadow: 0 20px 60px rgba(0,0,0,.34);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif; }
body {
  background:
    radial-gradient(circle at 76% -10%, rgba(123,44,191,.15), transparent 30rem),
    radial-gradient(circle at 16% 110%, rgba(90,24,154,.12), transparent 35rem),
    var(--bg);
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

.app-shell { display: grid; grid-template-columns: 248px minmax(0,1fr); min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 248px; display: flex; flex-direction: column;
  border-right: 1px solid var(--line); background: rgba(9,7,12,.94); backdrop-filter: blur(24px);
  z-index: 30; box-shadow: 12px 0 60px rgba(0,0,0,.22);
}
.brand { height: 88px; display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.brand-mark { width: 50px; height: 50px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 15px; background: linear-gradient(145deg,#191220,#0a080d); box-shadow: inset 0 0 24px rgba(157,78,221,.13), 0 7px 24px rgba(0,0,0,.4); }
.brand-mark img { width: 44px; height: 44px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1; }
.brand-copy strong { font-size: 21px; letter-spacing: .08em; text-transform: uppercase; }
.brand-copy small { color: var(--purple-light); font-size: 11px; letter-spacing: .14em; margin-top: 6px; text-transform: uppercase; }

.nav { padding: 16px 12px; flex: 1; overflow-y: auto; }
.nav a { display: flex; align-items: center; min-height: 45px; gap: 12px; margin: 3px 0; padding: 0 12px; border: 1px solid transparent; border-radius: 11px; color: #bcb4c5; font-size: 14px; font-weight: 600; transition: .18s ease; }
.nav a:hover { color: var(--text); background: rgba(157,78,221,.08); }
.nav a.active { color: #fff; border-color: rgba(199,125,255,.18); background: linear-gradient(90deg,rgba(123,44,191,.3),rgba(123,44,191,.08)); box-shadow: inset 3px 0 0 var(--purple-light); }
.nav-icon { width: 22px; text-align: center; color: var(--purple-light); font-size: 16px; }
.nav-label { color: #6e6677; margin: 25px 12px 9px; font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.badge { margin-left: auto; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 6px; background: var(--purple); border-radius: 20px; font-size: 10px; color: #fff; }
.sidebar-foot { display: flex; align-items: center; gap: 10px; min-height: 70px; padding: 13px 20px; border-top: 1px solid var(--line); background: #09070c; }
.sidebar-foot > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.sidebar-foot strong { font-size: 12px; }
.sidebar-foot small { margin-top: 3px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 10px; }
.status-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--amber); box-shadow: 0 0 14px currentColor; }
.status-dot.online { background: var(--green); }
.status-dot.offline { background: var(--red); }

.workspace { min-width: 0; grid-column: 2; }
.topbar { position: sticky; top: 0; z-index: 20; height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 clamp(22px,4vw,58px); border-bottom: 1px solid var(--line); background: rgba(7,6,9,.78); backdrop-filter: blur(24px); }
.page-heading h1 { font-size: clamp(22px,2vw,29px); margin: 3px 0 0; letter-spacing: -.025em; }
.eyebrow { color: var(--purple-light); font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-button, .primary-button, .secondary-button, .danger-button, .ghost-button {
  border: 0; border-radius: 11px; cursor: pointer; transition: transform .15s, background .15s, border-color .15s, opacity .15s;
}
.icon-button:hover, .primary-button:hover, .secondary-button:hover, .danger-button:hover { transform: translateY(-1px); }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--panel); color: #d9cfe1; font-size: 18px; }
.primary-button, .secondary-button, .danger-button, .ghost-button { min-height: 41px; padding: 0 16px; font-weight: 750; font-size: 13px; }
.primary-button { color: #fff; background: linear-gradient(135deg,var(--purple-dark),var(--purple)); box-shadow: 0 10px 28px rgba(123,44,191,.24); }
.secondary-button { border: 1px solid var(--line-strong); color: var(--text); background: var(--panel-2); }
.danger-button { border: 1px solid rgba(255,107,122,.3); color: #ffb0b9; background: rgba(255,107,122,.1); }
.ghost-button { color: var(--purple-light); background: transparent; }
button:disabled { cursor: wait; opacity: .52; transform: none !important; }
.mobile-menu { display: none; }

main { padding: 34px clamp(22px,4vw,58px) 70px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.section-head h2 { margin: 0 0 5px; font-size: 20px; }
.section-head p { margin: 0; color: var(--muted); font-size: 13px; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.search-field { position: relative; min-width: min(300px,100%); }
.search-field input { width: 100%; padding-left: 38px; }
.search-field::before { content: "⌕"; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--purple-light); font-size: 20px; }

.hero {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0,1.2fr) minmax(270px,.8fr);
  min-height: 260px; padding: clamp(28px,4vw,50px); border: 1px solid var(--line);
  border-radius: 24px; background: linear-gradient(120deg,#130d19 0%,#0c090f 52%,#1e0f2c 100%); box-shadow: var(--shadow);
}
.hero::before { content: ""; position: absolute; inset: -100px -60px auto auto; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle,rgba(157,78,221,.28),transparent 68%); }
.hero-copy { position: relative; z-index: 1; align-self: center; }
.hero h2 { max-width: 660px; margin: 10px 0 14px; font-size: clamp(30px,4vw,54px); line-height: 1.02; letter-spacing: -.05em; }
.hero h2 em { color: var(--purple-light); font-style: normal; }
.hero p { max-width: 610px; margin: 0; color: #b9adbf; font-size: 15px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-art { position: relative; display: grid; place-items: center; }
.hero-art img { width: min(250px,80%); filter: drop-shadow(0 25px 50px rgba(0,0,0,.5)); animation: hover 5s ease-in-out infinite; }
@keyframes hover { 50% { transform: translateY(-7px) rotate(-1deg); } }

.stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin: 22px 0 34px; }
.stat-card { position: relative; overflow: hidden; min-height: 118px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg,var(--panel),#0d0b10); }
.stat-card::after { content: ""; position: absolute; right: -30px; bottom: -45px; width: 110px; height: 110px; border-radius: 50%; background: rgba(157,78,221,.08); }
.stat-card span { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.stat-card strong { display: block; margin-top: 12px; font-size: 30px; letter-spacing: -.04em; }
.stat-card small { display: block; margin-top: 5px; color: #776d80; font-size: 11px; }

.two-column { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(300px,.75fr); gap: 20px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(18,16,22,.88); box-shadow: 0 12px 38px rgba(0,0,0,.14); }
.panel-header { min-height: 65px; display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-header h3 { margin: 0; font-size: 15px; }
.panel-header small { color: var(--muted); }
.panel-body { padding: 16px 18px; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(175px,1fr)); gap: 18px; }
.media-card { position: relative; overflow: hidden; min-width: 0; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); cursor: pointer; transition: transform .18s,border-color .18s,box-shadow .18s; }
.media-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 18px 45px rgba(0,0,0,.34),0 0 28px rgba(123,44,191,.08); }
.poster { aspect-ratio: 2/3; overflow: hidden; background: linear-gradient(145deg,#1b1521,#0b090d); }
.poster img { width: 100%; height: 100%; display: block; object-fit: cover; }
.poster-placeholder { width: 100%; height: 100%; display: grid; place-items: center; }
.poster-placeholder img { width: 70%; height: auto; object-fit: contain; opacity: .62; }
.media-card-content { padding: 13px 14px 15px; }
.media-card h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0 0 7px; font-size: 14px; }
.media-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }
.card-tags { position: absolute; display: flex; gap: 6px; top: 9px; left: 9px; right: 9px; justify-content: space-between; pointer-events: none; }
.tag { min-height: 22px; display: inline-flex; align-items: center; padding: 0 8px; border: 1px solid rgba(255,255,255,.1); border-radius: 20px; background: rgba(5,4,7,.78); backdrop-filter: blur(10px); color: #ddd4e4; font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.tag.movie { color: #d9b2ff; }
.tag.series { color: #a8d1ff; }
.tag.good { color: #8ee8bd; }
.tag.missing { color: #ffb6bf; }
.monitor { color: var(--purple-light); }
.monitor.off { color: #675e6e; }

.empty-state, .loading-state { min-height: 320px; display: grid; place-items: center; align-content: center; text-align: center; padding: 40px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); }
.empty-state img, .loading-state img { width: 92px; opacity: .64; }
.empty-state h2, .loading-state h2 { margin: 14px 0 7px; color: var(--text); font-size: 20px; }
.empty-state p, .loading-state p { margin: 0 0 18px; font-size: 13px; }
.loading-state { border: 0; }

.event-list, .history-list { display: grid; gap: 6px; }
.event-row, .history-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 58px; padding: 9px 5px; border-bottom: 1px solid rgba(192,132,252,.08); }
.event-row:last-child, .history-row:last-child { border: 0; }
.event-date, .history-icon { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--purple-light); font-weight: 800; font-size: 11px; text-align: center; }
.event-row strong, .history-row strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.event-row small, .history-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 14px; border-bottom: 1px solid var(--line-strong); color: #82788a; text-align: left; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
td { padding: 14px; border-bottom: 1px solid rgba(192,132,252,.08); color: #d5ccdc; font-size: 12px; }
tbody tr:hover { background: rgba(157,78,221,.035); }
.title-cell strong { display: block; max-width: 430px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.title-cell small { display: block; margin-top: 4px; color: var(--muted); }
.progress { min-width: 120px; width: 100%; height: 7px; overflow: hidden; border: 0; border-radius: 8px; background: #29202f; appearance: none; }
.progress::-webkit-progress-bar { background: #29202f; border-radius: 8px; }
.progress::-webkit-progress-value { background: linear-gradient(90deg,var(--purple-dark),var(--purple-light)); border-radius: 8px; }
.progress::-moz-progress-bar { background: linear-gradient(90deg,var(--purple-dark),var(--purple-light)); border-radius: 8px; }
.state { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 20px; background: rgba(255,255,255,.04); color: var(--muted); font-size: 10px; text-transform: capitalize; }
.state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.state.imported, .state.completed { color: var(--green); }
.state.failed, .state.import_failed { color: var(--red); }
.state.downloading, .state.queued { color: var(--purple-light); }
.row-actions { display: flex; justify-content: end; gap: 6px; }
.row-actions button { min-height: 30px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: #17121c; cursor: pointer; color: #c8becf; font-size: 11px; }

.calendar { display: grid; gap: 20px; }
.calendar-day { display: grid; grid-template-columns: 88px minmax(0,1fr); gap: 15px; }
.day-label { padding-top: 12px; color: var(--muted); text-align: right; font-size: 11px; text-transform: uppercase; }
.day-label strong { display: block; margin-top: 3px; color: var(--text); font-size: 22px; }
.day-events { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 10px; }
.calendar-event { display: grid; grid-template-columns: 46px minmax(0,1fr) auto; align-items: center; gap: 11px; min-height: 67px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.calendar-event img { width: 46px; height: 47px; border-radius: 8px; object-fit: cover; }
.calendar-event strong { display: block; font-size: 12px; }
.calendar-event small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }

.settings-layout { display: grid; grid-template-columns: 210px minmax(0,1fr); gap: 22px; }
.settings-nav { align-self: start; position: sticky; top: 112px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.settings-nav button { width: 100%; min-height: 41px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; text-align: left; font-size: 12px; font-weight: 650; }
.settings-nav button:hover, .settings-nav button.active { background: rgba(157,78,221,.11); color: var(--text); }
.settings-pane { min-width: 0; }
.settings-section { margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.settings-section-header { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.settings-section-header h3 { margin: 0 0 5px; font-size: 15px; }
.settings-section-header p { margin: 0; color: var(--muted); font-size: 11px; }
.settings-section-body { padding: 20px; }
.settings-list { display: grid; gap: 9px; }
.setting-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 16px; min-height: 62px; padding: 11px 13px; border: 1px solid rgba(192,132,252,.1); border-radius: 11px; background: #0e0b12; }
.setting-card strong { display: block; font-size: 12px; }
.setting-card small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.settings-footer { display: flex; justify-content: end; gap: 10px; margin-top: 14px; }

.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.field { min-width: 0; display: grid; gap: 7px; }
.field.full { grid-column: 1/-1; }
.field label { color: #aaa0b2; font-size: 10px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
input, select, textarea { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line-strong); outline: 0; border-radius: 10px; background: #0b090e; color: var(--text); transition: border-color .15s,box-shadow .15s; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(157,78,221,.12); }
.field-help { color: #746c7c; font-size: 10px; line-height: 1.45; }
.checkbox { display: flex; align-items: center; gap: 9px; color: #c8bfce; font-size: 12px; }
.checkbox input { width: 17px; min-height: 17px; accent-color: var(--purple); }

.modal-layer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.76); backdrop-filter: blur(10px); animation: fade .18s ease; }
.modal { position: relative; width: min(860px,100%); max-height: min(860px,calc(100vh - 40px)); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 20px; background: #100d14; box-shadow: 0 35px 100px rgba(0,0,0,.65),0 0 70px rgba(123,44,191,.12); animation: rise .2s ease; }
.modal.wide { width: min(1120px,100%); }
.modal-header { min-height: 77px; display: flex; align-items: center; justify-content: space-between; padding: 16px 21px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 4px 0 0; font-size: 20px; }
.modal-body { overflow: auto; padding: 22px; }
.modal-footer { display: flex; justify-content: end; gap: 10px; min-height: 70px; align-items: center; padding: 13px 21px; border-top: 1px solid var(--line); background: #0c0a0f; }
.search-results { display: grid; gap: 9px; margin-top: 16px; }
.search-result { display: grid; grid-template-columns: 62px minmax(0,1fr) auto; align-items: center; gap: 14px; min-height: 92px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.search-result > img { width: 62px; height: 78px; object-fit: cover; border-radius: 8px; background: var(--panel-2); }
.search-result h3 { margin: 0 0 5px; font-size: 14px; }
.search-result p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.search-result .tag { margin-bottom: 6px; }
.detail-hero { position: relative; overflow: hidden; min-height: 300px; margin: -22px -22px 0; display: grid; grid-template-columns: 165px minmax(0,1fr); align-items: end; gap: 22px; padding: 95px 25px 25px; background: linear-gradient(to top,#100d14 4%,rgba(16,13,20,.77) 55%,rgba(16,13,20,.55)); }
.detail-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .24; mask-image: linear-gradient(to bottom,#000 0%,transparent 100%); }
.detail-poster { position: relative; width: 165px; aspect-ratio: 2/3; object-fit: cover; border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.detail-copy { position: relative; }
.detail-copy h2 { margin: 7px 0 8px; font-size: 29px; }
.detail-copy p { max-width: 700px; margin: 13px 0 0; color: #b8aec0; font-size: 12px; line-height: 1.6; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.season { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.season h3 { margin: 0; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--panel-2); font-size: 13px; }
.episode-row { display: grid; grid-template-columns: 64px minmax(0,1fr) auto auto; align-items: center; gap: 12px; min-height: 58px; padding: 10px 14px; border-bottom: 1px solid rgba(192,132,252,.08); }
.episode-row:last-child { border: 0; }
.episode-code { color: var(--purple-light); font-weight: 800; font-size: 11px; }
.episode-row strong { display: block; font-size: 11px; }
.episode-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.release-title { max-width: 620px; }
.reject { color: var(--red); font-size: 10px; }

.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 9px; }
.toast { width: min(360px,calc(100vw - 40px)); padding: 14px 15px; border: 1px solid var(--line-strong); border-left: 3px solid var(--purple-light); border-radius: 11px; background: #17121c; box-shadow: var(--shadow); animation: slide .2s ease; font-size: 12px; line-height: 1.5; }
.toast.error { border-left-color: var(--red); }
.toast.success { border-left-color: var(--green); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: "Cascadia Code",Consolas,monospace; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.985); } }
@keyframes slide { from { opacity: 0; transform: translateX(15px); } }

@media (max-width: 1050px) {
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .two-column { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr 220px; }
}
@media (max-width: 820px) {
  .app-shell { display: block; }
  .workspace { grid-column: auto; }
  .sidebar { transform: translateX(-102%); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: grid; }
  .topbar { padding: 0 18px; }
  main { padding: 24px 18px 60px; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; display: flex; overflow-x: auto; }
  .settings-nav button { min-width: max-content; width: auto; }
}
@media (max-width: 620px) {
  .page-heading .eyebrow, #refreshButton { display: none; }
  .primary-button { padding: 0 12px; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding: 28px 24px; }
  .hero-art { display: none; }
  .hero h2 { font-size: 34px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { min-height: 103px; padding: 16px; }
  .stat-card strong { font-size: 25px; }
  .media-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .section-head { align-items: stretch; flex-direction: column; }
  .toolbar > * { flex: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .modal-layer { padding: 0; align-items: end; }
  .modal { max-height: 94vh; border-radius: 20px 20px 0 0; }
  .search-result { grid-template-columns: 50px minmax(0,1fr); }
  .search-result > img { width: 50px; height: 70px; }
  .search-result > button { grid-column: 1/-1; }
  .detail-hero { grid-template-columns: 95px minmax(0,1fr); padding: 90px 18px 20px; }
  .detail-poster { width: 95px; }
  .detail-copy h2 { font-size: 21px; }
  .detail-copy p { display: none; }
  .episode-row { grid-template-columns: 53px minmax(0,1fr) auto; }
  .episode-row > :last-child { grid-column: 2/-1; }
  .calendar-day { grid-template-columns: 54px minmax(0,1fr); }
  .day-events { grid-template-columns: 1fr; }
}
