/* RR Movies V2 — overlays: details, player, login, admin, search, dialogs, toasts. */

.overlay {
  position: fixed; inset: 0; z-index: 80;
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  background: var(--bg);
}
.overlay:focus { outline: none; }
.overlay.is-entering { animation: overlayIn 0.7s var(--ease-out) both; }
.overlay.is-leaving { animation: overlayOut 0.38s var(--ease-in-out) both; pointer-events: none; }
.close-btn { position: fixed; z-index: 5; top: 18px; right: max(18px, calc(var(--gutter) - 10px)); }

/* ---------- details ---------- */
.details { background: #060607; }
.d-backdrop { position: absolute; inset: 0 0 auto 0; height: min(92vh, 900px); overflow: hidden; z-index: 0; }
.d-backdrop img { width: 100%; height: 100%; object-fit: cover; object-position: 66% 40%; will-change: transform; transform: translate3d(0, calc(var(--ds, 0) * 0.35px), 0) scale(1.06); }
.details.is-entering .d-backdrop img { animation: detailZoom 2.4s var(--ease-out) both; }
.d-backdrop::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 6, 7, 0.96) 0%, rgba(6, 6, 7, 0.82) 38%, rgba(6, 6, 7, 0.45) 66%, rgba(6, 6, 7, 0.5) 100%),
    linear-gradient(0deg, #060607 0%, rgba(6, 6, 7, 0.6) 30%, rgba(6, 6, 7, 0) 60%),
    linear-gradient(180deg, rgba(6, 6, 7, 0.7), transparent 25%);
}
.d-wrap { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; }
.d-hero {
  display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: end;
  padding: calc(var(--nav-h) + 6vh) var(--gutter) 40px; min-height: min(86vh, 820px);
}
.d-poster { width: 100%; border-radius: var(--radius); box-shadow: 0 40px 80px -30px #000, 0 0 0 1px rgba(255, 255, 255, 0.1), 0 30px 70px -30px var(--glow, var(--red-glow)); }
.d-poster .poster-copy { padding-bottom: 14%; }
.d-info { min-width: 0; padding-bottom: 6px; }
.d-info > * { animation: riseIn 0.9s var(--ease-out) both; animation-delay: calc(var(--k, 0) * 70ms + 120ms); }
.d-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(56px, 7vw, 120px); line-height: 0.88; margin-top: 14px; letter-spacing: 0.01em; text-shadow: 0 6px 40px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.5); }
.d-info .hero-alt, .d-info .meta-row, .d-tagline, .d-desc { text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8); }
.d-title.font-cinzel { font-family: var(--font-serif); font-weight: 700; font-size: clamp(40px, 4.8vw, 82px); line-height: 1.02; }
.d-title.font-manrope { font-family: var(--font-ui); font-weight: 800; font-size: clamp(42px, 5vw, 86px); line-height: 0.96; letter-spacing: -0.035em; }
.d-info .meta-row { margin-top: 18px; }
.d-info .chips { margin-top: 16px; }
.d-info .chip { min-height: 32px; font-size: 12px; }
/* "On <network>" badge above the title */
.d-network { display: inline-block; width: 136px; margin-bottom: 12px; padding: 5px 10px; border-radius: 10px; background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.12); transition: border-color 0.3s, background-color 0.3s, transform 0.4s var(--ease-out); }
.d-network:hover, .d-network:focus-visible { border-color: var(--acc-line); background: rgba(0, 0, 0, 0.7); transform: translateY(-2px); }
.d-network .net-svg { display: block; width: 100%; height: auto; }
.d-tagline { margin-top: 18px; font-size: 19px; font-weight: 700; }
.d-desc { margin-top: 10px; max-width: 720px; color: var(--text-2); font-size: 16px; }
.d-resume { margin-top: 18px; max-width: 420px; display: grid; gap: 8px; font-size: 13px; color: var(--text-2); font-weight: 700; }
.d-body { padding: 10px var(--gutter) 60px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 54px; }
.d-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.d-section-head h2 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 800; letter-spacing: -0.02em; }
.d-section-head .select { width: auto; min-width: 220px; }
@media (min-width: 901px) { .d-section-head { padding-right: 64px; } } /* keep clear of the fixed close button */

.episodes { display: grid; gap: 12px; }
.ep {
  display: grid; grid-template-columns: 48px minmax(160px, 280px) minmax(0, 1fr); gap: 20px; align-items: center;
  padding: 14px; border-radius: var(--radius); border: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s;
  animation: riseIn 0.7s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms);
}
.ep:hover, .ep:focus-within { background: rgba(255, 255, 255, 0.04); border-color: var(--line); }
.ep.is-current { background: rgba(229, 24, 43, 0.08); border-color: rgba(229, 24, 43, 0.35); }
.ep-num { font-family: var(--font-display); font-size: 44px; line-height: 1; color: var(--muted); text-align: center; }
.ep.is-current .ep-num { color: var(--red-hi); }
.ep-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; box-shadow: 0 12px 30px -16px #000; }
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease-out); }
.ep-thumb::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.ep:hover .ep-thumb img { transform: scale(1.07); }
.ep-thumb .play-ring {
  position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.55); backdrop-filter: blur(4px);
  transition: background-color 0.3s, transform 0.4s var(--ease-out);
}
.ep-thumb .play-ring .i { width: 18px; height: 18px; margin-left: 2px; }
.ep:hover .play-ring { background: var(--red); border-color: var(--red-hi); transform: scale(1.1); }
.ep-thumb .progress { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 3px; }
.ep-thumb .vid { position: absolute; top: 8px; left: 8px; }
.ep-body h3 { display: flex; justify-content: space-between; gap: 12px; font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.ep-body h3 a:hover { color: var(--red-hi); }
.ep-body .dur { flex: none; color: var(--muted); font-size: 13px; font-weight: 700; }
.ep-body p { margin-top: 6px; color: var(--text-2); font-size: 14px; line-height: 1.6; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--line); }
.facts > div { padding: 18px 20px; background: #0b0b0e; }
.facts dt { font-size: 11px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 6px 0 0; font-size: 15px; font-weight: 700; color: var(--text); }
.d-related .rail { padding-left: 0; padding-right: 0; scroll-padding-inline: 0; margin: 0 calc(var(--gutter) * -1); padding-inline: var(--gutter); }

/* ---------- player (theatre page: 16:9 player + Choose server) ---------- */
.player { background: #050506; }
.pl-page { position: relative; min-height: 100%; display: grid; grid-template-rows: auto 1fr; isolation: isolate; }
/* soft light "spilling" from the screen, tinted by the title's artwork colour */
.pl-page::before {
  content: ''; position: absolute; z-index: -1; left: 50%; top: 40px; width: min(1300px, 100%); height: 70vh; transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--pl-glow, rgba(229, 24, 43, 0.25)), transparent); filter: blur(30px); opacity: 0.85; pointer-events: none;
}
.pl-top {
  position: sticky; top: 0; z-index: 6;
  display: flex; align-items: center; gap: 14px;
  padding: 14px var(--gutter);
  background: rgba(5, 5, 6, 0.9); border-bottom: 1px solid var(--line);
}
.pl-top > .icon-btn { flex: none; }
.pl-titles { flex: 1 1 auto; min-width: 0; }
.pl-titles strong { display: block; font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-titles small { display: block; color: var(--text-2); font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-tools { flex: none; margin-left: auto; display: flex; gap: 10px; }
.pl-main { width: min(1240px, 100%); margin: 0 auto; padding: 24px var(--gutter) 64px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-content: start; }

/* the 16:9 screen */
.pl-theater { position: relative; width: 100%; max-width: calc((100vh - 190px) * 16 / 9); min-width: min(100%, 560px); margin: 0 auto; }
.pl-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 18px; background: #000; border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 50px 100px -50px rgba(0, 0, 0, 0.95), 0 30px 120px -60px var(--pl-glow, rgba(229, 24, 43, 0.4));
  animation: plFrameIn 0.9s var(--ease-out) both;
}
.pl-stage { position: absolute; inset: 0; display: grid; place-items: center; background: #000; }
.pl-stage video, .pl-stage iframe { width: 100%; height: 100%; border: 0; background: #000; }
.pl-stage video { object-fit: contain; }
.pl-theater:fullscreen { display: grid; place-items: center; max-width: none; background: #000; }
.pl-theater:fullscreen .pl-frame { width: 100%; height: 100%; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; }
.pl-theater:-webkit-full-screen { display: grid; place-items: center; max-width: none; background: #000; }
.pl-theater:-webkit-full-screen .pl-frame { width: 100%; height: 100%; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; }

/* "Connecting to Nexus…" beat when you change server */
.pl-switch {
  position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 14px;
  background: radial-gradient(circle at 50% 50%, rgba(229, 24, 43, 0.18), rgba(0, 0, 0, 0.94) 70%);
  color: var(--text-2); font-size: 14px; font-weight: 800; letter-spacing: 0.04em;
}
.pl-switch[hidden] { display: none; }
.pl-scan { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--red-hi), transparent); box-shadow: 0 0 18px var(--red-glow); animation: plScan 1.1s var(--ease-in-out) infinite; }

/* message inside the screen (error) */
.pl-msg { width: min(460px, 90%); padding: 18px; text-align: center; }
.pl-msg .ico { width: 54px; height: 54px; margin: 0 auto 10px; display: grid; place-items: center; border-radius: 50%; color: var(--warn); background: rgba(255, 181, 71, 0.1); border: 1px solid rgba(255, 181, 71, 0.4); }
.pl-msg .ico .i { width: 24px; height: 24px; }
.pl-msg h2 { font-size: clamp(18px, 2vw, 24px); font-weight: 800; letter-spacing: -0.02em; }
.pl-msg p { margin-top: 6px; color: var(--text-2); font-size: 14px; }
.pl-msg-src { color: var(--muted); }
.pl-msg .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }

/* line under the screen: now playing · speed · fullscreen */
.pl-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.pl-now { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 14px; font-weight: 700; color: var(--text-2); }
.pl-now b { color: #fff; }
.pl-now .dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.pl-now.is-playing .dot { background: var(--red-hi); box-shadow: 0 0 0 4px rgba(229, 24, 43, 0.2); animation: plPulse 1.6s ease-in-out infinite; }
.pl-now.is-loading .dot { background: var(--gold); }
.pl-now.is-error .dot { background: var(--warn); }
.pl-bar-tools { display: flex; align-items: center; gap: 8px; }
.pl-speed { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--text-2); }
.pl-speed .i { width: 18px; height: 18px; }
.pl-bar .select { width: auto; min-height: 38px; padding: 6px 34px 6px 12px; font-size: 13px; font-weight: 700; background-position: right 12px center; }

/* Choose server */
.pl-servers { padding: 20px; border-radius: 18px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)); border: 1px solid var(--line); }
.pl-servers-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.pl-servers-head .eyebrow { margin-bottom: 6px; font-size: 11px; }
.pl-servers-head h2 { font-size: clamp(20px, 2vw, 24px); font-weight: 800; letter-spacing: -0.02em; }
.pl-report .i { width: 16px; height: 16px; }
.pl-server-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
@media (min-width: 1200px) { .pl-server-list { grid-template-columns: repeat(7, minmax(0, 1fr)); } } /* all 7 servers in one row */
.pl-server {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 12px;
  border-radius: 12px; text-align: left; color: var(--text); background: #111115; border: 1px solid rgba(255, 255, 255, 0.09);
  transition: border-color 0.25s, background-color 0.25s, transform 0.35s var(--ease-out), box-shadow 0.35s;
  animation: riseIn 0.6s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms + 200ms);
}
.pl-server:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.26); background: #17171c; }
.pl-server:active { transform: translateY(0) scale(0.98); }
.pl-server.is-active {
  border-color: var(--red); background: linear-gradient(180deg, rgba(229, 24, 43, 0.2), rgba(229, 24, 43, 0.07));
  box-shadow: inset 0 0 0 1px var(--red), 0 14px 30px -14px var(--red-glow);
}
.pl-server-ico { position: relative; flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--muted); background: rgba(255, 255, 255, 0.06); transition: background-color 0.25s, color 0.25s; }
.pl-server-ico > .i { width: 18px; height: 18px; }
.pl-server.is-active .pl-server-ico { color: #fff; background: var(--red); box-shadow: 0 0 18px -2px var(--red-glow); }
.pl-server.has-error .pl-server-ico { color: var(--warn); background: rgba(255, 181, 71, 0.15); box-shadow: none; }
/* little equaliser on the server that is playing */
.pl-server .eq { display: none; align-items: flex-end; gap: 2px; height: 14px; }
.pl-server .eq i { width: 3px; height: 4px; border-radius: 1px; background: #fff; animation: plEq 0.9s ease-in-out infinite; }
.pl-server .eq i:nth-child(2) { animation-delay: -0.3s; }
.pl-server .eq i:nth-child(3) { animation-delay: -0.6s; }
.pl-server.is-active.is-playing .pl-server-ico > .i { display: none; }
.pl-server.is-active.is-playing .eq { display: flex; }
.pl-server-text { min-width: 0; }
.pl-server-text strong { display: block; font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-server-text small { display: block; margin-top: 1px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pl-server.is-active small { color: #ffb3bb; }
.pl-note { display: flex; gap: 8px; margin-top: 14px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.pl-note .i { flex: none; width: 16px; height: 16px; margin-top: 2px; }

/* notice under the servers (no video yet / error details / file from this PC) */
.pl-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.03); animation: riseIn 0.5s var(--ease-out) both; }
.pl-notice.error { border-color: rgba(255, 181, 71, 0.35); background: rgba(255, 181, 71, 0.06); }
.pl-notice[hidden] { display: none; }
.pl-notice-text { flex: 1 1 340px; min-width: 0; display: flex; align-items: flex-start; gap: 12px; font-size: 14px; color: var(--text-2); }
.pl-notice-text .i { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--red-hi); }
.pl-notice.error .pl-notice-text .i { color: var(--warn); }
.pl-notice-text strong { color: #fff; }
.pl-notice .fine { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.pl-notice code { font-size: 12px; padding: 2px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.08); color: #ffd1d6; }
.pl-notice .actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* about this title */
.pl-about { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 18px; align-items: start; padding-top: 6px; }
.pl-about .poster { width: 112px; }
.pl-about .poster-mark, .pl-about .poster-tag { display: none; }
.pl-about .eyebrow { margin-bottom: 6px; font-size: 11px; }
.pl-about h2 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; letter-spacing: -0.02em; }
.pl-about .meta-row { margin-top: 8px; }
.pl-about .desc { margin-top: 10px; max-width: 75ch; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pl-about .link-btn { margin-top: 10px; }

/* "Title not found" */
.pl-empty { display: grid; place-items: center; padding: 60px var(--gutter); }
.pl-card {
  position: relative; max-width: 620px; width: 100%;
  padding: clamp(24px, 4vw, 40px); border-radius: var(--radius-lg);
  background: rgba(12, 12, 15, 0.78); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg);
  text-align: center; animation: riseIn 0.8s var(--ease-out) 0.25s both;
}
.pl-card .ico { width: 64px; height: 64px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 50%; background: rgba(229, 24, 43, 0.14); border: 1px solid rgba(229, 24, 43, 0.4); color: var(--red-hi); }
.pl-card .ico .i { width: 28px; height: 28px; }
.pl-card h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; letter-spacing: -0.02em; }
.pl-card p { margin-top: 10px; color: var(--text-2); }

/* episodes drawer (fixed to the screen) */
.pl-drawer {
  position: fixed; z-index: 9; top: 0; right: 0; bottom: 0; width: min(420px, 92vw);
  padding: 20px; overflow-y: auto;
  background: rgba(10, 10, 12, 0.97); border-left: 1px solid var(--line-strong);
  animation: slideInRight 0.45s var(--ease-out) both;
}
.pl-drawer header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.pl-drawer header h2 { font-size: 18px; font-weight: 800; }
.pl-drawer .select { margin-bottom: 12px; }
.pl-ep { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; padding: 8px; border-radius: 10px; }
.pl-ep:hover { background: rgba(255, 255, 255, 0.06); }
.pl-ep.is-current { background: rgba(229, 24, 43, 0.14); }
.pl-ep img { border-radius: 7px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.pl-ep strong { display: block; font-size: 13px; line-height: 1.3; }
.pl-ep small { color: var(--muted); font-size: 12px; font-weight: 700; }

/* over the bottom of the screen: next-episode countdown + resume/switch chip */
.pl-next {
  position: absolute; z-index: 4; right: 16px; bottom: 64px; width: min(340px, 86vw);
  padding: 16px; border-radius: var(--radius); background: rgba(12, 12, 15, 0.94); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg); animation: riseIn 0.5s var(--ease-out) both;
}
.pl-next p { font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.pl-next strong { display: block; margin: 6px 0 12px; font-size: 16px; }
.pl-next .row { display: flex; gap: 8px; }
.pl-resume { position: absolute; z-index: 4; left: 50%; bottom: 64px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; max-width: calc(100% - 24px); padding: 10px 10px 10px 18px; border-radius: 999px; background: rgba(12, 12, 15, 0.94); border: 1px solid var(--line-strong); font-size: 14px; font-weight: 700; animation: riseIn 0.5s var(--ease-out) both; white-space: nowrap; }
.pl-resume:not(:has(button)) { padding-right: 18px; }

/* Report issue dialog */
.pl-report-form p { margin-top: 8px; font-size: 14px; }
.pl-report-form fieldset { display: grid; gap: 10px; margin: 18px 0 14px; padding: 0; border: 0; }
.pl-report-form .textarea { min-height: 80px; }
.pl-report-form .fine { font-size: 12px; color: var(--muted); }

/* ---------- login ---------- */
.auth { display: grid; place-items: center; padding: 100px 20px 40px; background: #050506; }
.auth-wall {
  position: fixed; inset: -20% -10%; z-index: 0;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px;
  transform: rotate(-9deg) scale(1.05);
  opacity: 0.75;
}
.auth-col { display: grid; gap: 16px; align-content: start; animation: wallUp 70s linear infinite; }
.auth-col:nth-child(even) { animation-name: wallDown; animation-duration: 85s; }
.auth-col img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 12px; }
.auth-shade { position: fixed; inset: 0; z-index: 0; background: radial-gradient(ellipse 34% 60% at 50% 50%, rgba(5, 5, 6, 0.82), rgba(5, 5, 6, 0.5) 70%, rgba(5, 5, 6, 0.78) 100%), linear-gradient(0deg, rgba(5, 5, 6, 0.85), transparent 35%), linear-gradient(180deg, rgba(5, 5, 6, 0.85), transparent 25%); }
.auth-top { position: fixed; z-index: 2; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 18px var(--gutter); }
.auth-card {
  position: relative; z-index: 1; width: min(460px, 100%);
  padding: clamp(26px, 4vw, 44px); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(20, 20, 24, 0.86), rgba(10, 10, 12, 0.92));
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg), 0 0 120px -40px var(--red-glow);
  backdrop-filter: blur(18px);
  animation: riseIn 0.9s var(--ease-out) 0.15s both;
}
.auth-card::before { content: ''; position: absolute; left: 12%; right: 12%; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--red-hi), transparent); }
.auth-card h1 { font-size: clamp(30px, 3.4vw, 40px); font-weight: 800; letter-spacing: -0.03em; margin-top: 16px; }
.auth-card > p { margin-top: 8px; color: var(--text-2); }
.auth-form { display: grid; gap: 16px; margin-top: 24px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 52px; }
.pw-wrap .icon-btn { position: absolute; right: 5px; top: 5px; width: 36px; height: 36px; border: 0; background: transparent; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line-strong); }
.auth-fine { margin-top: 20px; padding: 12px 14px; border-radius: 10px; background: rgba(229, 24, 43, 0.08); border: 1px solid rgba(229, 24, 43, 0.25); color: #f1c9cd; font-size: 12.5px; line-height: 1.6; }
.auth-signed { display: grid; gap: 14px; margin-top: 20px; }
.auth-signed .who { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.auth-signed .who .avatar { flex: none; }

/* ---------- admin ---------- */
.admin { background: radial-gradient(ellipse 60% 40% at 80% 0%, rgba(229, 24, 43, 0.12), transparent 70%), #070708; }
.ad-top {
  position: sticky; top: 0; z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
  padding: 14px var(--gutter);
  background: rgba(7, 7, 8, 0.86); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px);
}
.ad-top .studio { font-size: 13px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-2); padding-left: 16px; border-left: 1px solid var(--line-strong); }
.ad-top .right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.ad-main { padding: 28px var(--gutter) 80px; max-width: var(--maxw); margin: 0 auto; }
.ad-warning { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: rgba(255, 181, 71, 0.08); border: 1px solid rgba(255, 181, 71, 0.3); color: #ffe2b3; font-size: 14px; }
.ad-warning .i { color: var(--warn); width: 20px; height: 20px; margin-top: 2px; }
.ad-gate { max-width: 460px; margin: 8vh auto 0; padding: 34px; border-radius: var(--radius-lg); background: rgba(17, 17, 21, 0.9); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); animation: riseIn 0.8s var(--ease-out) both; }
.ad-gate h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; margin: 14px 0 8px; }
.ad-gate p { color: var(--text-2); }
.ad-gate form { display: grid; gap: 14px; margin-top: 22px; }
.ad-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 26px 0 18px; }
.ad-head h1 { font-size: clamp(28px, 3vw, 40px); font-weight: 800; letter-spacing: -0.03em; }
.ad-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.ad-stat { padding: 16px 18px; border-radius: var(--radius); background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)); border: 1px solid var(--line); animation: riseIn 0.6s var(--ease-out) both; animation-delay: calc(var(--i) * 60ms); }
.ad-stat b { display: block; font-family: var(--font-display); font-size: 42px; line-height: 1; font-weight: 400; }
.ad-stat span { font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.ad-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 24px 0 16px; }
.ad-tools .search-field { flex: 1 1 240px; }
.ad-tools .select { width: auto; min-width: 150px; }
.ad-list { display: grid; gap: 8px; }
.ad-row {
  display: grid; grid-template-columns: 52px minmax(0, 2.2fr) repeat(3, minmax(0, 1fr)) auto; gap: 16px; align-items: center;
  padding: 10px 14px 10px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line);
  transition: background-color 0.2s, border-color 0.2s;
}
.ad-row:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--line-strong); }
.ad-row .poster { border-radius: 7px; box-shadow: none; }
.ad-row .poster-copy, .ad-row .poster-mark, .ad-row .poster-tag { display: none; }
.ad-row strong { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-row small { color: var(--muted); font-size: 12px; font-weight: 700; }
.ad-row .cell { font-size: 13px; color: var(--text-2); font-weight: 700; }
.ad-row .acts { display: flex; gap: 6px; }
.ad-row .flags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.status-ok { color: var(--ok); }
.status-none { color: var(--muted); }

.ad-drawer { position: fixed; inset: 0; z-index: 10; display: grid; grid-template-columns: 1fr min(760px, 100vw); }
.ad-drawer .scrim { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); animation: fadeIn 0.3s both; }
.ad-panel { position: relative; overflow-y: auto; background: #0c0c0f; border-left: 1px solid var(--line-strong); animation: slideInRight 0.5s var(--ease-out) both; }
.ad-panel-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; background: rgba(12, 12, 15, 0.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.ad-panel-head h2 { font-size: 20px; font-weight: 800; }
.ad-form { padding: 22px 24px 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.ad-fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 14px; }
.ad-fieldset legend { padding: 0; margin-bottom: 12px; font-size: 12px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: var(--red-hi); }
.ad-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ad-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ad-grid .span-2 { grid-column: span 2; }
.ad-preview { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: start; }
.ad-preview .poster { width: 150px; }
.ad-genres { display: flex; flex-wrap: wrap; gap: 8px; }
.ad-genres .chip { min-height: 34px; }
.ad-season { padding: 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.02); display: grid; gap: 12px; }
.ad-season-head { display: flex; gap: 10px; align-items: center; }
.ad-season-head .input { flex: 1; }
.ad-ep { display: grid; grid-template-columns: 28px minmax(0, 1fr) 80px auto; gap: 8px; align-items: start; padding: 10px; border-radius: 10px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line); }
.ad-ep .n { font-family: var(--font-display); font-size: 26px; color: var(--muted); text-align: center; line-height: 46px; }
.ad-ep .stack { display: grid; gap: 8px; }
.ad-ep .textarea { min-height: 60px; }
.ad-ep .mv { display: grid; gap: 4px; }
.ad-ep .mv .icon-btn { width: 32px; height: 32px; }
.ad-save { position: sticky; bottom: 0; z-index: 3; align-self: end; display: flex; align-items: center; gap: 10px; justify-content: flex-end; padding: 14px 24px; margin: 10px -24px 0; background: rgba(12, 12, 15, 0.94); border-top: 1px solid var(--line); backdrop-filter: blur(12px); }
.ad-errors { padding: 12px 14px; border-radius: 10px; background: rgba(229, 24, 43, 0.12); border: 1px solid rgba(229, 24, 43, 0.4); color: #ffc6cc; font-size: 14px; font-weight: 700; }
.ad-errors ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------- admin uploads (posters, backdrops, videos) ---------- */
.ad-head-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.ad-tools .count { min-width: 20px; padding: 1px 7px; border-radius: 99px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }
.status-warn, .warn { color: var(--warn); }
.up .i, .lib-space .i { display: inline-block; width: 15px; height: 15px; vertical-align: -3px; }
.up-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.up {
  position: relative; border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.025);
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.25s;
}
.up[data-state='done'] { border-style: solid; border-color: var(--line-strong); }
.up[data-state='busy'] { border-style: solid; border-color: rgba(229, 24, 43, 0.45); background: rgba(229, 24, 43, 0.05); }
.up[data-state='missing'] { border-style: solid; border-color: rgba(255, 181, 71, 0.45); background: rgba(255, 181, 71, 0.05); }
.ad-season { transition: border-color 0.2s, background-color 0.2s, box-shadow 0.25s; }
.up.is-over, .ad-season.is-over {
  border-style: solid; border-color: var(--red-hi); background: rgba(229, 24, 43, 0.09);
  box-shadow: 0 0 0 4px rgba(229, 24, 43, 0.14), 0 0 44px -10px var(--red-glow);
}

.up-img { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 16px; align-items: start; padding: 14px; }
.up-img.up-backdrop { grid-template-columns: 224px minmax(0, 1fr); }
.up-frame {
  position: relative; display: block; width: 100%; padding: 0; overflow: hidden;
  border-radius: 10px; border: 1px solid var(--line); color: var(--muted); cursor: pointer;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 10px, transparent 10px 20px), #0a0a0d;
  transition: border-color 0.2s, box-shadow 0.3s;
}
/* Shape via padding (2:3 / 16:9). CSS aspect-ratio here made Chrome size the grid row from the whole panel width. */
.up-frame::before { content: ''; display: block; padding-top: 150%; }
.up-img.up-backdrop .up-frame::before { padding-top: 56.25%; }
.up-frame:hover { border-color: rgba(255, 255, 255, 0.35); box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.9); }
.up-frame:focus-visible { outline: 2px solid var(--red-hi); outline-offset: 3px; }
.up-frame[disabled] { cursor: progress; }
.up-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.up-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 8px; font-size: 12px; font-weight: 800; line-height: 1.3; text-align: center; }
.up-empty .i { width: 30px; height: 30px; color: var(--red-hi); }
.up-over {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px;
  background: rgba(143, 10, 24, 0.8); color: #fff; font-size: 13px; font-weight: 800;
  opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.up-over .i { width: 30px; height: 30px; }
.up.is-over .up-over { opacity: 1; }
.up-info { display: grid; gap: 8px; min-width: 0; align-content: start; }
.up-label { font-size: 15px; font-weight: 800; }
.up .hint { font-size: 12px; color: var(--muted); }
.up-status { margin: 0; font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.up-status .error { font-size: 13px; color: #ff9aa4; font-weight: 700; }
.up-acts { display: flex; flex-wrap: wrap; gap: 8px; }

.up-vid { display: grid; gap: 14px; padding: 16px; }
.up-vid.compact { gap: 10px; padding: 10px; }
.up-drop { display: grid; justify-items: center; gap: 8px; padding: 22px 12px; text-align: center; }
.up-drop .i.big { width: 42px; height: 42px; color: var(--red-hi); filter: drop-shadow(0 0 14px var(--red-glow)); }
.up-drop strong { font-size: 16px; }
.up-drop.compact { display: flex; flex-wrap: wrap; align-items: center; justify-items: start; gap: 10px; padding: 0; text-align: left; }
.up-file { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.up-file > .i { width: 28px; height: 28px; color: var(--ok); vertical-align: 0; }
.up-file.missing > .i { color: var(--warn); }
.up-file-text strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.up-file-text small { display: block; margin-top: 2px; font-size: 12px; font-weight: 700; color: var(--muted); }
.up-vid.compact .up-file { grid-template-columns: auto minmax(0, 1fr); }
.up-vid.compact .up-file .up-acts { grid-column: 1 / -1; }
.up-busy { display: grid; gap: 8px; }
.up-busy-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.up-busy-row > .i { color: var(--red-hi); animation: upBob 1.2s ease-in-out infinite; }
.up-busy-row strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.up-bar { position: relative; height: 8px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, 0.08); }
.up-bar i {
  position: absolute; inset: 0 auto 0 0; width: 0; overflow: hidden; border-radius: inherit;
  background: linear-gradient(90deg, var(--red-deep), var(--red) 60%, var(--red-hi)); box-shadow: 0 0 16px var(--red-glow);
  transition: width 0.35s var(--ease-out);
}
.up-busy .up-bar i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent); animation: upShine 1.4s linear infinite; }
.up-bar.indeterminate i { width: 38% !important; transition: none; animation: upSlide 1.3s var(--ease-in-out) infinite; }
.up-meta { font-size: 12px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.up-err { margin: 0; font-size: 13px; color: #ff9aa4; font-weight: 700; }
.up-preview video { display: block; width: 100%; max-height: 360px; border-radius: 10px; background: #000; }
.up-spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.25); border-top-color: var(--red-hi); animation: spin 0.8s linear infinite; vertical-align: -2px; }
.up-chip { margin-left: auto; padding: 5px 11px; border-radius: 99px; font-size: 12px; font-weight: 800; color: #ffd1d6; background: rgba(229, 24, 43, 0.16); border: 1px solid rgba(229, 24, 43, 0.45); font-variant-numeric: tabular-nums; white-space: nowrap; }
#edSave[disabled] { opacity: 0.7; }

/* Admin → Uploads library */
.ad-lib { display: grid; gap: 18px; padding: 22px 24px 30px; }
.lib-space { display: grid; gap: 10px; padding: 16px; border-radius: 14px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.03); }
.lib-space-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--text-2); }
.lib-space-row b { font-size: 18px; color: #fff; }
.lib-space .hint { margin: 0; font-size: 12px; color: var(--muted); }
.lib-persist { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lib-list { display: grid; gap: 8px; }
.lib-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.025); }
.lib-row > img, .lib-ico { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: #0a0a0d; }
.lib-ico { display: grid; place-items: center; border: 1px solid var(--line); color: var(--red-hi); }
.lib-ico .i { width: 26px; height: 26px; }
.lib-text strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.lib-text small { display: block; margin-top: 2px; font-size: 12px; font-weight: 700; color: var(--muted); }
.lib-text small.status-ok { color: var(--ok); }
.rep-row .acts { display: flex; gap: 6px; }
.lib-text small.rep-note { color: var(--text-2); font-style: italic; }
.lib-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-2); }

/* Player: opening an uploaded video */
.pl-loading { position: relative; display: grid; justify-items: center; gap: 14px; font-weight: 700; color: var(--text-2); }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.15); border-top-color: var(--red-hi); animation: spin 0.9s linear infinite; }

/* ---------- search ---------- */
.search { position: fixed; inset: 0; z-index: 90; overflow-y: auto; background: rgba(5, 5, 6, 0.94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.search.is-entering { animation: fadeIn 0.35s var(--ease-out) both; }
.search.is-leaving { animation: fadeOut 0.25s both; }
.search-top { position: sticky; top: 0; z-index: 2; padding: 22px var(--gutter) 18px; background: linear-gradient(180deg, rgba(5, 5, 6, 0.98) 70%, rgba(5, 5, 6, 0)); }
.search-row { display: flex; align-items: center; gap: 14px; max-width: 1100px; margin: 0 auto; }
.search-input {
  flex: 1; min-width: 0; padding: 14px 0; border: 0; border-bottom: 2px solid var(--line-strong); background: transparent;
  font-family: var(--font-ui); font-size: clamp(24px, 4vw, 46px); font-weight: 800; letter-spacing: -0.03em; color: #fff;
  transition: border-color 0.3s;
}
.search-input:focus { outline: none; border-color: var(--red); }
.search-input::placeholder { color: #4c4744; }
.search-body { max-width: 1100px; margin: 0 auto; padding: 8px var(--gutter) 60px; }
.search-body .grid { margin: 22px 0 0; }
.search-hint { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search-hint kbd { font-family: inherit; font-size: 12px; padding: 2px 7px; border-radius: 5px; border: 1px solid var(--line-strong); color: var(--text-2); }

/* ---------- confirm dialog + toasts ---------- */
.dialog { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(4px); animation: fadeIn 0.25s both; }
.dialog-card { width: min(440px, 100%); padding: 28px; border-radius: var(--radius-lg); background: #121216; border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); animation: popIn 0.4s var(--ease-out) both; }
.dialog-card h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.dialog-card p { margin-top: 10px; color: var(--text-2); }
.dialog-card .row { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.toasts { position: fixed; z-index: 300; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 10px; justify-items: center; width: min(560px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px 12px 16px; border-radius: 14px;
  background: rgba(22, 22, 27, 0.96); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg);
  font-size: 14px; font-weight: 700; backdrop-filter: blur(12px);
  animation: toastIn 0.5s var(--ease-out) both;
}
.toast.is-leaving { animation: toastOut 0.3s var(--ease-in-out) both; }
.toast .i { width: 18px; height: 18px; color: var(--red-hi); flex: none; }
.toast.ok .i { color: var(--ok); }
.toast.error { border-color: rgba(229, 24, 43, 0.5); }
.toast button { margin-left: 6px; padding: 6px 10px; border-radius: 8px; font-weight: 800; font-size: 13px; color: #fff; background: rgba(255, 255, 255, 0.1); }
.toast button:hover { background: rgba(255, 255, 255, 0.18); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .d-hero { grid-template-columns: 1fr; min-height: 0; padding-top: 34vh; gap: 0; }
  .d-poster { display: none; }
  .d-backdrop { height: 70vh; }
  .d-backdrop::after { background: linear-gradient(0deg, #060607 8%, rgba(6, 6, 7, 0.75) 45%, rgba(6, 6, 7, 0.15) 80%), linear-gradient(180deg, rgba(6, 6, 7, 0.6), transparent 25%); }
  .ep { grid-template-columns: minmax(130px, 42%) minmax(0, 1fr); gap: 14px; padding: 10px; }
  .ep-num { display: none; }
  .ep-body p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; }
  .ad-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ad-row { grid-template-columns: 46px minmax(0, 1fr) auto; }
  .ad-row .cell { display: none; }
  .auth-wall { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
  .d-section-head .select { width: 100%; }
  .ep { grid-template-columns: 1fr; }
  .ep-body h3 { font-size: 16px; }
  .ad-grid, .ad-grid.three { grid-template-columns: 1fr; }
  .ad-grid .span-2 { grid-column: auto; }
  .ad-preview { grid-template-columns: 96px 1fr; }
  .ad-preview .poster { width: 96px; }
  .ad-ep { grid-template-columns: 1fr; }
  .ad-ep .n { text-align: left; line-height: 1; }
  .ad-ep .mv { grid-auto-flow: column; justify-content: start; }
  .ad-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-row .acts .btn span { display: none; }
  .ad-top .studio { display: none; }
  .up-img { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
  .up-img.up-backdrop { grid-template-columns: 1fr; }
  .up-file { grid-template-columns: auto minmax(0, 1fr); }
  .up-file .up-acts { grid-column: 1 / -1; }
  .ad-lib { padding: 18px 16px 26px; }
  .lib-row { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; }
  .lib-row > img, .lib-ico { width: 48px; height: 48px; }
  .ad-head-acts { width: 100%; }
  .ad-head-acts .btn { flex: 1 1 auto; }
  .pl-top { padding-top: 12px; padding-bottom: 12px; gap: 10px; }
  .pl-tools { gap: 8px; }
  .pl-tools .btn { width: 40px; min-height: 40px; padding: 0; }
  .pl-tools .btn span { display: none; }
  .pl-ep { grid-template-columns: 96px 1fr; }
  /* phone: the screen runs edge to edge, everything else keeps the side margins */
  .pl-main { padding: 0 0 48px; gap: 14px; }
  .pl-theater { max-width: none; min-width: 0; }
  .pl-frame { border-radius: 0; border-left: 0; border-right: 0; }
  .pl-bar, .pl-servers, .pl-notice, .pl-about { margin: 0 var(--gutter); }
  .pl-bar { gap: 8px; }
  .pl-now { flex: 1 1 100%; font-size: 13px; }
  .pl-bar-tools { flex: 1 1 100%; }
  .pl-bar-tools .btn { margin-left: auto; }
  .pl-servers { padding: 14px; }
  .pl-servers-head h2 { font-size: 19px; }
  .pl-server-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pl-server:last-child:nth-child(odd) { grid-column: 1 / -1; } /* the 7th server gets the full row */
  .pl-server { min-height: 52px; padding: 8px 10px; gap: 8px; }
  .pl-server-ico { width: 30px; height: 30px; }
  .pl-msg { padding: 10px; }
  .pl-msg .ico { display: none; }
  .pl-msg p { font-size: 13px; }
  .pl-msg .actions { margin-top: 10px; }
  .pl-theater .pl-resume, .pl-theater .pl-next { position: static; transform: none; width: auto; max-width: none; margin: 10px var(--gutter) 0; white-space: normal; }
  .pl-about { grid-template-columns: 76px minmax(0, 1fr); gap: 14px; }
  .pl-about .poster { width: 76px; }
}
