:root {
  color-scheme: dark;
  --bg: #050b13;
  --panel: #0b1522;
  --panel2: #101d2d;
  --line: rgba(255,255,255,.1);
  --text: #f7f9fc;
  --muted: #9fb0c5;
  --blue: #0053e2;
  --blue2: #2275ff;
  --yellow: #ffc220;
  --good: #5fe29a;
  --danger: #ff6b73;
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { touch-action: manipulation; }
html, body { margin: 0; min-height: 100%; background: radial-gradient(circle at 20% -10%, rgba(0,83,226,.22), transparent 33rem), var(--bg); color: var(--text); }
body { min-height: 100vh; touch-action: manipulation; overscroll-behavior-y: contain; }
button, input { font: inherit; touch-action: manipulation; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-weight: 500; }
.eyebrow { margin: 0 0 5px; color: #83a9e9; font-size: .76rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; }
.brand-mark { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 19px; font-size: 1.05rem; font-weight: 900; background: linear-gradient(145deg,var(--blue2),var(--blue)); box-shadow: 0 15px 40px rgba(0,83,226,.32); }
.brand-mark.small { width: 44px; height: 44px; border-radius: 14px; font-size: .85rem; }
.site-header { position: sticky; z-index: 20; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; padding: 11px clamp(16px,4vw,54px); border-bottom: 1px solid var(--line); background: rgba(5,11,19,.92); backdrop-filter: blur(20px); }
.now-playing-bar { box-shadow:0 12px 32px rgba(0,0,0,.18); }
.header-now-playing { display:flex; align-items:center; gap:12px; min-width:0; flex:1; }
.header-play-indicator { width:42px; height:42px; flex:0 0 auto; display:grid; place-items:center; border-radius:14px; background:rgba(0,83,226,.18); border:1px solid rgba(87,139,255,.28); color:#dce9ff; font-size:1rem; font-weight:900; }
.header-play-indicator.paused { background:rgba(255,194,32,.09); border-color:rgba(255,194,32,.28); color:#ffe6a0; }
.header-now-copy { min-width:0; }
.header-now-copy .eyebrow { margin-bottom:2px; font-size:.62rem; }
.header-now-title { max-width:min(58vw,760px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:1.02rem; font-weight:850; letter-spacing:-.025em; }
.header-now-meta { margin-top:2px; max-width:min(58vw,760px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:.72rem; }
.header-right { display:flex; align-items:center; gap:9px; flex:0 0 auto; }
.icon-button { width:38px; height:38px; display:grid; place-items:center; border:1px solid var(--line); border-radius:50%; background:rgba(255,255,255,.04); color:#dbe6f4; cursor:pointer; font-size:1.15rem; }
.icon-button:hover:not(:disabled) { background:rgba(255,255,255,.09); }
.icon-button:disabled { opacity:.48; cursor:not-allowed; }
.icon-button.spinning { animation:spin .8s linear infinite; }
.device-status { display:flex; align-items:center; gap:8px; max-width: 42vw; padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.device-status.online { color: #d8ffea; border-color: rgba(95,226,154,.28); background: rgba(95,226,154,.07); }
.status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #77869a; box-shadow: 0 0 0 4px rgba(119,134,154,.12); }
.online .status-dot, .target-good .status-dot { background: var(--good); box-shadow: 0 0 0 4px rgba(95,226,154,.12); }
.session-timer { min-width: 70px; text-align: center; font-variant-numeric: tabular-nums; font-size: .78rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 8px 10px; }
.content-shell { width: min(1500px,100%); margin: 0 auto; padding: 24px clamp(16px,4vw,54px) 70px; }
.intro-panel { display:flex; justify-content:space-between; align-items:end; gap:24px; padding: 32px; margin-bottom:34px; border:1px solid var(--line); border-radius: 30px; background: linear-gradient(135deg,rgba(0,83,226,.17),rgba(16,29,45,.76)); box-shadow: 0 25px 70px rgba(0,0,0,.22); }
.intro-panel h1 { font-size: clamp(2rem,5vw,4.7rem); line-height:.98; letter-spacing:-.06em; margin: 7px 0 14px; max-width: 780px; }
.intro-panel p:last-child { color: var(--muted); margin:0; font-size:clamp(.95rem,2vw,1.1rem); }
.ghost-button, .load-more { border:1px solid var(--line); border-radius:999px; background:rgba(255,255,255,.04); padding:11px 16px; cursor:pointer; font-weight:750; }
.ghost-button:hover, .load-more:hover { background:rgba(255,255,255,.09); }
.ghost-button:disabled, .load-more:disabled, .control-button:disabled { opacity:.42; cursor:not-allowed; }
.search-panel { margin:0 0 24px; }
.search-box { display:flex; align-items:center; gap:10px; min-height:58px; padding:8px 10px 8px 16px; border:1px solid var(--line); border-radius:18px; background:rgba(10,20,33,.88); box-shadow:0 14px 36px rgba(0,0,0,.18); }
.search-icon { color:#7fa7ec; font-size:1.45rem; line-height:1; }
.search-box input { flex:1; min-width:0; border:0; outline:0; background:transparent; color:var(--text); font-size:1rem; padding:10px 2px; }
.search-box input::placeholder { color:#718399; }
.search-clear { flex:0 0 auto; border:1px solid var(--line); border-radius:999px; background:rgba(255,255,255,.05); padding:8px 12px; cursor:pointer; font-weight:750; }
.search-results-section { margin-top:24px; }
.search-loading { grid-column:1/-1; min-height:220px; display:grid; place-items:center; align-content:center; gap:12px; color:var(--muted); }
.playback-panel { scroll-margin-top:92px; margin:0 0 30px; padding:22px; border:1px solid rgba(87,139,255,.26); border-radius:22px; background:linear-gradient(135deg,rgba(0,83,226,.12),rgba(10,20,33,.9)); box-shadow:0 18px 50px rgba(0,0,0,.2); }
.playback-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; }
.playback-heading h2 { margin:3px 0 6px; font-size:clamp(1.35rem,3vw,2rem); letter-spacing:-.035em; }
.playback-device, .control-hint { margin:0; color:var(--muted); }
.playback-time { color:#bfd1ec; font-variant-numeric:tabular-nums; font-size:.9rem; white-space:nowrap; padding-top:6px; }
.control-row { display:flex; flex-wrap:wrap; gap:10px; margin-top:18px; }
.control-button { min-height:44px; border:1px solid var(--line); border-radius:13px; background:rgba(255,255,255,.055); padding:10px 14px; cursor:pointer; font-weight:800; }
.control-button:hover:not(:disabled) { background:rgba(255,255,255,.1); border-color:rgba(87,139,255,.48); }
.control-button.active { background:rgba(0,83,226,.24); border-color:rgba(87,139,255,.7); color:#eaf2ff; }
.control-button.wide { min-width:190px; }
.control-button.play-pause { min-width:112px; background:rgba(0,83,226,.18); border-color:rgba(87,139,255,.4); }
.control-button.square { width:44px; padding:0; font-size:1.3rem; }
.seek-controls { display:grid; grid-template-columns:auto minmax(120px,1fr) auto; align-items:center; gap:11px; margin-top:16px; padding:15px 0 2px; border-top:1px solid var(--line); }
.seek-controls.disabled { opacity:.5; }
.seek-slider { width:100%; min-width:0; accent-color:var(--blue2); cursor:pointer; }
.seek-slider:disabled { cursor:not-allowed; }
.seek-time { min-width:42px; color:#bfd1ec; font-size:.78rem; font-variant-numeric:tabular-nums; }
.seek-time:last-child { text-align:right; }
.volume-controls { display:flex; align-items:center; gap:10px; margin-top:14px; padding-top:14px; border-top:1px solid var(--line); }
.volume-label { color:#d8e2ef; font-size:.86rem; font-weight:800; margin-right:2px; }
.control-hint { margin-top:12px; font-size:.78rem; line-height:1.45; }
.media-section { margin: 36px 0 46px; }
.section-heading { display:flex; align-items:baseline; gap:12px; margin-bottom:16px; }
.section-heading h2 { margin:0; font-size:1.5rem; letter-spacing:-.03em; }
.section-heading span { color:var(--muted); font-size:.88rem; }
.poster-row { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(145px, 190px); gap:16px; overflow-x:auto; padding: 2px 2px 14px; scroll-snap-type:x proximity; scrollbar-width:thin; }
.poster-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(145px,1fr)); gap:22px 16px; }
.poster-card { width:100%; min-width:0; padding:0; border:0; background:none; text-align:left; cursor:pointer; scroll-snap-align:start; }
.poster-image { position:relative; display:block; overflow:hidden; aspect-ratio:2/3; border-radius:16px; background:#122033; border:1px solid rgba(255,255,255,.08); box-shadow:0 12px 30px rgba(0,0,0,.25); transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease; }
.poster-image img { width:100%; height:100%; display:block; object-fit:cover; }
.poster-card:hover .poster-image, .poster-card:focus-visible .poster-image { transform:translateY(-5px) scale(1.015); border-color:rgba(87,139,255,.72); box-shadow:0 18px 44px rgba(0,0,0,.42); }
.poster-card:focus-visible { outline:none; }
.poster-badge { position:absolute; left:8px; bottom:8px; padding:5px 7px; border-radius:8px; background:rgba(3,8,14,.84); backdrop-filter:blur(8px); font-size:.61rem; text-transform:uppercase; letter-spacing:.08em; font-weight:850; }
.poster-name { display:block; margin-top:10px; font-weight:770; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.poster-meta { display:block; margin-top:5px; color:var(--muted); font-size:.76rem; }
.poster-placeholder { height:100%; display:grid; place-items:center; text-align:center; color:#8fa1b7; background:linear-gradient(145deg,#15263a,#0d1725); padding:12px; }
.all-section { padding-top:10px; }
.infinite-sentinel { min-height:72px; display:flex; align-items:center; justify-content:center; gap:10px; margin:20px auto 0; color:var(--muted); font-size:.82rem; }
.sentinel-spinner { width:18px; height:18px; border-radius:50%; border:2px solid rgba(255,255,255,.15); border-top-color:#6b9cff; animation:spin .8s linear infinite; }
.global-message { border:1px solid rgba(255,194,32,.28); background:rgba(255,194,32,.08); color:#ffe7a0; padding:14px 16px; border-radius:14px; margin:0 0 20px; }
.empty-copy { color:var(--muted); }
.skeleton-row { min-height: 285px; background: linear-gradient(90deg,rgba(255,255,255,.03),rgba(255,255,255,.06),rgba(255,255,255,.03)); background-size:200% 100%; animation: shimmer 1.5s infinite; border-radius:16px; }
.skeleton-grid { min-height: 500px; background: linear-gradient(90deg,rgba(255,255,255,.025),rgba(255,255,255,.055),rgba(255,255,255,.025)); background-size:200% 100%; animation: shimmer 1.5s infinite; border-radius:18px; }
@keyframes shimmer { to { background-position:-200% 0; } }
.modal { position:fixed; z-index:100; inset:0; display:grid; place-items:end center; }
.modal-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.74); backdrop-filter:blur(6px); }
.modal-sheet { position:relative; width:min(1100px,100%); max-height:90vh; overflow:auto; border:1px solid var(--line); border-bottom:0; border-radius:28px 28px 0 0; background:#0a1320; box-shadow:0 -30px 80px rgba(0,0,0,.5); }
.modal-header { position:sticky; top:0; z-index:2; display:flex; justify-content:space-between; align-items:center; gap:20px; padding:24px 26px 18px; background:rgba(10,19,32,.92); backdrop-filter:blur(18px); border-bottom:1px solid var(--line); }
.modal-header h2 { margin:0; font-size:1.7rem; }
.close-button { width:42px; height:42px; border-radius:50%; border:1px solid var(--line); background:rgba(255,255,255,.05); cursor:pointer; font-size:1.7rem; line-height:1; }
.episode-body { padding:22px 26px 38px; }
.season-group + .season-group { margin-top:34px; }
.season-group h3 { margin:0 0 14px; color:#cdd9e9; }
.episode-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(270px,1fr)); gap:14px; }
.episode-card { display:grid; grid-template-columns:130px 1fr; overflow:hidden; border:1px solid var(--line); border-radius:16px; padding:0; background:#0f1c2b; cursor:pointer; text-align:left; min-height:108px; }
.episode-card:hover { border-color:rgba(87,139,255,.62); background:#122238; }
.episode-image { display:block; aspect-ratio:16/10; height:100%; background:#132235; overflow:hidden; }
.episode-image img { width:100%; height:100%; object-fit:cover; display:block; }
.episode-copy { min-width:0; padding:12px 13px; display:flex; flex-direction:column; gap:5px; }
.episode-copy strong { font-size:.96rem; }
.episode-copy small { color:var(--muted); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; line-height:1.35; }
.episode-number { color:#80a8ed; font-size:.7rem; font-weight:850; letter-spacing:.08em; text-transform:uppercase; }
.episode-loading { min-height:220px; display:grid; place-items:center; align-content:center; gap:14px; color:var(--muted); }
.play-overlay { position:fixed; z-index:200; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; background:rgba(2,7,12,.78); backdrop-filter:blur(10px); text-align:center; padding:30px; }
.play-overlay strong { font-size:1.35rem; }
.play-overlay span { color:var(--muted); }
.spinner { width:38px; height:38px; border-radius:50%; border:3px solid rgba(255,255,255,.16); border-top-color:#6b9cff; animation:spin .8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.toast { position:fixed; z-index:220; left:50%; bottom:28px; transform:translateX(-50%); max-width:min(560px,calc(100vw - 28px)); padding:13px 18px; border-radius:14px; background:#173221; border:1px solid rgba(95,226,154,.35); color:#dfffea; box-shadow:0 18px 50px rgba(0,0,0,.4); text-align:center; }
.toast.error { background:#35171c; border-color:rgba(255,107,115,.36); color:#ffd9dc; }
.modal-open { overflow:hidden; }
.setup-page { display:grid; place-items:center; padding:30px 16px; }
.setup-shell { width:min(680px,100%); }
.setup-card { border:1px solid var(--line); border-radius:30px; padding:34px; background:rgba(10,20,33,.92); box-shadow:0 35px 90px rgba(0,0,0,.45); }
.setup-card.compact { width:min(500px,100%); margin:auto; }
.setup-card h1 { margin:10px 0 12px; font-size:clamp(2rem,6vw,3.1rem); letter-spacing:-.055em; line-height:1; }
.setup-copy, .admin-note, .field-help { color:var(--muted); line-height:1.55; }
.setup-form { display:grid; gap:16px; margin-top:24px; }
.setup-form label { display:grid; gap:7px; color:#d9e3f0; font-weight:700; font-size:.88rem; }
.setup-form input { width:100%; border:1px solid rgba(255,255,255,.12); border-radius:13px; background:#07111d; color:var(--text); padding:13px 14px; outline:none; }
.setup-form input:focus { border-color:#578bff; box-shadow:0 0 0 3px rgba(0,83,226,.18); }
.setup-form details { border:1px solid var(--line); border-radius:14px; padding:14px; }
.setup-form details[open] { display:grid; gap:15px; }
.setup-form summary { cursor:pointer; font-weight:750; }
.primary-button { border:0; border-radius:14px; background:linear-gradient(135deg,var(--blue2),var(--blue)); color:#fff; padding:14px 18px; font-weight:850; cursor:pointer; box-shadow:0 12px 30px rgba(0,83,226,.24); }
.primary-button:hover { filter:brightness(1.08); }
.setup-error, .setup-success { border-radius:13px; padding:12px 14px; margin-top:16px; }
.setup-error { background:rgba(255,107,115,.1); border:1px solid rgba(255,107,115,.28); color:#ffd3d7; }
.setup-success { background:rgba(95,226,154,.09); border:1px solid rgba(95,226,154,.28); color:#d6ffe8; }
.admin-page { padding:28px clamp(16px,4vw,50px) 60px; }
.admin-shell { width:min(1200px,100%); margin:auto; }
.admin-header { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:24px; }
.admin-header h1 { margin:0; font-size:clamp(2rem,5vw,3.2rem); letter-spacing:-.05em; }
.admin-actions { display:flex; gap:10px; flex-wrap:wrap; }
.admin-grid { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr); gap:20px; }
.admin-card { border:1px solid var(--line); border-radius:22px; background:rgba(10,20,33,.78); padding:24px; }
.admin-card h2 { margin-top:0; }
.admin-card h3 { margin-top:28px; color:#cfdaea; }
.target-good, .target-bad { border-radius:15px; padding:14px; }
.target-good { display:flex; align-items:center; gap:12px; background:rgba(95,226,154,.07); border:1px solid rgba(95,226,154,.23); }
.target-good div { display:grid; gap:3px; }
.target-good span:last-child { color:var(--muted); font-size:.84rem; }
.target-bad { background:rgba(255,194,32,.07); border:1px solid rgba(255,194,32,.22); color:#ffe8a6; }
.session-list { display:grid; gap:9px; }
.session-item { display:grid; gap:3px; padding:11px 12px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.025); }
.session-item span { color:var(--muted); font-size:.8rem; }
@media (max-width:760px) {
  .site-header { align-items:center; gap:8px; padding:9px 12px; }
  .header-play-indicator { width:36px; height:36px; border-radius:12px; }
  .header-now-title { max-width:48vw; font-size:.9rem; }
  .header-now-meta { max-width:48vw; font-size:.64rem; }
  .header-right { gap:5px; }
  .icon-button { width:34px; height:34px; }
  .device-status { display:none; }
  .session-timer { min-width:58px; padding:5px 7px; font-size:.68rem; }
  .content-shell { padding-top:18px; }
  .playback-heading { flex-direction:column; gap:4px; }
  .control-row { display:grid; grid-template-columns:1fr 1fr; }
  .control-button.wide { grid-column:1/-1; width:100%; }
  .control-button.play-pause { min-width:0; }
  .seek-controls { grid-template-columns:42px minmax(0,1fr) 42px; gap:8px; }
  .volume-controls { flex-wrap:nowrap; }
  .volume-label { flex:1; width:auto; }
  .poster-row { grid-auto-columns:140px; gap:12px; }
  .poster-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 12px; }
  .episode-grid { grid-template-columns:1fr; }
  .episode-card { grid-template-columns:118px 1fr; }
  .episode-copy small { display:none; }
  .modal-sheet { max-height:92vh; }
  .setup-card { padding:25px 20px; }
  .admin-grid { grid-template-columns:1fr; }
  .admin-header { align-items:flex-start; flex-direction:column; }
}
@media (min-width:1100px) {
  .poster-grid { grid-template-columns:repeat(auto-fill,minmax(165px,1fr)); }
}
