:root {
  --bg: #0b0b0f; --panel: #16161d; --line: #2a2a35; --text: #f2f2f5; --muted: #9a9aa8;
  --accent: #e50914; --ok: #2fbf71;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
button { font: inherit; color: inherit; cursor: pointer; }
.muted { color: var(--muted); }
.pad { padding: 16px; }

.top { position: sticky; top: 0; z-index: 5; display: flex; gap: 16px; align-items: center; padding: 12px 16px;
  background: linear-gradient(#000e, #0000); backdrop-filter: blur(6px); }
.logo { color: var(--accent); font-weight: 800; font-size: 22px; letter-spacing: .5px; text-decoration: none; }
#q { flex: 1; max-width: 420px; margin-left: auto; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: #0009; color: var(--text); font-size: 16px; }

.hero { min-height: 52vh; display: flex; align-items: flex-end; padding: 0 16px 32px; margin-top: -60px;
  background-size: cover; background-position: center top; }
.hero > div { max-width: 560px; }
.hero h1 { font-size: clamp(28px, 5vw, 46px); margin: 0 0 8px; }
.hero p { color: #ddd; margin: 0 0 16px; }

.row { padding: 8px 0 4px; }
.row h2 { font-size: 18px; margin: 8px 16px; }
.strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 12px; scroll-snap-type: x proximity; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; padding: 8px 16px 24px; }

.tile { position: relative; flex: 0 0 auto; width: 150px; aspect-ratio: 2/3; padding: 0; border: 0; border-radius: 6px;
  overflow: hidden; background: var(--panel); scroll-snap-align: start; transition: transform .15s; }
.grid .tile { width: auto; }
.tile:hover, .tile:focus-visible { transform: scale(1.04); outline: 2px solid #fff6; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .t { position: absolute; inset: auto 0 0 0; padding: 18px 6px 6px; font-size: 12px; text-align: left;
  background: linear-gradient(#0000, #000d); opacity: 0; transition: opacity .15s; }
.tile:hover .t { opacity: 1; }
.noimg { display: grid; place-items: center; height: 100%; padding: 8px; text-align: center; color: var(--muted); }
.b { position: absolute; top: 6px; left: 6px; right: 6px; width: fit-content; max-width: calc(100% - 12px); padding: 2px 6px;
  border-radius: 4px; font-size: 11px; background: #000c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b.ok { background: var(--ok); color: #000; font-weight: 600; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 6px; border: 0;
  background: #fff; color: #000; font-weight: 600; }
.btn.ghost { background: #ffffff22; color: var(--text); }
.btn:disabled { opacity: .5; cursor: default; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.st { color: var(--muted); font-size: 14px; margin-right: 4px; }

.modal { position: fixed; inset: 0; z-index: 10; background: #000b; overflow-y: auto; padding: 4vh 12px; }
.sheet { position: relative; max-width: 860px; margin: 0 auto; background: var(--panel); border-radius: 10px; overflow: hidden; }
.dhero { height: 300px; background-size: cover; background-position: center; mask-image: linear-gradient(#000 60%, #0000); }
.dbody { padding: 0 20px 20px; margin-top: -60px; position: relative; }
.dbody h1 { margin: 0 0 4px; font-size: 28px; }
.seasons { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 4px; }
.chip { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: transparent; }
.chip.on { background: #fff; color: #000; border-color: #fff; }
.ep { display: grid; grid-template-columns: 160px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.ep img, .ep .noimg { width: 160px; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; background: #0006; }
.ep h3 { margin: 0; font-size: 15px; }
.ep p { margin: 4px 0 0; font-size: 13px; }
.ep .acts { margin: 8px 0 0; }
.ep .btn { padding: 6px 10px; font-size: 13px; }

.x { position: absolute; top: 10px; right: 10px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: #000a; font-size: 22px; line-height: 1; }

.player { position: fixed; inset: 0; z-index: 20; background: #000; display: grid; place-items: center; }
.player video { width: 100%; height: 100%; background: #000; }
.pstatus { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: 90vw; text-align: center;
  color: #ddd; pointer-events: none; }
.pstatus:empty { display: none; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 30; padding: 10px 16px;
  border-radius: 8px; background: #333; max-width: calc(100vw - 32px); }

@media (max-width: 600px) {
  .tile { width: 120px; }
  .dhero { height: 200px; }
  .ep { grid-template-columns: 110px 1fr; }
  .ep img, .ep .noimg { width: 110px; }
}

.me { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 14px; white-space: nowrap; }
.me button { background: none; border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; color: var(--text); }
.gate { max-width: 360px; margin: 12vh auto 0; padding: 24px; background: var(--panel); border-radius: 10px; }
.gate h1 { margin: 0 0 4px; font-size: 24px; }
.gate p { margin: 0 0 16px; }
.gate input { display: block; width: 100%; margin: 0 0 10px; padding: 11px 12px; border-radius: 6px; border: 1px solid var(--line);
  background: #0006; color: var(--text); font-size: 16px; }
.gate .btn { width: 100%; justify-content: center; margin-top: 6px; }
.gate .err { color: #ff6b6b; min-height: 1.4em; margin: 8px 0 0; }
.tile .bar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--accent); }

.pbtn { position: absolute; top: 10px; right: 56px; z-index: 2; padding: 7px 12px; border-radius: 18px; border: 0;
  background: #000a; font-size: 14px; }
.party { position: absolute; top: 56px; right: 10px; bottom: 70px; width: 290px; z-index: 2; display: flex; flex-direction: column;
  gap: 8px; padding: 12px; border-radius: 10px; background: #0b0b0fdd; backdrop-filter: blur(6px); }
.phead { display: flex; justify-content: space-between; align-items: center; }
.phead .btn { padding: 5px 10px; font-size: 13px; }
.pchat { flex: 1; overflow-y: auto; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.pchat .note { color: var(--muted); font-style: italic; font-size: 13px; }
.pchat b { color: #fff; }
#pmsg { width: 100%; padding: 9px 10px; border-radius: 6px; border: 1px solid var(--line); background: #0008; color: var(--text); font-size: 15px; }
@media (max-width: 700px) {
  .party { top: auto; left: 10px; right: 10px; width: auto; height: 38vh; bottom: 64px; }
}
