/*!
 * Series Gato (toroplay-child) — Netflix-inspired, green brand.
 * Light by default, dark switch ([data-theme] on <html>, set before paint).
 * Everything is driven by the custom properties below.
 */

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
	--bg: #f5f6f5;
	--bg-elev: #ffffff;
	--card: #e8eae9;
	--card-2: #dcdfdd;
	--text: #141414;
	--text-2: #3b403d;
	--muted: #646a67;
	--line: rgba(20, 20, 20, .1);
	--line-strong: rgba(20, 20, 20, .28);
	--green: #16a34a;
	--green-h: #15803d;
	--brand: #037333;
	--green-soft: rgba(22, 163, 74, .12);
	--match: #15803d;
	--pop-bg: #ffffff;
	--shadow: 0 12px 34px rgba(0, 0, 0, .22), 0 2px 6px rgba(0, 0, 0, .12);
	--chrome: #141414;
	--chrome-text: #e5e5e5;
	--rank-stroke: #8a8f8c;
	--radius: 4px;
	--radius-lg: 6px;
	--hh: 68px;
	--pad: clamp(16px, 4vw, 60px);
	--gap: 6px;
	--f-display: "Bebas Neue", "Oswald", Impact, "Arial Narrow", sans-serif;
	--f-text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--ease: cubic-bezier(.2, .7, .2, 1);
	color-scheme: light;
}

:root[data-theme="dark"] {
	--bg: #141414;
	--bg-elev: #1f1f1f;
	--card: #262626;
	--card-2: #333333;
	--text: #ffffff;
	--text-2: #d2d2d2;
	--muted: #a3a3a3;
	--line: rgba(255, 255, 255, .1);
	--line-strong: rgba(255, 255, 255, .36);
	--green-soft: rgba(34, 197, 94, .16);
	--match: #46d369;
	--pop-bg: #181818;
	--shadow: 0 14px 40px rgba(0, 0, 0, .7);
	--rank-stroke: #8c8c8c;
	color-scheme: dark;
}

/* No-JS fallback: follow the OS. */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme]) {
		--bg: #141414;
		--bg-elev: #1f1f1f;
		--card: #262626;
		--card-2: #333333;
		--text: #ffffff;
		--text-2: #d2d2d2;
		--muted: #a3a3a3;
		--line: rgba(255, 255, 255, .1);
		--line-strong: rgba(255, 255, 255, .36);
		--match: #46d369;
		--pop-bg: #181818;
		--rank-stroke: #8c8c8c;
		color-scheme: dark;
	}
}

/* ==========================================================================
   Base
   ========================================================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-padding-top: calc(var(--hh) + 12px);
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 400 16px/1.5 var(--f-text);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
	transition: background-color .25s ease, color .25s ease;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
}

button,
input,
select {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
}

h1,
h2,
h3,
p {
	margin: 0;
}

:focus-visible {
	outline: 2px solid var(--green);
	outline-offset: 2px;
}

[hidden] {
	display: none !important;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.sg-skip:focus {
	position: fixed !important;
	top: 8px;
	left: 8px;
	z-index: 1000;
	width: auto;
	height: auto;
	clip: auto;
	padding: .6rem 1rem;
	background: var(--green);
	color: #fff;
	border-radius: var(--radius);
}

.sg-wrap {
	padding-inline: var(--pad);
}

.sg-ico {
	width: 1.25em;
	height: 1.25em;
	flex: 0 0 auto;
}

.sg-page {
	min-height: 70vh;
	padding-top: var(--hh);
}

.sg-has-hero .sg-page {
	padding-top: 0;
}

/* ==========================================================================
   Header (always dark: the logo has white text)
   ========================================================================== */
.sg-header {
	position: fixed;
	inset: 0 0 auto;
	z-index: 100;
	height: var(--hh);
	background: var(--chrome);
	color: var(--chrome-text);
	transition: background-color .35s ease;
}

.sg-has-hero .sg-header:not(.is-scrolled) {
	background: linear-gradient(to bottom, rgba(0, 0, 0, .78) 10%, rgba(0, 0, 0, 0));
}

.sg-header__in {
	display: flex;
	align-items: center;
	gap: clamp(12px, 2.4vw, 40px);
	height: 100%;
}

.sg-logo {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
}

.sg-logo__img {
	width: auto;
	height: 40px;
}

.sg-logo__text {
	font: 400 2rem/1 var(--f-display);
	color: var(--green);
	letter-spacing: .02em;
}

.sg-nav {
	flex: 1 1 auto;
	min-width: 0;
}

.sg-nav__list {
	display: flex;
	align-items: center;
	gap: clamp(10px, 1.5vw, 22px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.sg-nav__link {
	display: inline-flex;
	align-items: center;
	gap: .2em;
	padding: 0;
	border: 0;
	background: none;
	color: var(--chrome-text);
	font-size: .875rem;
	font-weight: 500;
	white-space: nowrap;
	transition: color .2s;
}

.sg-nav__link:hover {
	color: #b3b3b3;
}

.sg-nav__link.is-active {
	color: #fff;
	font-weight: 700;
}

.sg-dd {
	position: relative;
}

.sg-dd__chev {
	width: 1em;
	height: 1em;
	transition: transform .2s;
}

.sg-dd.is-open .sg-dd__chev {
	transform: rotate(180deg);
}

.sg-dd__menu {
	position: absolute;
	top: calc(100% + 18px);
	left: 50%;
	display: grid;
	grid-template-columns: repeat(3, minmax(150px, 1fr));
	gap: 2px 18px;
	padding: 18px 22px;
	background: rgba(0, 0, 0, .92);
	border: 1px solid rgba(255, 255, 255, .15);
	border-top: 2px solid var(--green);
	border-radius: 0 0 var(--radius) var(--radius);
	opacity: 0;
	visibility: hidden;
	transform: translate(-50%, -6px);
	transition: opacity .18s, transform .18s, visibility .18s;
}

.sg-dd.is-open .sg-dd__menu {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
}

.sg-dd__menu a {
	padding: 5px 0;
	color: #e5e5e5;
	font-size: .85rem;
	white-space: nowrap;
}

.sg-dd__menu a:hover,
.sg-dd__menu a.is-active {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.sg-header__tools {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
}

.sg-iconbtn {
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	transition: background-color .2s;
}

.sg-iconbtn:hover {
	background: rgba(255, 255, 255, .12);
}

.sg-iconbtn .sg-ico {
	width: 22px;
	height: 22px;
}

.sg-search {
	display: flex;
	align-items: center;
	height: 38px;
	border: 1px solid transparent;
	transition: border-color .25s, background-color .25s;
}

.sg-search.is-open {
	border-color: rgba(255, 255, 255, .85);
	background: rgba(0, 0, 0, .78);
}

.sg-search__toggle {
	width: 36px;
	height: 36px;
	border-radius: 0;
}

.sg-search__toggle:hover {
	background: transparent;
}

.sg-search__input {
	width: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	font-size: .9rem;
	outline: 0;
	transition: width .3s var(--ease), padding .3s;
}

.sg-search.is-open .sg-search__input {
	width: min(15rem, 40vw);
	padding-right: 10px;
}

.sg-search__input::placeholder {
	color: #a3a3a3;
}

.sg-search__input::-webkit-search-cancel-button {
	filter: invert(1);
}

:root[data-theme="dark"] .sg-theme-toggle__moon,
:root:not([data-theme="dark"]) .sg-theme-toggle__sun {
	display: none;
}

/* Mobile tab bar + sheet */
.sg-tabbar {
	display: none;
}

.sg-sheet {
	position: fixed;
	inset: 0;
	z-index: 150;
}

.sg-sheet__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .6);
}

.sg-sheet__panel {
	position: absolute;
	inset: auto 0 0;
	max-height: 82vh;
	overflow: auto;
	padding: 16px var(--pad) calc(24px + env(safe-area-inset-bottom));
	background: var(--bg-elev);
	border-radius: 12px 12px 0 0;
	animation: sg-up .25s var(--ease);
}

.sg-sheet__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
	font-size: 1.1rem;
}

.sg-sheet__head .sg-iconbtn:hover {
	background: var(--card);
}

.sg-sheet__links {
	display: grid;
	gap: 2px;
	margin-bottom: 14px;
}

.sg-sheet__links a {
	padding: 10px 0;
	border-bottom: 1px solid var(--line);
	font-weight: 600;
}

.sg-sheet__label {
	margin: 6px 0 10px;
	color: var(--muted);
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.sg-sheet__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.sg-sheet__grid a {
	padding: 12px;
	border-radius: var(--radius);
	background: var(--card);
	font-size: .9rem;
	font-weight: 600;
}

@keyframes sg-up {
	from {
		transform: translateY(30px);
		opacity: 0;
	}
}

/* ==========================================================================
   Buttons, chips, badges, meta
   ========================================================================== */
.sg-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.sg-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .55em;
	min-height: 2.6em;
	padding: .45em 1.35em;
	border: 0;
	border-radius: var(--radius);
	font-size: clamp(.92rem, 1.05vw, 1.05rem);
	font-weight: 700;
	line-height: 1.1;
	white-space: nowrap;
	text-shadow: none;
	transition: background-color .2s, color .2s, transform .15s, box-shadow .2s;
}

.sg-btn:active {
	transform: scale(.97);
}

.sg-btn small {
	font-weight: 500;
	opacity: .8;
}

.sg-btn .sg-ico {
	width: 1.35em;
	height: 1.35em;
}

.sg-btn--play {
	background: var(--green);
	color: #fff;
}

.sg-btn--play:hover {
	background: var(--green-h);
}

.sg-btn--glass {
	background: rgba(109, 109, 110, .7);
	color: #fff;
}

.sg-btn--glass:hover {
	background: rgba(109, 109, 110, .45);
}

.sg-btn--ghost {
	background: var(--card);
	color: var(--text);
}

.sg-btn--ghost:hover {
	background: var(--card-2);
}

.sg-btn--surprise {
	background: transparent;
	color: var(--green);
	box-shadow: inset 0 0 0 2px var(--green);
}

.sg-btn--surprise:hover {
	background: var(--green-soft);
}

.sg-btn--sm {
	min-height: 2.2em;
	padding: .3em .9em;
	font-size: .85rem;
}

.sg-btn.is-disabled {
	opacity: .4;
	pointer-events: none;
}

/* On dark imagery (hero / detail header) */
.sg-on-dark .sg-btn--ghost {
	background: rgba(109, 109, 110, .7);
	color: #fff;
}

.sg-on-dark .sg-btn--ghost:hover {
	background: rgba(109, 109, 110, .45);
}

.sg-on-dark .sg-btn--surprise {
	color: #fff;
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .8);
}

.sg-on-dark .sg-btn--surprise:hover {
	background: rgba(255, 255, 255, .14);
}

.sg-listbtn .sg-listbtn__on,
.sg-listbtn.is-on .sg-listbtn__add {
	display: none;
}

.sg-listbtn.is-on .sg-listbtn__on {
	display: block;
}

.sg-round {
	display: inline-grid;
	place-items: center;
	width: 36px;
	height: 36px;
	flex: 0 0 auto;
	padding: 0;
	border: 2px solid var(--line-strong);
	border-radius: 50%;
	background: transparent;
	color: var(--text);
	transition: border-color .2s, background-color .2s, transform .15s;
}

.sg-round:hover {
	border-color: var(--text);
}

.sg-round .sg-ico {
	width: 18px;
	height: 18px;
}

.sg-round--play {
	border-color: var(--green);
	background: var(--green);
	color: #fff;
}

.sg-round--play:hover {
	border-color: var(--green-h);
	background: var(--green-h);
}

.sg-chip {
	display: inline-flex;
	align-items: center;
	gap: .4em;
	padding: .45em .95em;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	background: transparent;
	color: var(--text);
	font-size: .85rem;
	font-weight: 600;
	white-space: nowrap;
	transition: background-color .2s, color .2s, border-color .2s;
}

.sg-chip:hover {
	border-color: var(--text);
}

.sg-chip.is-active {
	border-color: var(--text);
	background: var(--text);
	color: var(--bg);
}

.sg-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 18px;
}

.sg-langs {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
}

.sg-lang {
	display: inline-block;
	padding: .14em .42em;
	border: 1px solid var(--line-strong);
	border-radius: 3px;
	color: var(--text-2);
	font-size: .66rem;
	font-weight: 800;
	letter-spacing: .04em;
	line-height: 1.3;
}

.sg-lang--lat {
	border-color: var(--green);
	background: var(--green);
	color: #fff;
}

.sg-langs--dot {
	gap: 0;
	font-weight: 700;
}

.sg-langs--dot .sg-lang {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font-size: .82em;
	letter-spacing: .06em;
}

.sg-langs--dot .sg-lang--lat {
	color: var(--match);
}

.sg-langs__sep {
	margin: 0 .35em;
	opacity: .6;
}

.sg-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .35em .75em;
	color: var(--text-2);
	font-size: .95rem;
	font-weight: 500;
}

.sg-match {
	color: var(--match);
	font-weight: 700;
}

.sg-box {
	display: inline-block;
	padding: 0 .4em;
	border: 1px solid var(--line-strong);
	border-radius: 3px;
	font-size: .78em;
	line-height: 1.5;
}

.sg-kicker {
	display: flex;
	align-items: center;
	gap: .5em;
	color: inherit;
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .32em;
	text-transform: uppercase;
	opacity: .92;
}

.sg-kicker__mark {
	display: inline-grid;
	place-items: center;
	width: 1.5em;
	height: 1.9em;
	border-radius: 2px;
	background: var(--green);
	color: #fff;
	font: 400 1.35rem/1 var(--f-display);
	letter-spacing: 0;
	text-shadow: none;
}

.sg-link {
	display: inline-flex;
	align-items: center;
	gap: .2em;
	color: var(--green);
	font-weight: 700;
}

.sg-empty {
	padding: 2rem 0;
	color: var(--muted);
}

.sg-empty--big {
	display: grid;
	justify-items: center;
	gap: 14px;
	padding: 4rem 1rem;
	text-align: center;
}

.sg-empty__ico {
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	border: 2px solid var(--line-strong);
	border-radius: 50%;
}

.sg-sec__title {
	font-size: clamp(1.25rem, 1.8vw, 1.6rem);
	font-weight: 800;
	letter-spacing: -.01em;
}

.sg-clamp p {
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.sg-clamp.is-open p {
	display: block;
}

.sg-clamp__btn {
	justify-self: start;
	margin-top: -6px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--green);
	font-size: .9rem;
	font-weight: 700;
}

/* ==========================================================================
   Hero (home billboard) + series detail header
   ========================================================================== */
.sg-hero,
.sg-detail__hero {
	position: relative;
	height: min(56.25vw, 86vh);
	min-height: 520px;
	color: #fff;
	overflow: hidden;
	background: #000;
}

.sg-hero__media,
.sg-detail__media {
	position: absolute;
	inset: 0;
}

.sg-hero__media img,
.sg-detail__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 22%;
	animation: sg-fade .8s ease both;
}

.sg-hero__shade,
.sg-detail__shade {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(to top, var(--bg) 0, var(--bg) 4%, color-mix(in srgb, var(--bg) 80%, transparent) 13%, color-mix(in srgb, var(--bg) 25%, transparent) 26%, transparent 38%),
		linear-gradient(77deg, rgba(0, 0, 0, .82) 0, rgba(0, 0, 0, .5) 34%, rgba(0, 0, 0, .1) 62%, transparent 80%),
		linear-gradient(to bottom, rgba(0, 0, 0, .5) 0, transparent 20%);
}

.sg-hero__content,
.sg-detail__content {
	position: absolute;
	inset: auto 0 31% 0;
	display: grid;
	justify-items: start;
	gap: 14px;
	max-width: calc(44rem + var(--pad));
	text-shadow: 0 1px 12px rgba(0, 0, 0, .45);
}

.sg-hero__title,
.sg-detail__title {
	font: 400 clamp(3rem, 7vw, 6.6rem)/.88 var(--f-display);
	letter-spacing: .01em;
	text-transform: uppercase;
	text-wrap: balance;
	text-shadow: 0 2px 20px rgba(0, 0, 0, .5);
}

.sg-hero__rank {
	display: flex;
	align-items: center;
	gap: .6em;
	font-size: clamp(1rem, 1.5vw, 1.4rem);
	font-weight: 700;
}

.sg-top10 {
	display: inline-grid;
	place-items: center;
	width: 2em;
	height: 2em;
	border-radius: 3px;
	background: var(--green);
	color: #fff;
	font-size: .78em;
	font-weight: 800;
	letter-spacing: .04em;
	line-height: .85;
	text-align: center;
	text-shadow: none;
}

.sg-top10 b {
	display: block;
	font-size: 1.3em;
}

.sg-hero .sg-meta,
.sg-detail__hero .sg-meta {
	color: #fff;
}

.sg-hero .sg-match {
	color: #46d369;
}

.sg-hero .sg-box {
	border-color: rgba(255, 255, 255, .6);
}

.sg-hero__desc {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	max-width: 38rem;
	font-size: clamp(.95rem, 1.25vw, 1.2rem);
	line-height: 1.45;
}

.sg-hero__genres {
	color: rgba(255, 255, 255, .82);
	font-size: .9rem;
	font-weight: 600;
}

.sg-hero .sg-langs--dot .sg-lang--lat {
	color: #46d369;
}

@keyframes sg-fade {
	from {
		opacity: 0;
		transform: scale(1.03);
	}
}

/* Rows overlap the hero's fade, like Netflix. */
.sg-rows {
	position: relative;
	z-index: 2;
	margin-top: clamp(-110px, -6.5vw, -32px);
	padding-bottom: 2vw;
}

/* ==========================================================================
   Rows
   ========================================================================== */
.sg-row {
	--per: 6;
	position: relative;
	margin: 0 0 clamp(26px, 3.2vw, 48px);
}

.sg-row--top {
	--per: 5;
}

.sg-row--episode {
	--per: 5;
}

.sg-row__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}

.sg-row__title {
	font-size: clamp(1.05rem, 1.45vw, 1.45rem);
	font-weight: 800;
	letter-spacing: -.01em;
	line-height: 1.2;
}

.sg-row__title a {
	display: inline-flex;
	align-items: baseline;
	gap: .5em;
}

.sg-row__more {
	display: inline-flex;
	align-items: center;
	color: var(--green);
	font-size: .78rem;
	font-weight: 700;
	opacity: 0;
	transform: translateX(-8px);
	transition: opacity .25s, transform .25s;
}

.sg-row__more .sg-ico {
	width: 1.1em;
	height: 1.1em;
}

.sg-row:hover .sg-row__more,
.sg-row__title a:focus-visible .sg-row__more {
	opacity: 1;
	transform: none;
}

.sg-row__clear {
	padding: 0;
	border: 0;
	background: none;
	color: var(--muted);
	font-size: .8rem;
	font-weight: 600;
}

.sg-row__clear:hover {
	color: var(--text);
}

.sg-row__dots {
	display: flex;
	gap: 2px;
	opacity: 0;
	transition: opacity .25s;
}

.sg-row:hover .sg-row__dots {
	opacity: 1;
}

.sg-row__dots i {
	width: 12px;
	height: 2px;
	background: var(--line-strong);
}

.sg-row__dots i.is-on {
	background: var(--text);
}

.sg-row__viewport {
	position: relative;
}

.sg-row__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - (var(--per) - 1) * var(--gap)) / var(--per));
	gap: var(--gap);
	padding: 4px var(--pad) 6px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--pad);
	scrollbar-width: none;
}

.sg-row__track::-webkit-scrollbar {
	display: none;
}

.sg-row__track > * {
	scroll-snap-align: start;
	min-width: 0;
}

.sg-row__arrow {
	position: absolute;
	top: 4px;
	bottom: 6px;
	z-index: 3;
	display: grid;
	place-items: center;
	width: calc(var(--pad) - 6px);
	min-width: 30px;
	padding: 0;
	border: 0;
	background: rgba(20, 20, 20, .55);
	color: #fff;
	opacity: 0;
	transition: opacity .2s, background-color .2s;
}

.sg-row__arrow .sg-ico {
	width: 34px;
	height: 34px;
	transition: transform .2s;
}

.sg-row__arrow:hover {
	background: rgba(20, 20, 20, .75);
}

.sg-row__arrow:hover .sg-ico {
	transform: scale(1.25);
}

.sg-row__arrow--prev {
	left: 0;
	border-radius: 0 var(--radius) var(--radius) 0;
}

.sg-row__arrow--next {
	right: 0;
	border-radius: var(--radius) 0 0 var(--radius);
}

@media (hover: hover) and (pointer: fine) {
	.sg-row:hover .sg-row__arrow {
		opacity: 1;
	}
}

.sg-row.at-start .sg-row__arrow--prev,
.sg-row.at-end .sg-row__arrow--next {
	opacity: 0 !important;
	pointer-events: none;
}

/* ==========================================================================
   Cards (16:9 backdrop) + Top 10 posters
   ========================================================================== */
.sg-card {
	position: relative;
}

.sg-card__link {
	display: block;
}

.sg-card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--card);
}

.sg-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s var(--ease);
}

.sg-card__media::after {
	content: "";
	position: absolute;
	inset: 40% 0 0;
	background: linear-gradient(to top, rgba(0, 0, 0, .8), transparent);
	pointer-events: none;
}

.sg-card--poster .sg-card__media {
	aspect-ratio: 2 / 3;
}

.sg-card--poster .sg-card__media::after {
	display: none;
}

.sg-card__title {
	position: absolute;
	inset: auto 8px 7px;
	z-index: 1;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: #fff;
	font: 400 clamp(1.05rem, 1.45vw, 1.5rem)/.95 var(--f-display);
	letter-spacing: .02em;
	text-transform: uppercase;
	text-shadow: 0 1px 6px rgba(0, 0, 0, .6);
}

.sg-card__ribbon {
	position: absolute;
	top: 7px;
	left: 0;
	z-index: 1;
	padding: 2px 7px 2px 6px;
	border-radius: 0 2px 2px 0;
	background: var(--green);
	color: #fff;
	font-size: .62rem;
	font-weight: 800;
	letter-spacing: .03em;
	text-transform: uppercase;
}

.sg-card__link:hover .sg-card__media img {
	transform: scale(1.04);
}

.sg-card--rank {
	display: flex;
	align-items: flex-end;
}

.sg-card__rank {
	flex: 0 0 42%;
	margin-right: 1%;
	color: var(--bg);
	font: 400 clamp(6rem, 10.5vw, 11.5rem)/.74 var(--f-display);
	letter-spacing: -.04em;
	text-align: right;
	-webkit-text-stroke: 3px var(--rank-stroke);
	paint-order: stroke fill;
	user-select: none;
}

.sg-card--rank .sg-card__link {
	position: relative;
	z-index: 1;
	flex: 0 0 57%;
}

.sg-row--top .sg-card:nth-child(10) .sg-card__rank {
	letter-spacing: -.16em;
	margin-right: -2%;
}

/* Hover preview (built by sg.js, appended to <body>) */
.sg-pop {
	position: absolute;
	z-index: 90;
	overflow: hidden;
	border-radius: var(--radius-lg);
	background: var(--pop-bg);
	box-shadow: var(--shadow);
	opacity: 0;
	transform: scale(.66);
	transition: transform .28s var(--ease), opacity .2s ease;
	will-change: transform;
}

.sg-pop.is-open {
	opacity: 1;
	transform: none;
}

.sg-pop__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	background: var(--card);
}

.sg-pop__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sg-pop__media::after {
	content: "";
	position: absolute;
	inset: 50% 0 0;
	background: linear-gradient(to top, var(--pop-bg), transparent);
}

.sg-pop__media .sg-card__title {
	inset: auto 14px 6px;
	font-size: 1.7rem;
	color: var(--text);
	text-shadow: none;
}

.sg-pop__body {
	display: grid;
	gap: 9px;
	padding: 6px 16px 16px;
}

.sg-pop__actions {
	display: flex;
	gap: 8px;
}

.sg-pop__more {
	margin-left: auto;
}

.sg-pop__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	color: var(--text-2);
	font-size: .85rem;
	font-weight: 600;
}

.sg-pop__genres {
	color: var(--text);
	font-size: .82rem;
	font-weight: 500;
}

.sg-pop .sg-langs--dot {
	color: var(--text-2);
	font-size: .85rem;
}

/* ==========================================================================
   Episode cards (rows + grids)
   ========================================================================== */
.sg-ecard__link {
	display: block;
}

.sg-ecard__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--card);
}

.sg-ecard__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s var(--ease), filter .3s;
}

.sg-ecard__play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: rgba(0, 0, 0, .45);
	color: #fff;
	opacity: 0;
	transform: translate(-50%, -50%) scale(.85);
	transition: opacity .2s, transform .2s;
}

.sg-ecard__play .sg-ico {
	width: 20px;
	height: 20px;
}

.sg-ecard__link:hover .sg-ecard__play,
.sg-ecard__link:focus-visible .sg-ecard__play {
	opacity: 1;
	transform: translate(-50%, -50%);
}

.sg-ecard__link:hover img {
	transform: scale(1.04);
	filter: brightness(.8);
}

.sg-ecard__se {
	position: absolute;
	left: 8px;
	bottom: 9px;
	padding: 2px 6px;
	border-radius: 3px;
	background: rgba(0, 0, 0, .72);
	color: #fff;
	font-size: .72rem;
	font-weight: 800;
	letter-spacing: .03em;
}

.sg-ecard__bar,
.sg-ep__bar {
	position: absolute;
	inset: auto 0 0;
	height: 4px;
	background: rgba(128, 128, 128, .5);
	opacity: 0;
}

.sg-ecard__bar::after,
.sg-ep__bar::after {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: var(--p, 100%);
	background: var(--green);
}

.is-watched .sg-ecard__bar,
.is-watched .sg-ep__bar,
.sg-ecard--continue .sg-ecard__bar {
	opacity: 1;
}

.sg-ecard__body {
	display: grid;
	gap: 2px;
	padding: 8px 2px 0;
}

.sg-ecard__show {
	overflow: hidden;
	color: var(--muted);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
}

.sg-ecard__title {
	overflow: hidden;
	font-size: .92rem;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sg-ecard__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	color: var(--muted);
	font-size: .76rem;
}

.sg-ecard.is-current .sg-ecard__media {
	box-shadow: inset 0 0 0 3px var(--green);
}

.sg-ecard.is-current .sg-ecard__media::before {
	content: "Viendo";
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 1;
	padding: 2px 6px;
	border-radius: 3px;
	background: var(--green);
	color: #fff;
	font-size: .66rem;
	font-weight: 800;
	text-transform: uppercase;
}

.sg-ecard--continue {
	position: relative;
}

.sg-ecard__remove {
	position: absolute;
	top: 6px;
	right: 6px;
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .7);
	color: #fff;
	opacity: 0;
	transition: opacity .2s;
}

.sg-ecard__remove .sg-ico {
	width: 16px;
	height: 16px;
}

.sg-ecard--continue:hover .sg-ecard__remove,
.sg-ecard__remove:focus-visible {
	opacity: 1;
}

@media (hover: none) {
	.sg-ecard__remove {
		opacity: 1;
	}
}

/* ==========================================================================
   Grids / archives
   ========================================================================== */
.sg-archive {
	padding-top: clamp(24px, 4vw, 48px);
	padding-bottom: 2rem;
}

.sg-archive__head {
	display: grid;
	gap: 8px;
	margin-bottom: 20px;
}

.sg-archive__head .sg-kicker {
	color: var(--muted);
}

.sg-archive__title {
	font: 400 clamp(2.4rem, 5vw, 4rem)/.95 var(--f-display);
	letter-spacing: .01em;
}

.sg-archive__sub {
	color: var(--muted);
	font-size: .95rem;
}

.sg-archive__desc {
	max-width: 50rem;
	color: var(--text-2);
}

.sg-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
	gap: 26px var(--gap);
}

.sg-egrid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
	gap: 22px 12px;
}

.sg-letters {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0 0 22px;
}

.sg-letters a {
	display: grid;
	place-items: center;
	min-width: 32px;
	height: 32px;
	padding: 0 6px;
	border-radius: var(--radius);
	background: var(--card);
	font-size: .8rem;
	font-weight: 700;
}

.sg-letters a:hover,
.sg-letters a.is-active {
	background: var(--green);
	color: #fff;
}

.sg-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 36px 0 10px;
}

.sg-pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	border-radius: var(--radius);
	background: var(--card);
	font-size: .9rem;
	font-weight: 700;
}

.sg-pagination .page-numbers.current {
	background: var(--green);
	color: #fff;
}

.sg-pagination a.page-numbers:hover {
	background: var(--card-2);
}

.sg-pagination .dots {
	background: transparent;
}

.sg-more {
	margin-top: 24px;
	text-align: center;
}

/* ==========================================================================
   Series detail
   ========================================================================== */
.sg-detail__hero {
	height: min(50vw, 78vh);
	min-height: 480px;
}

.sg-detail__content {
	bottom: 24%;
}

.sg-detail__title {
	font-size: clamp(2.8rem, 6.2vw, 6rem);
}

.sg-detail__info,
.sg-eps,
.sg-similar {
	max-width: calc(1240px + 2 * var(--pad));
	margin-inline: auto;
}

.sg-detail__info {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
	gap: 24px clamp(24px, 4vw, 56px);
	margin-top: clamp(-90px, -6vw, -30px);
}

.sg-detail__main {
	display: grid;
	gap: 14px;
	align-content: start;
	font-size: 1.02rem;
	line-height: 1.6;
}

.sg-detail__side {
	display: grid;
	gap: 10px;
	align-content: start;
	margin: 0;
	font-size: .9rem;
	line-height: 1.5;
}

.sg-detail__side dt {
	display: inline;
	color: var(--muted);
}

.sg-detail__side dd {
	display: inline;
	margin: 0 0 0 .25em;
}

.sg-detail__side a:hover {
	text-decoration: underline;
}

/* Episodes */
.sg-eps {
	margin-top: clamp(30px, 4vw, 54px);
}

.sg-eps__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--line);
}

.sg-eps__one {
	color: var(--muted);
	font-weight: 600;
}

.sg-select {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.sg-select select {
	appearance: none;
	min-width: 13rem;
	padding: .7em 2.6em .7em 1em;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	background: var(--card);
	color: var(--text);
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
}

.sg-select .sg-ico {
	position: absolute;
	right: 10px;
	pointer-events: none;
}

.sg-eplist {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sg-ep__link {
	display: grid;
	grid-template-columns: 2.6rem minmax(120px, 11.5rem) minmax(0, 1fr);
	align-items: center;
	gap: 6px 20px;
	padding: 18px 16px;
	border-bottom: 1px solid var(--line);
	border-radius: var(--radius);
	transition: background-color .2s;
}

.sg-ep__link:hover,
.sg-ep.is-current .sg-ep__link {
	background: var(--card);
}

.sg-ep__num {
	color: var(--muted);
	font-size: 1.5rem;
	text-align: center;
}

.sg-ep__thumb {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--card-2);
}

.sg-ep__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sg-ep__play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: rgba(0, 0, 0, .5);
	color: #fff;
	opacity: 0;
	transform: translate(-50%, -50%);
	transition: opacity .2s;
}

.sg-ep__play .sg-ico {
	width: 18px;
	height: 18px;
}

.sg-ep__link:hover .sg-ep__play,
.sg-ep.is-current .sg-ep__play {
	opacity: 1;
}

.sg-ep__body {
	display: grid;
	gap: 6px;
	min-width: 0;
}

.sg-ep__top {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-weight: 700;
}

.sg-ep__time {
	flex: 0 0 auto;
	font-weight: 600;
}

.sg-ep__ov {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: var(--text-2);
	font-size: .88rem;
	line-height: 1.45;
}

.sg-ep__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	color: var(--muted);
	font-size: .78rem;
}

.sg-ep__seen {
	display: none;
	color: var(--match);
	font-weight: 700;
}

.sg-ep.is-watched .sg-ep__seen {
	display: inline;
}

.sg-ep--loading {
	height: 130px;
	margin: 12px 0;
	border-radius: var(--radius);
	background: linear-gradient(90deg, var(--card) 0, var(--card-2) 40%, var(--card) 80%) 0 0 / 200% 100%;
	animation: sg-shimmer 1.2s linear infinite;
}

@keyframes sg-shimmer {
	to {
		background-position: -200% 0;
	}
}

/* Similar tiles */
.sg-similar {
	margin-top: clamp(36px, 5vw, 64px);
	margin-bottom: 20px;
}

.sg-similar .sg-sec__title {
	margin-bottom: 16px;
}

.sg-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
	gap: 14px;
}

.sg-tile {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: var(--radius-lg);
	background: var(--bg-elev);
	box-shadow: 0 0 0 1px var(--line);
}

:root[data-theme="dark"] .sg-tile {
	background: #2f2f2f;
	box-shadow: none;
}

.sg-tile__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	background: var(--card);
}

.sg-tile__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sg-tile__len {
	position: absolute;
	top: 8px;
	right: 8px;
	padding: 1px 6px;
	border-radius: 3px;
	background: rgba(0, 0, 0, .7);
	color: #fff;
	font-size: .72rem;
	font-weight: 700;
}

.sg-tile__play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: rgba(0, 0, 0, .5);
	color: #fff;
	opacity: 0;
	transform: translate(-50%, -50%);
	transition: opacity .2s;
}

.sg-tile__media:hover .sg-tile__play {
	opacity: 1;
}

.sg-tile__body {
	display: grid;
	gap: 10px;
	padding: 14px;
}

.sg-tile__row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
}

.sg-tile__title {
	font-size: .98rem;
	font-weight: 800;
	line-height: 1.25;
}

.sg-tile__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-top: 4px;
	color: var(--text-2);
	font-size: .82rem;
}

.sg-tile__desc {
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: var(--text-2);
	font-size: .85rem;
	line-height: 1.45;
}

/* ==========================================================================
   Episode page (watch)
   ========================================================================== */
.sg-watch__stage {
	padding: clamp(14px, 2vw, 26px) 0 clamp(16px, 2vw, 24px);
	background: #000;
	color: #fff;
}

.sg-watch__player {
	max-width: calc(1320px + 2 * var(--pad));
	margin-inline: auto;
}

.sg-player__screen {
	position: relative;
	aspect-ratio: 16 / 9;
	max-height: calc(100vh - var(--hh) - 150px);
	min-height: 200px;
	margin-inline: auto;
	overflow: hidden;
	border-radius: var(--radius);
	background: #0b0b0b;
}

.sg-player__screen .TPlayerTb,
.sg-player__screen iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.sg-player__empty {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 20px;
	background: #111 center / cover;
	text-align: center;
}

.sg-player__empty p {
	padding: 12px 18px;
	border-radius: var(--radius);
	background: rgba(0, 0, 0, .75);
}

.sg-fake {
	position: absolute;
	inset: 0;
	display: block;
}

.sg-fake .plyrbg,
.sg-fake img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sg-fake__play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: grid;
	place-items: center;
	width: 84px;
	height: 84px;
	border-radius: 50%;
	background: var(--green);
	color: #fff;
	transform: translate(-50%, -50%);
}

.sg-fake__time {
	position: absolute;
	bottom: 12px;
	left: 12px;
	padding: 2px 8px;
	border-radius: 3px;
	background: rgba(0, 0, 0, .7);
	font-size: .85rem;
}

.sg-player__opts {
	display: grid;
	gap: 10px;
	margin-top: 14px;
}

.sg-player__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
}

.sg-player__label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-width: 6.5rem;
	color: #a3a3a3;
	font-size: .78rem;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.sg-player__label .sg-ico {
	width: 18px;
	height: 18px;
}

.sg-seg {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 6px;
}

.sg-seg__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: var(--radius);
	background: rgba(255, 255, 255, .06);
	color: #fff;
	font-size: .92rem;
	font-weight: 700;
	transition: background-color .2s, border-color .2s;
}

.sg-seg__btn:hover {
	border-color: rgba(255, 255, 255, .6);
}

.sg-seg__btn.is-active {
	border-color: var(--green);
	background: var(--green);
}

.sg-seg__btn .sg-lang {
	border-color: rgba(255, 255, 255, .5);
	background: transparent;
	color: #fff;
}

.sg-servers {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sg-server {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 12px;
	border: 1px solid rgba(255, 255, 255, .18);
	border-radius: var(--radius);
	background: #1c1c1c;
	color: #e5e5e5;
	font-size: .85rem;
	font-weight: 600;
	transition: border-color .2s, background-color .2s;
}

.sg-server:hover {
	border-color: rgba(255, 255, 255, .5);
}

.sg-server.on {
	border-color: #fff;
	background: #fff;
	color: #141414;
}

.sg-server .nmopt {
	color: inherit;
	font-variant-numeric: tabular-nums;
	opacity: .55;
}

.sg-server__q {
	padding: 0 5px;
	border: 1px solid currentColor;
	border-radius: 3px;
	font-size: .66rem;
	font-weight: 800;
	opacity: .7;
}

.sg-downloads {
	margin-top: 14px;
	border-top: 1px solid rgba(255, 255, 255, .12);
}

.sg-downloads summary {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 0 4px;
	color: #bdbdbd;
	font-size: .9rem;
	font-weight: 700;
	list-style: none;
	cursor: pointer;
}

.sg-downloads summary::-webkit-details-marker {
	display: none;
}

.sg-downloads__chev {
	transition: transform .2s;
}

.sg-downloads[open] .sg-downloads__chev {
	transform: rotate(180deg);
}

.sg-downloads__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 6px;
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
}

.sg-downloads__list a {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	padding: 9px 12px;
	border-radius: var(--radius);
	background: #1c1c1c;
	font-size: .85rem;
}

.sg-downloads__list small {
	color: #a3a3a3;
}

.sg-watch__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
	gap: clamp(20px, 3vw, 48px);
	max-width: calc(1320px + 2 * var(--pad));
	margin: 0 auto;
	padding-top: 26px;
	padding-bottom: 30px;
}

.sg-watch__info {
	display: grid;
	gap: 12px;
	align-content: start;
}

.sg-watch__show {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	justify-self: start;
	color: var(--green);
	font-size: .95rem;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.sg-watch__show:hover {
	color: var(--green-h);
}

.sg-watch__title {
	font-size: clamp(1.5rem, 2.6vw, 2.3rem);
	font-weight: 800;
	letter-spacing: -.02em;
	line-height: 1.15;
}

.sg-watch__info .sg-clamp {
	max-width: 52rem;
	color: var(--text-2);
}

.sg-watch__nav {
	margin-top: 6px;
}

.sg-watch__side {
	display: grid;
	gap: 16px;
	align-content: start;
}

.sg-upnext {
	padding: 14px;
	border-radius: var(--radius-lg);
	background: var(--bg-elev);
	box-shadow: 0 0 0 1px var(--line);
}

:root[data-theme="dark"] .sg-upnext {
	background: var(--card);
	box-shadow: none;
}

.sg-upnext__label {
	margin-bottom: 10px;
	color: var(--muted);
	font-size: .75rem;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.sg-upnext--end {
	display: grid;
	gap: 10px;
	justify-items: start;
	color: var(--text-2);
	font-size: .9rem;
}

.sg-upnext__card {
	display: grid;
	gap: 10px;
}

.sg-upnext__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--card-2);
}

.sg-upnext__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sg-upnext__card:hover .sg-ecard__play {
	opacity: 1;
	transform: translate(-50%, -50%);
}

.sg-upnext__body {
	display: grid;
	gap: 4px;
}

.sg-upnext__se {
	color: var(--green);
	font-size: .78rem;
	font-weight: 800;
}

.sg-upnext__title {
	font-weight: 800;
}

.sg-upnext__ov {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: var(--text-2);
	font-size: .85rem;
}

.sg-watch__series {
	display: grid;
	grid-template-columns: 64px 1fr;
	align-items: center;
	gap: 12px;
	padding: 10px;
	border-radius: var(--radius-lg);
	background: var(--card);
}

.sg-watch__series img {
	width: 64px;
	height: 96px;
	border-radius: var(--radius);
	object-fit: cover;
}

.sg-watch__series > span {
	display: grid;
	gap: 2px;
}

.sg-watch__series small {
	color: var(--muted);
}

.sg-watch .sg-row {
	margin-top: 10px;
}

/* ==========================================================================
   Modals (Sorpréndeme, trailer), toast, 404, article, footer
   ========================================================================== */
.sg-modal {
	width: min(600px, calc(100vw - 32px));
	max-height: calc(100vh - 40px);
	padding: clamp(22px, 4vw, 36px);
	border: 0;
	border-radius: 8px;
	background: var(--bg-elev);
	color: var(--text);
	box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

.sg-modal[open] {
	animation: sg-pop-in .25s var(--ease);
}

.sg-modal::backdrop {
	background: rgba(0, 0, 0, .72);
}

@keyframes sg-pop-in {
	from {
		opacity: 0;
		transform: scale(.95);
	}
}

.sg-modal__close {
	position: absolute;
	top: 8px;
	right: 8px;
	margin: 0;
}

.sg-modal__close .sg-iconbtn:hover {
	background: var(--card);
}

.sg-surprise {
	text-align: center;
}

.sg-surprise__ico {
	display: inline-grid;
	place-items: center;
	width: 60px;
	height: 60px;
	margin-bottom: 8px;
	border-radius: 14px;
	background: var(--green);
	color: #fff;
	transform: rotate(-8deg);
}

.sg-surprise__ico .sg-ico {
	width: 32px;
	height: 32px;
}

.sg-surprise.is-rolling .sg-surprise__ico {
	animation: sg-roll .5s linear infinite;
}

@keyframes sg-roll {
	to {
		transform: rotate(352deg);
	}
}

.sg-surprise__title {
	font: 400 clamp(2.2rem, 5vw, 3rem)/1 var(--f-display);
	letter-spacing: .02em;
}

.sg-surprise__sub {
	margin: 6px 0 18px;
	color: var(--muted);
}

.sg-surprise__chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-bottom: 22px;
}

.sg-surprise__go {
	min-width: 14rem;
}

.sg-surprise__status {
	min-height: 1.5em;
	margin-top: 10px;
	color: var(--muted);
	font-size: .88rem;
}

.sg-modal--video {
	width: min(1100px, calc(100vw - 24px));
	padding: 0;
	background: #000;
	overflow: visible;
}

.sg-modal--video .sg-modal__close {
	top: -46px;
	right: 0;
	color: #fff;
}

.sg-modal--video .sg-modal__close .sg-iconbtn:hover {
	background: rgba(255, 255, 255, .15);
}

.sg-modal__frame {
	aspect-ratio: 16 / 9;
}

.sg-modal__frame iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

.sg-toast {
	position: fixed;
	left: 50%;
	bottom: 26px;
	z-index: 300;
	padding: 11px 18px;
	border-radius: var(--radius);
	background: #141414;
	color: #fff;
	box-shadow: 0 8px 26px rgba(0, 0, 0, .35);
	font-size: .9rem;
	font-weight: 600;
	opacity: 0;
	transform: translate(-50%, 16px);
	transition: opacity .2s, transform .2s;
	pointer-events: none;
}

:root[data-theme="dark"] .sg-toast {
	background: #fff;
	color: #141414;
}

.sg-toast.is-on {
	opacity: 1;
	transform: translate(-50%, 0);
}

.sg-404__box {
	display: grid;
	justify-items: center;
	gap: 12px;
	padding-top: clamp(40px, 8vw, 100px);
	padding-bottom: 50px;
	text-align: center;
}

.sg-404__code {
	color: transparent;
	font: 400 clamp(7rem, 20vw, 14rem)/.8 var(--f-display);
	-webkit-text-stroke: 3px var(--green);
}

.sg-404__search {
	display: flex;
	gap: 8px;
	width: min(520px, 100%);
	margin-top: 10px;
}

.sg-404__search input {
	flex: 1;
	min-width: 0;
	padding: 0 14px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	background: var(--bg-elev);
}

.sg-404__actions {
	justify-content: center;
	margin-top: 6px;
}

.sg-article {
	padding-top: clamp(24px, 4vw, 48px);
	padding-bottom: 40px;
}

.sg-article__in {
	max-width: 52rem;
}

.sg-article__content {
	margin-top: 18px;
	color: var(--text-2);
	line-height: 1.7;
}

.sg-article__content a {
	color: var(--green);
	text-decoration: underline;
}

.sg-article__content p {
	margin: 0 0 1em;
}

.sg-footer {
	margin-top: clamp(30px, 5vw, 70px);
	padding: 40px 0 36px;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: .84rem;
}

.sg-footer__top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 24px;
}

.sg-logo--footer {
	padding: 8px 12px;
	border-radius: var(--radius);
	background: var(--chrome);
}

.sg-logo--footer .sg-logo__img {
	height: 32px;
}

.sg-footer__cols {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 8px 24px;
	margin-bottom: 24px;
}

.sg-footer__cols ul {
	display: grid;
	gap: 9px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sg-footer__cols a:hover {
	color: var(--text);
	text-decoration: underline;
}

.sg-footer__text {
	max-width: 60rem;
	margin-bottom: 12px;
	line-height: 1.6;
}

.sg-footer__copy {
	font-size: .78rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1399px) {
	.sg-row {
		--per: 5;
	}
	.sg-row--episode {
		--per: 4;
	}
}

@media (max-width: 1099px) {
	.sg-row {
		--per: 4;
	}
	.sg-row--top {
		--per: 3.6;
	}
	.sg-row--episode {
		--per: 3;
	}
	.sg-detail__info {
		grid-template-columns: 1fr;
	}
	.sg-watch__grid {
		grid-template-columns: 1fr;
	}
	.sg-watch__side {
		grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	}
}

@media (max-width: 899px) {
	:root {
		--hh: 56px;
	}
	.sg-nav,
	.sg-header__dice {
		display: none;
	}
	.sg-logo__img {
		height: 34px;
	}
	.sg-search.is-open {
		position: absolute;
		inset: 9px var(--pad);
		z-index: 2;
	}
	.sg-search.is-open .sg-search__input {
		width: 100%;
	}
	.sg-tabbar {
		position: fixed;
		inset: auto 0 0;
		z-index: 110;
		display: grid;
		grid-template-columns: repeat(5, 1fr);
		padding-bottom: env(safe-area-inset-bottom);
		background: var(--chrome);
		border-top: 1px solid rgba(255, 255, 255, .08);
	}
	.sg-tabbar__item {
		display: grid;
		justify-items: center;
		gap: 2px;
		padding: 8px 0 7px;
		border: 0;
		background: none;
		color: #a3a3a3;
		font-size: .66rem;
		font-weight: 600;
	}
	.sg-tabbar__item .sg-ico {
		width: 22px;
		height: 22px;
	}
	.sg-tabbar__item.is-active {
		color: #fff;
	}
	.sg-tabbar__dice .sg-ico {
		color: var(--green);
	}
	body {
		padding-bottom: calc(58px + env(safe-area-inset-bottom));
	}
	.sg-toast {
		bottom: calc(76px + env(safe-area-inset-bottom));
	}
	.sg-row__arrow,
	.sg-row__dots {
		display: none;
	}
	.sg-row__more {
		opacity: 1;
		transform: none;
	}
	.sg-row {
		--per: 2.3;
		--gap: 5px;
	}
	.sg-row--top {
		--per: 2.1;
	}
	.sg-row--episode {
		--per: 1.7;
	}
	.sg-hero,
	.sg-detail__hero {
		display: flex;
		flex-direction: column;
		justify-content: flex-end;
		height: auto;
		min-height: 0;
		padding-top: calc(var(--hh) + 40vw);
		background: var(--bg);
		color: var(--text);
	}
	.sg-hero__media,
	.sg-detail__media {
		bottom: auto;
		height: calc(var(--hh) + 64vw);
	}
	.sg-hero__shade,
	.sg-detail__shade {
		bottom: auto;
		height: calc(var(--hh) + 64vw + 2px);
		background:
			linear-gradient(to top, var(--bg) 0, color-mix(in srgb, var(--bg) 70%, transparent) 18%, transparent 48%),
			linear-gradient(to bottom, rgba(0, 0, 0, .55) 0, transparent 30%);
	}
	.sg-hero__content,
	.sg-detail__content {
		position: relative;
		inset: auto;
		gap: 10px;
		padding-bottom: 20px;
		text-shadow: none;
	}
	.sg-hero__title,
	.sg-detail__title {
		font-size: clamp(2.6rem, 12vw, 3.6rem);
		text-shadow: none;
	}
	.sg-hero .sg-meta,
	.sg-detail__hero .sg-meta {
		color: var(--text-2);
	}
	.sg-hero .sg-match,
	.sg-hero .sg-langs--dot .sg-lang--lat {
		color: var(--match);
	}
	.sg-hero .sg-box {
		border-color: var(--line-strong);
	}
	.sg-hero__genres {
		color: var(--muted);
	}
	.sg-on-dark .sg-btn--ghost {
		background: var(--card);
		color: var(--text);
	}
	.sg-on-dark .sg-btn--surprise {
		color: var(--green);
		box-shadow: inset 0 0 0 2px var(--green);
	}
	.sg-on-dark .sg-btn--glass {
		background: var(--card);
		color: var(--text);
	}
	.sg-hero .sg-actions,
	.sg-detail__hero .sg-actions {
		width: 100%;
	}
	.sg-hero .sg-actions .sg-btn,
	.sg-detail__hero .sg-actions .sg-btn {
		flex: 1 1 auto;
	}
	.sg-rows {
		margin-top: 8px;
	}
	.sg-detail__info {
		margin-top: 0;
	}
	.sg-card__rank {
		-webkit-text-stroke-width: 2px;
	}
	.sg-ep__link {
		grid-template-columns: 8.5rem minmax(0, 1fr);
		gap: 10px 14px;
		padding: 14px 4px;
	}
	.sg-ep__num {
		display: none;
	}
	.sg-ep__body {
		display: contents;
	}
	.sg-ep__top {
		grid-column: 2;
		flex-direction: column;
		gap: 2px;
	}
	.sg-ep__time {
		color: var(--muted);
		font-size: .82rem;
	}
	.sg-ep__ov,
	.sg-ep__meta {
		grid-column: 1 / -1;
	}
	.sg-player__label {
		min-width: 0;
		width: 100%;
	}
	.sg-watch__stage {
		padding-top: 0;
	}
	.sg-player__screen {
		margin-inline: calc(-1 * var(--pad));
		border-radius: 0;
	}
	.sg-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px var(--gap);
	}
	.sg-egrid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px 8px;
	}
}

@media (max-width: 420px) {
	.sg-egrid {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
}
