.moviedb-widget {
	--sw-text: #24364a;
	--sw-muted: #7b8ba1;
	--sw-subtle: #a1adbc;
	--sw-border: #d8e0ea;
	--sw-border-strong: #c8d3df;
	--sw-surface: #ffffff;
	--sw-surface-soft: #fafcff;
	--sw-blue-bg: #eaf3ff;
	--sw-blue-text: #2a69b7;
	--sw-gray-bg: #f4f6f8;
	--sw-gray-text: #596579;
	--sw-green-bg: #edf7dc;
	--sw-green-text: #638a15;
	--sw-score-bg: #ffffff;
	--sw-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
	margin: 28px 0;
	color: var(--sw-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 14px;
	line-height: 1.6;
	box-sizing: border-box;
}

.moviedb-widget *,
.moviedb-widget *::before,
.moviedb-widget *::after {
	box-sizing: border-box;
}

.moviedb-widget p {
	margin: 0;
}

.moviedb-widget a {
	color: inherit !important;
	text-decoration: none !important;
	box-shadow: none !important;
}

.moviedb-widget img {
	border: 0;
	box-shadow: none;
	vertical-align: middle;
}

/* ---- Card ---- */

.moviedb-widget .sw-card {
	background: linear-gradient(180deg, var(--sw-surface) 0%, var(--sw-surface-soft) 100%);
	border: 1px solid var(--sw-border);
	border-radius: 18px;
	overflow: hidden;
	box-shadow: var(--sw-shadow);
}

/* ---- Layout ---- */

.moviedb-widget .sw-main {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	min-width: 0;
}

/* ---- Poster ---- */

.moviedb-widget .sw-poster-wrap {
	flex-shrink: 0;
	width: 140px;
	min-width: 140px;
	align-self: flex-start;
	background: transparent;
}

.moviedb-widget .sw-poster-wrap a {
	display: block;
	height: 100%;
	line-height: 0;
}

.moviedb-widget .sw-poster-wrap img {
	display: block;
	width: 140px !important;
	height: 210px !important;
	max-width: none !important;
	object-fit: cover;
}

/* ---- Info panel ---- */

.moviedb-widget .sw-info {
	flex: 1;
	min-width: 0;
	padding: 16px 18px 16px 18px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* ---- Badges ---- */

.moviedb-widget .sw-badges {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
}

.moviedb-widget .sw-badge {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	padding: 3px 10px;
	border-radius: 8px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
}

.moviedb-widget .sw-badge-type {
	background: var(--sw-blue-bg);
	color: var(--sw-blue-text);
}

.moviedb-widget .sw-badge-genre,
.moviedb-widget .sw-badge-ended {
	background: var(--sw-gray-bg);
	color: var(--sw-gray-text);
}

.moviedb-widget .sw-badge-ongoing {
	background: var(--sw-green-bg);
	color: var(--sw-green-text);
}

/* ---- Titles ---- */

.moviedb-widget .sw-title-th {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: -0.01em;
	color: #12243a;
}

.moviedb-widget .sw-title-link:hover {
	color: #1d4f89 !important;
}

.moviedb-widget .sw-title-en {
	margin-top: 4px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--sw-muted);
}

/* ---- Meta row ---- */

.moviedb-widget .sw-meta-row {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}

.moviedb-widget .sw-meta-item {
	font-size: 14px;
	color: #5f7086;
}

.moviedb-widget .sw-dot {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: #b9c4d2;
	display: inline-block;
	flex-shrink: 0;
}

/* ---- Scores ---- */

.moviedb-widget .sw-scores {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: flex-start;
}

.moviedb-widget .sw-scores > div {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.moviedb-widget .sw-score-box {
	min-width: 88px;
	background: var(--sw-score-bg);
	border: 1px solid var(--sw-border-strong);
	border-radius: 10px;
	padding: 6px 10px;
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
}

.moviedb-widget .sw-score-num {
	font-size: 17px;
	font-weight: 700;
	color: #14263d;
}

.moviedb-widget .sw-score-denom {
	font-size: 12px;
	color: #9aa7b7;
}

.moviedb-widget .sw-score-label {
	margin-top: 4px;
	font-size: 11px;
	line-height: 1.3;
	color: #41536b;
	text-align: center;
}

.moviedb-widget .sw-votes {
	font-size: 11px;
	line-height: 1.3;
	color: var(--sw-subtle);
	text-align: center;
}

.moviedb-widget .sw-star {
	color: #f5b83b;
	font-size: 12px;
}

/* ---- Watch platforms ---- */

.moviedb-widget .sw-platforms-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.moviedb-widget .sw-platforms-label {
	font-size: 11px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--sw-subtle);
}

.moviedb-widget .sw-platforms {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}

.moviedb-widget .sw-platform {
	width: 30px;
	height: 30px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: #ffffff;
	border: 1px solid var(--sw-border);
	transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
	flex-shrink: 0;
}

.moviedb-widget .sw-platform:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 14px rgba(30, 64, 175, 0.10);
	opacity: 1;
}

.moviedb-widget .sw-platform img {
	display: block;
	width: 30px !important;
	height: 30px !important;
	max-width: none !important;
	object-fit: contain;
	background: #ffffff;
}

.moviedb-widget .sw-platform span {
	font-size: 11px;
	font-weight: 700;
	color: #304256;
	line-height: 1;
}

.moviedb-widget .sw-platforms-text {
	font-size: 12px;
	line-height: 1.4;
	color: #5f7086;
}

/* ---- Synopsis ---- */

.moviedb-widget .sw-synopsis {
	font-size: 14px;
	color: #4b5d73;
	line-height: 1.8;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---- Divider ---- */

.moviedb-widget .sw-divider {
	border: none;
	border-top: 1px solid #e5ebf2;
	margin: 0;
}

/* ---- Cast section ---- */

.moviedb-widget .sw-cast-section {
	padding: 14px 18px 18px;
	background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.moviedb-widget .sw-cast-label {
	margin: 0 0 12px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--sw-subtle);
}

.moviedb-widget .sw-cast-list {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	padding-bottom: 4px;
	scrollbar-width: thin;
	scrollbar-color: #c7d2de transparent;
}

.moviedb-widget .sw-cast-list::-webkit-scrollbar {
	height: 5px;
}

.moviedb-widget .sw-cast-list::-webkit-scrollbar-thumb {
	background: #c7d2de;
	border-radius: 999px;
}

.moviedb-widget .sw-actor {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
	width: 76px;
}

.moviedb-widget .sw-actor-img {
	display: block;
	width: 56px !important;
	height: 56px !important;
	max-width: none !important;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid var(--sw-border);
	background: #edf2f7;
}

.moviedb-widget .sw-actor-placeholder {
	background: #edf2f7;
}

.moviedb-widget .sw-actor-name {
	font-size: 11px;
	font-weight: 600;
	line-height: 1.35;
	color: #304256;
	text-align: center;
}

.moviedb-widget .sw-actor-role {
	font-size: 10px;
	line-height: 1.35;
	color: var(--sw-subtle);
	text-align: center;
}

/* ---- Full variant ---- */

.moviedb-widget.moviedb-widget--variant-full .sw-card {
	background: linear-gradient(112deg, #fdfefe 0%, #f3f8ff 42%, #eaf2ff 100%);
	border-color: #cfdaea;
	border-radius: 28px;
	box-shadow: 0 20px 48px rgba(67, 91, 123, 0.16);
}

.moviedb-widget.moviedb-widget--variant-full .sw-main {
	display: grid;
	grid-template-columns: minmax(280px, 31.5%) minmax(0, 1fr);
	align-items: start;
}

.moviedb-widget.moviedb-widget--variant-full .sw-poster-wrap {
	width: auto;
	min-width: 0;
	align-self: start;
}

.moviedb-widget.moviedb-widget--variant-full .sw-poster-wrap a {
	height: auto;
}

.moviedb-widget.moviedb-widget--variant-full .sw-poster-wrap img {
	width: 100% !important;
	height: auto !important;
	aspect-ratio: auto;
	object-position: center center;
}

.moviedb-widget.moviedb-widget--variant-full .sw-info {
	padding: clamp(30px, 2.6vw, 42px) clamp(30px, 2.8vw, 42px) clamp(26px, 2.3vw, 34px);
	gap: clamp(16px, 1.6vw, 22px);
}

.moviedb-widget.moviedb-widget--variant-full .sw-badges {
	gap: 14px;
	margin-bottom: 2px;
}

.moviedb-widget.moviedb-widget--variant-full .sw-badge {
	min-height: 42px;
	padding: 8px 18px;
	border-radius: 16px;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: -0.01em;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.moviedb-widget.moviedb-widget--variant-full .sw-badge-type {
	background: linear-gradient(180deg, #eaf3ff 0%, #dbe9ff 100%);
	color: #2d6eb8;
}

.moviedb-widget.moviedb-widget--variant-full .sw-badge-genre,
.moviedb-widget.moviedb-widget--variant-full .sw-badge-ended {
	background: linear-gradient(180deg, #edf2f8 0%, #e2e9f2 100%);
	color: #5a677b;
}

.moviedb-widget.moviedb-widget--variant-full .sw-badge-ongoing {
	background: linear-gradient(180deg, #eef8dc 0%, #e3f0c3 100%);
	color: #668719;
}

.moviedb-widget.moviedb-widget--variant-full .sw-title-th {
	font-size: clamp(34px, 3.2vw, 54px);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.04em;
	color: #17273d;
	max-width: 15ch;
}

.moviedb-widget.moviedb-widget--variant-full .sw-title-en {
	margin-top: 14px;
	font-size: clamp(21px, 1.85vw, 31px);
	line-height: 1.34;
	font-weight: 500;
	color: #7f8da3;
	max-width: 18ch;
}

.moviedb-widget.moviedb-widget--variant-full .sw-meta-row {
	gap: 14px;
	margin-top: -2px;
}

.moviedb-widget.moviedb-widget--variant-full .sw-meta-item {
	font-size: clamp(18px, 1.45vw, 21px);
	color: #5f7086;
}

.moviedb-widget.moviedb-widget--variant-full .sw-dot {
	width: 5px;
	height: 5px;
}

.moviedb-widget.moviedb-widget--variant-full .sw-scores {
	gap: 20px;
	margin-top: 4px;
}

.moviedb-widget.moviedb-widget--variant-full .sw-scores > div {
	min-width: 0;
}

.moviedb-widget.moviedb-widget--variant-full .sw-score-box {
	min-width: clamp(168px, 14vw, 196px);
	padding: 16px 18px;
	border-radius: 18px;
	border-color: #ccd7e5;
	box-shadow: 0 2px 10px rgba(101, 122, 148, 0.06);
}

.moviedb-widget.moviedb-widget--variant-full .sw-score-num {
	font-size: clamp(27px, 2.05vw, 34px);
	letter-spacing: -0.03em;
	font-variant-numeric: tabular-nums;
}

.moviedb-widget.moviedb-widget--variant-full .sw-score-denom {
	font-size: clamp(17px, 1.2vw, 21px);
}

.moviedb-widget.moviedb-widget--variant-full .sw-score-label {
	margin-top: 10px;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.3;
	color: #5e6f84;
	text-align: center;
}

.moviedb-widget.moviedb-widget--variant-full .sw-votes {
	margin-top: 1px;
	font-size: 13px;
	text-align: center;
}

.moviedb-widget.moviedb-widget--variant-full .sw-star {
	font-size: 21px;
}

.moviedb-widget.moviedb-widget--variant-full .sw-platforms {
	gap: 14px;
	margin-top: 2px;
}

.moviedb-widget.moviedb-widget--variant-full .sw-platform {
	width: 56px;
	height: 56px;
	border-radius: 18px;
	border: 1px solid rgba(202, 214, 228, 0.9);
	box-shadow: 0 6px 16px rgba(88, 110, 138, 0.08);
	background: rgba(255, 255, 255, 0.88);
}

.moviedb-widget.moviedb-widget--variant-full .sw-platform img {
	width: 56px !important;
	height: 56px !important;
}

.moviedb-widget.moviedb-widget--variant-full .sw-platform span {
	font-size: 15px;
}

.moviedb-widget.moviedb-widget--variant-full .sw-synopsis {
	margin-top: 10px;
	max-width: 27ch;
	font-size: clamp(20px, 1.7vw, 26px);
	font-weight: 700;
	line-height: 1.6;
	color: #16263a;
	display: block;
	-webkit-line-clamp: unset;
	line-clamp: unset;
	-webkit-box-orient: initial;
}

.moviedb-widget.moviedb-widget--variant-full .sw-divider {
	border-top-color: #dbe6f1;
}

.moviedb-widget.moviedb-widget--variant-full .sw-cast-section {
	padding: 22px clamp(24px, 2.5vw, 32px) 28px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(245, 249, 255, 0.94) 100%);
}

.moviedb-widget.moviedb-widget--variant-full .sw-cast-label {
	margin-bottom: 18px;
	font-size: 19px;
	font-weight: 700;
	color: #7f8da2;
}

.moviedb-widget.moviedb-widget--variant-full .sw-cast-list {
	gap: 18px;
}

.moviedb-widget.moviedb-widget--variant-full .sw-actor {
	width: 104px;
	gap: 10px;
}

.moviedb-widget.moviedb-widget--variant-full .sw-actor-img {
	width: 72px !important;
	height: 72px !important;
}

.moviedb-widget.moviedb-widget--variant-full .sw-actor-name {
	font-size: 13px;
}

.moviedb-widget.moviedb-widget--variant-full .sw-actor-role {
	font-size: 11px;
}

/* ---- Responsive ---- */

@media (max-width: 1080px) {
	.moviedb-widget.moviedb-widget--variant-full .sw-main {
		grid-template-columns: minmax(240px, 32%) minmax(0, 1fr);
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-poster-wrap {
		width: auto;
		min-width: 0;
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-poster-wrap img {
		width: 100% !important;
		height: auto !important;
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-info {
		padding: 28px 28px 24px;
		gap: 18px;
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-title-th {
		font-size: 32px;
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-title-en {
		font-size: 20px;
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-meta-item {
		font-size: 16px;
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-score-box {
		min-width: 150px;
		padding: 14px 16px;
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-score-label {
		font-size: 15px;
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-synopsis {
		max-width: none;
		font-size: 18px;
	}
}

@media (max-width: 640px) {
	.moviedb-widget .sw-poster-wrap {
		width: 120px;
		min-width: 120px;
	}

	.moviedb-widget .sw-poster-wrap img {
		width: 120px !important;
		height: 180px !important;
	}

	.moviedb-widget .sw-info {
		padding: 14px 16px 16px;
	}

	.moviedb-widget .sw-title-th {
		font-size: 16px;
	}

	.moviedb-widget .sw-cast-section {
		padding: 14px 16px 16px;
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-poster-wrap {
		width: auto;
		min-width: 0;
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-poster-wrap img {
		width: 100% !important;
		height: auto !important;
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-info {
		padding: 18px;
		gap: 14px;
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-main {
		grid-template-columns: minmax(180px, 38%) minmax(0, 1fr);
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-badge {
		min-height: 34px;
		padding: 6px 14px;
		font-size: 13px;
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-title-th {
		font-size: 23px;
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-title-en {
		font-size: 16px;
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-score-box {
		min-width: 136px;
		padding: 12px 14px;
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-score-num {
		font-size: 23px;
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-platform {
		width: 44px;
		height: 44px;
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-platform img {
		width: 44px !important;
		height: 44px !important;
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-synopsis {
		max-width: none;
		font-size: 16px;
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-cast-section {
		padding: 18px;
	}
}

@media (max-width: 480px) {
	.moviedb-widget .sw-main {
		flex-direction: column;
	}

	.moviedb-widget .sw-poster-wrap,
	.moviedb-widget .sw-poster-wrap img {
		width: 100% !important;
		height: auto !important;
		min-width: 0;
	}

	.moviedb-widget .sw-poster-wrap img {
		aspect-ratio: 2 / 3;
	}

	.moviedb-widget .sw-score-box {
		min-width: 82px;
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-main {
		grid-template-columns: 1fr;
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-poster-wrap,
	.moviedb-widget.moviedb-widget--variant-full .sw-poster-wrap img {
		width: 100% !important;
		height: auto !important;
		min-width: 0;
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-poster-wrap img {
		aspect-ratio: 2 / 3;
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-title-th {
		font-size: 21px;
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-score-box {
		min-width: 126px;
	}

	.moviedb-widget.moviedb-widget--variant-full .sw-cast-list {
		gap: 14px;
	}
}
