/* Tales TV reference skin */
:root {
	--tales-red: #eb3039;
	--tales-red-dark: #d92135;
	--tales-text: #17181c;
	--tales-muted: #797a82;
	--tales-line: #eeeeef;
	--tales-gutter: 40px;
	--tales-hero-accent: var(--tales-red);
	scrollbar-gutter: stable;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
/* 宽屏前台统一滚动条，颜色跟随各主题的背景与文字变量 */
@media (min-width: 769px) {
	/* 内容不足一屏时将页脚推到底部，长页面仍按文档流滚动 */
	.tales-shell {
		display: flex;
		flex-direction: column;
	}
	.tales-shell > :is(.tales-header, .tales-content, .tales-footer) {
		width: 100%;
		flex-shrink: 0;
	}
	.tales-shell > .tales-content {
		flex-grow: 1;
	}
	html:has(.tales-shell) {
		--tales-scrollbar-thumb: color-mix(in srgb, var(--tv-ink) 30%, var(--tv-bg));
		--tales-scrollbar-thumb-hover: color-mix(in srgb, var(--tv-ink) 50%, var(--tv-bg));
		scrollbar-gutter: auto;
	}
	@supports selector(::-webkit-scrollbar) {
		:where(html:has(.tales-shell), .tales-shell, .tales-shell *)::-webkit-scrollbar {
			width: 8px;
			height: 8px;
		}
		:where(html:has(.tales-shell), .tales-shell, .tales-shell *)::-webkit-scrollbar-track,
		:where(html:has(.tales-shell), .tales-shell, .tales-shell *)::-webkit-scrollbar-corner {
			background: transparent;
		}
		:where(html:has(.tales-shell), .tales-shell, .tales-shell *)::-webkit-scrollbar-thumb {
			border: 2px solid transparent;
			border-radius: 999px;
			background: var(--tales-scrollbar-thumb);
			background-clip: padding-box;
		}
		:where(html:has(.tales-shell), .tales-shell, .tales-shell *)::-webkit-scrollbar-thumb:hover {
			background-color: var(--tales-scrollbar-thumb-hover);
		}
		:where(html:has(.tales-shell), .tales-shell, .tales-shell *)::-webkit-scrollbar-button {
			display: none;
		}
	}
	@supports not selector(::-webkit-scrollbar) {
		:where(html:has(.tales-shell), .tales-shell, .tales-shell *) {
			scrollbar-width: thin;
			scrollbar-color: var(--tales-scrollbar-thumb) transparent;
		}
	}
}
body { background: #fff; color: var(--tales-text); }
.tales-shell { min-height: 100vh; background: #fff; }
.tales-header { position: sticky; top: 0; z-index: 30; height: 80px; max-width: 1840px; margin: 0 auto; padding: 0 var(--tales-gutter); display: flex; align-items: center; justify-content: space-between; background: #fff; }
.tales-logo { display: inline-flex; align-items: center; gap: 12px; color: #17181c; font-size: 25px; font-weight: 750; letter-spacing: -.04em; }
.tales-logo-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 7px; color: #fff; background: var(--tales-red); font-family: Georgia, serif; font-size: 28px; font-weight: 700; }
.tales-header-actions { display: flex; align-items: center; gap: 27px; color: #1d1e22; font-size: 14px; }
.tales-header-actions a { display: inline-flex; align-items: center; gap: 8px; }
.tales-header-actions a:hover { color: var(--tales-red); }
.tales-header-search { justify-content: center; width: 64px; height: 44px; border-radius: 9px; color: #555961; background: #f7f7f8; font-size: 18px; }
.tales-profile-button { justify-content: center; width: 48px; height: 48px; border-radius: 50%; color: #fff !important; background: var(--tales-red); font-size: 20px; }
.tales-account-menu { position: relative; }
.tales-account-menu > button.tales-profile-button { display: inline-flex; align-items: center; padding: 0; border: 0; }
.tales-account-panel { position: absolute; z-index: 40; top: calc(100% + 16px); right: 0; display: none; width: 390px; padding: 22px; border: 1px solid #f1f1f2; border-radius: 12px; background: #fff; color: var(--tales-text); box-shadow: 0 10px 35px #0002; font-size: 14px; }
.tales-account-panel::before { content: ""; position: absolute; right: 0; bottom: 100%; left: 0; height: 17px; }
.tales-account-menu:not(.tales-account-login-open):hover > .tales-account-panel,
.tales-account-menu:not(.tales-account-login-open):focus-within > .tales-account-panel { display: block; }
.tales-account-identity { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.tales-account-avatar { display: grid; place-items: center; flex-shrink: 0; width: 60px; height: 60px; border-radius: 50%; background: var(--tales-red); color: #fff; font-size: 27px; }
.tales-account-vip { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; background: linear-gradient(110deg, #ece3e8, #ededee); }
.tales-account-vip > i { color: #6b636b; font-size: 24px; }
.tales-account-vip > div { flex: 1; min-width: 0; }
.tales-account-vip strong { display: block; font-size: 14px; }
.tales-account-vip span { display: block; margin-top: 3px; color: #969298; font-size: 11px; }
.tales-account-vip button, .tales-account-login { border: 0; border-radius: 7px; background: #f25443; color: #fff; font-size: 13px; }
.tales-account-vip button { flex-shrink: 0; padding: 10px 16px; font-weight: 650; }
.tales-account-login { width: 100%; margin-top: 38px; padding: 12px 16px; }
.tales-account-vip button:hover, .tales-account-login:hover { background: #e34839; }
.tales-mobile-menu, .tales-mobile-nav { display: none; }
.tales-content { max-width: 1840px; margin: 0 auto; padding: 0 var(--tales-gutter) 64px; }
.tales-hero { position: relative; min-height: 670px; margin: 0 0 28px; border-radius: 16px; overflow: hidden; background-image: linear-gradient(90deg, rgba(0,0,0,.82) 0%, rgba(0,0,0,.34) 47%, rgba(0,0,0,.12) 100%), linear-gradient(0deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.12) 57%), var(--hero-image); background-position: center; background-size: cover; }
.tales-hero-copy { position: absolute; z-index: 2; left: 40px; right: 40px; bottom: 66px; max-width: 680px; color: #fff; }
.tales-hero-copy h1 { margin: 0 0 18px; font-size: clamp(28px, 3vw, 44px); line-height: 1.08; font-weight: 750; letter-spacing: -.035em; }
.tales-hero-copy p { max-width: 700px; margin: 15px 0 25px; color: #e8e8e8; font-size: 14px; line-height: 1.65; }
.tales-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tales-tags span { display: inline-flex; padding: 7px 12px; border-radius: 7px; color: #fff; background: rgba(255,255,255,.18); font-size: 12px; }
.tales-play-button { display: inline-flex; align-items: center; justify-content: center; gap: 11px; width: 280px; height: 58px; border-radius: 999px; color: #fff; background: var(--tales-red); font-size: 15px; font-weight: 700; }
.tales-play-button:hover { color: #fff; background: var(--tales-red-dark); }
.tales-hero-arrow { position: absolute; z-index: 3; top: 50%; display: grid; place-items: center; width: 44px; height: 44px; transform: translateY(-50%); border: 0; border-radius: 50%; color: #fff; background: rgba(0,0,0,.35); font-size: 18px; }
.tales-hero-prev { left: 24px; }.tales-hero-next { right: 24px; }
.tales-hero-dots { position: absolute; z-index: 3; bottom: 26px; left: 50%; display: flex; gap: 8px; transform: translateX(-50%); }
.tales-hero-dots span { width: 22px; height: 5px; border-radius: 999px; background: rgba(255,255,255,.45); }.tales-hero-dots .active { background: var(--tales-hero-accent); }
.tales-topic-strip { display: flex; gap: 10px; max-width: 1840px; margin: 0 auto 30px; padding: 0; overflow-x: auto; scrollbar-width: none; }.tales-topic-strip::-webkit-scrollbar { display: none; }
.tales-topic-strip a { flex: 0 0 auto; padding: 11px 16px; border-radius: 8px; color: #25262a; background: #f4f4f5; font-size: 13px; white-space: nowrap; }.tales-topic-strip a.active, .tales-topic-strip a:hover { color: #fff; background: var(--tales-red); }
.tales-library { padding: 0; }.tales-section-title { display: flex; align-items: center; justify-content: space-between; margin: 0 0 17px; }.tales-section-title h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }.tales-section-title a { color: var(--tales-red); font-size: 13px; font-weight: 700; }
.tales-poster-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }.tales-poster-card { min-width: 0; }.tales-poster-frame { position: relative; aspect-ratio: 3 / 4.65; overflow: hidden; border-radius: 9px; background: #eee; }.tales-poster-frame img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .25s ease; }.tales-poster-card:hover .tales-poster-frame img { transform: scale(1.04); }.tales-poster-shade { position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.86)); }.tales-poster-play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 48px; height: 48px; transform: translate(-50%,-50%); border: 1px solid rgba(255,255,255,.7); border-radius: 50%; color: #fff; background: rgba(0,0,0,.3); opacity: 0; transition: opacity .2s ease; }.tales-poster-card:hover .tales-poster-play { opacity: 1; }.tales-poster-card h3 { margin: 10px 0 4px; overflow: hidden; color: var(--tales-text); font-size: 15px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }.tales-poster-card p { margin: 0; overflow: hidden; color: var(--tales-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.tales-footer { max-width: 1840px; margin: 0 auto; padding: 18px var(--tales-gutter) 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; color: #f4f4f5; background: #242424; font-size: 13px; }.tales-footer-left h4, .tales-footer-community h4 { margin: 0 0 16px; color: #fff; font-size: 16px; font-weight: 700; }.tales-footer-links { display: flex; flex-wrap: wrap; gap: 12px 38px; }.tales-footer-links a { color: #d6d6d8; }.tales-footer-links a:hover { color: #fff; }.tales-footer-right { color: #e2e2e3; font-size: 12px; white-space: nowrap; }.tales-footer-community nav { display: flex; align-items: center; gap: 18px; }.tales-footer-community :is(a, span) { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: #aaa; background: #4a4a4a; font-size: 20px; transition: color .15s, background .15s, transform .15s; }.tales-footer-community a:hover { color: #fff; background: var(--tales-red); transform: translateY(-2px); }.tales-footer-community span { opacity: .55; }
@media (max-width: 1100px) { .tales-poster-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .tales-header-actions { gap: 16px; } }
@media (max-width: 768px) { :root { --tales-gutter: 16px; } .tales-header { height: 64px; }.tales-logo { gap: 7px; font-size: 18px; }.tales-logo-mark { width: 30px; height: 30px; font-size: 22px; }.tales-header-actions { gap: 10px; font-size: 0; }.tales-header-actions i { font-size: 16px; }.tales-header-search { width: 38px; height: 36px; }.tales-profile-button { width: 34px; height: 34px; font-size: 15px; }.tales-mobile-menu { display: grid; place-items: center; width: 35px; height: 35px; margin-left: 8px; border: 0; border-radius: 7px; color: #333; background: #f4f4f5; }.tales-header-actions a:nth-child(2), .tales-header-actions a:nth-child(3), .tales-header-actions a:nth-child(4) { display: none; }.tales-mobile-nav { position: absolute; z-index: 25; top: 64px; right: 16px; display: flex; flex-direction: column; gap: 4px; width: 180px; padding: 10px; border-radius: 10px; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.16); }.tales-mobile-nav a { padding: 10px 12px; color: #333; font-size: 14px; }.tales-content { padding-bottom: 35px; }.tales-hero { min-height: 560px; margin: 0 -16px 20px; border-radius: 0; }.tales-hero-copy { left: 22px; right: 22px; bottom: 52px; }.tales-hero-copy h1 { font-size: 28px; }.tales-hero-copy p { font-size: 12px; }.tales-play-button { width: 100%; height: 50px; }.tales-hero-arrow { width: 34px; height: 34px; }.tales-hero-prev { left: 12px; }.tales-hero-next { right: 12px; }.tales-poster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }.tales-section-title h2 { font-size: 20px; }.tales-footer { padding: 28px var(--tales-gutter); gap: 13px 18px; font-size: 11px; } }
/* Database catalogue and functional page layouts */
.tales-hero {
	min-height: 0;
	aspect-ratio: 16 / 9;
	background: #151515;
}
.tales-hero-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.tales-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(0deg, rgba(0,0,0,.87), transparent 75%), linear-gradient(90deg, rgba(0,0,0,.3), transparent);
	pointer-events: none;
}
.tales-hero-copy { max-width: 66%; bottom: 60px; }
.tales-hero-copy p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tales-hero-play { position: absolute; z-index: 3; right: 40px; bottom: 70px; width: 190px; }
.tales-hero-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.5); }
.tales-hero-dots button.active { background: var(--tales-hero-accent); }
/* 图片上的文字独立于正文配色，交互状态沿用主题强调色 */
:root .tales-shell .tales-content .tales-hero-copy h1 { color: #fff; }
:root .tales-shell .tales-content .tales-hero-copy p { color: #e9e9ee; }
.tales-hero-arrow:hover { background: #0009; box-shadow: inset 0 0 0 1px var(--tales-hero-accent); }
:root .tales-shell .tales-content .tales-hero :is(button, a):focus-visible { outline: 2px solid var(--tales-hero-accent); outline-offset: 4px; }
/* 版本二：页头叠加在横幅上，文字与播放入口置于左下方 */
@media (min-width: 769px) {
	/* 内容不足一屏时将页脚推到底部，长页面仍按文档流滚动 */
	.tales-shell {
		display: flex;
		flex-direction: column;
	}
	.tales-shell > :is(.tales-header, .tales-content, .tales-footer) {
		width: 100%;
		flex-shrink: 0;
	}
	.tales-shell > .tales-content {
		flex-grow: 1;
	}
	.tales-hero-v2 {
		height: clamp(460px, 39.13vw, 720px);
		aspect-ratio: auto;
		margin: -80px calc(-1 * var(--tales-gutter)) 28px;
		border-radius: 0;
		background: #000;
		isolation: isolate;
	}
	.tales-hero-v2 .tales-hero-image {
		object-position: center;
		animation: tales-hero-reveal .6s ease-out;
	}
	.tales-hero-v2::after {
		background: linear-gradient(90deg, #000 0%, #0006 18%, transparent 46%, transparent 72%, #000c 100%),
			linear-gradient(0deg, #000 0%, #0009 18%, transparent 60%),
			linear-gradient(180deg, #0009, transparent 28%), #0002;
	}
	.tales-hero-v2 .tales-hero-copy {
		left: var(--tales-gutter);
		right: var(--tales-gutter);
		bottom: 154px;
		max-width: min(65%, 760px);
		text-shadow: 0 2px 16px #0006;
	}
	:root .tales-shell .tales-hero-v2 .tales-hero-copy h1 {
		max-width: 520px;
		margin-bottom: 14px;
		color: #fff;
		font-size: clamp(28px, 2vw, 34px);
		font-weight: 700;
		line-height: 1.25;
		letter-spacing: 0;
	}
	.tales-hero-v2 .tales-tags span { padding: 6px 12px; border-radius: 4px; background: #ffffff24; font-size: 13px; }
	:root .tales-shell .tales-hero-v2 .tales-hero-copy p {
		display: block;
		margin: 18px 0 0;
		overflow: hidden;
		color: #ccc;
		font-size: 14px;
		line-height: 1.6;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
	.tales-hero-v2 .tales-hero-play {
		left: var(--tales-gutter);
		right: auto;
		bottom: 64px;
		gap: 16px;
		width: 200px;
		height: 64px;
		border-radius: 8px;
		font-size: 18px;
		font-weight: 500;
	}
	.tales-hero-v2 .tales-hero-play i { font-size: 26px; }
	.tales-hero-v2 .tales-hero-dots {
		left: auto;
		right: var(--tales-gutter);
		bottom: 26px;
		align-items: center;
		gap: 10px;
		max-width: calc(100% - 2 * var(--tales-gutter));
		transform: none;
	}
	.tales-hero-v2 .tales-hero-dots button {
		display: grid;
		place-items: center;
		flex: 0 1 22px;
		width: 22px;
		height: 28px;
		border-radius: 4px;
		background: transparent;
		transition: width .25s ease, flex-basis .25s ease;
	}
	.tales-hero-v2 .tales-hero-dots button::before { content: ""; width: 100%; height: 7px; border-radius: 999px; background: #ffffff6b; }
	.tales-hero-v2 .tales-hero-dots button.active { flex-basis: 60px; width: 60px; background: transparent; }
	.tales-hero-v2 .tales-hero-dots button.active::before { background: var(--tales-hero-accent); }
	.tales-hero-v2 .tales-hero-dots button:hover::before { background: #fff; }
	.tales-hero-v2 :is(button, a):focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
	:root .tales-shell:has(.tales-hero-v2) > .tales-header {
		background: linear-gradient(#000b, #0005);
		color: #fff;
		backdrop-filter: blur(5px);
	}
	:root .tales-shell:has(.tales-hero-v2) > .tales-header :is(.tales-logo, .tales-header-actions) { color: #fff; }
	:root .tales-shell:has(.tales-hero-v2) > .tales-header .tales-header-search { background: #ffffff1f; }
	:root .tales-shell:has(.tales-hero-v2) > .tales-header .tales-header-search :is(input, button) { color: #fff; }
	:root .tales-shell:has(.tales-hero-v2) > .tales-header .tales-header-search input::placeholder { color: #ddd; }
}
@keyframes tales-hero-reveal { from { opacity: .4; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
	.tales-hero-v2 .tales-hero-image { animation: none; }
	.tales-hero-v2 .tales-hero-dots button { transition: none; }
}
.tales-more { display: flex; width: 180px; margin: 32px auto; }
.tales-status { text-align: center; padding: 65px 20px; color: var(--tales-muted); }
.tales-status a, .tales-signin-notice a, .tales-watch-info details a { color: var(--tales-red); }
.tales-signin-notice { padding: 16px; margin-bottom: 24px; background: #fff1f1; border-radius: 9px; }
.tales-search-form, .tales-header-search { display: flex; gap: 10px; padding: 9px 14px; border-radius: 9px; background: #f7f7f8; }
.tales-header-search { width: 220px; }
.tales-header-search.tales-header-search-collapsible { width: 64px; transition: width .2s ease; }
.tales-header-search.tales-header-search-collapsible.is-expanded { width: 220px; }
.tales-search-form { max-width: 580px; margin-bottom: 24px; }
.tales-search-form input, .tales-header-search input { width: 100%; min-width: 0; border: 0; background: transparent; font-size: 14px; color: #25262a; }
.tales-search-form button, .tales-header-search button { padding: 0; border: 0; background: transparent; color: #555961; }
.tales-results-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 16px 0 24px; }
.tales-results-toolbar select { padding: 7px 10px; border: 1px solid #ddd; border-radius: 7px; background: #fff; }
.tales-pagination { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 32px 0; }
.tales-language, .tales-download summary { display: inline-flex; gap: 8px; align-items: center; }
.tales-download { position: relative; }
.tales-download summary { cursor: pointer; list-style: none; }
.tales-download summary::-webkit-details-marker { display: none; }
.tales-download-panel { position: absolute; z-index: 40; right: 0; top: 40px; width: 260px; padding: 22px; background: #fff; border-radius: 10px; box-shadow: 0 8px 35px #0002; font-size: 14px; }
.tales-download-trigger { display: inline-flex; gap: 8px; align-items: center; cursor: default; white-space: nowrap; }
.tales-download > .tales-download-panel {
	display: none;
	top: calc(100% + 16px);
	width: 268px;
	padding: 36px 32px 30px;
	border-radius: 12px;
}
.tales-download > .tales-download-panel::before {
	content: "";
	position: absolute;
	right: 0;
	bottom: 100%;
	left: 0;
	height: 16px;
}
.tales-download:hover > .tales-download-panel, .tales-download:focus-within > .tales-download-panel { display: grid; gap: 22px; }
.tales-header-actions .tales-download-link {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 48px;
	padding: 4px 0;
	border-radius: 6px;
	color: #17181c;
	background: transparent;
	font-size: 18px;
	font-weight: 400;
	line-height: 1.4;
	text-decoration: none;
	white-space: nowrap;
}
.tales-header-actions .tales-download-link:hover { color: #17181c; background: #f7f7f8; }
.tales-google-play-icon, .tales-download-link > i { flex: 0 0 34px; width: 34px; height: 36px; }
.tales-download-link > i { display: grid; place-items: center; font-size: 30px; }
.tales-download-panel p { margin: 0; }
.tales-detail-tags a { padding: 6px 12px; border-radius: 7px; background: #fff; color: #555; font-size: 13px; }
.tv-detail-art img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.tv-detail-art { flex-shrink: 0; transform: none; background: #eee; }
.tv-detail-copy { min-width: 0; }
.tv-detail-copy h1 { overflow-wrap: anywhere; }
.tales-episodes-section { padding: 32px 0; }
.tv-episode-grid { padding: 16px 0 24px; }
.tales-watch-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 32px; margin: 20px 0 40px; }
.tales-watch-layout .tv-player { display: flex; justify-content: center; width: 100%; aspect-ratio: 9 / 12; max-height: 760px; overflow: hidden; border-radius: 12px; background: #101012; }
.tv-player video { display: block; width: 100%; height: 100%; object-fit: contain; }
.tales-player-message { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 30px; color: #fff; text-align: center; }
.tales-player-message i { font-size: 52px; color: #aaa; }
.tales-watch-info h1 { font-size: 30px; margin: 10px 0 16px; }
.tales-watch-info h2 { font-size: 20px; margin-top: 26px; }
.tales-watch-info details { border-top: 1px solid #eee; padding: 20px 0; margin-top: 24px; }
.tales-watch-info summary { cursor: pointer; font-weight: 600; }
.tales-watch-info details p { margin: 16px 0; color: #666; line-height: 1.7; }
.tales-episode-numbers { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.tales-episode-numbers a { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 48px; height: 44px; padding: 8px; border-radius: 8px; background: #f4f4f5; }
.tales-episode-numbers a.active { background: var(--tales-red); color: #fff; }
.tales-episode-numbers i { font-size: 10px; }
.tales-history-image { width: 68px; height: 92px; object-fit: cover; border-radius: 8px; }
.tv-progress-card progress { width: 100%; height: 5px; accent-color: var(--tales-red); }
.tales-table-wrap { overflow-x: auto; }
.tales-orders { width: 100%; border-collapse: collapse; font-size: 14px; }
.tales-orders th, .tales-orders td { padding: 16px; text-align: left; border-bottom: 1px solid #eee; }
.tales-policy-text { width: 80%; max-width: 1350px; margin: 0 auto 30px; padding: 30px; border: 0; border-radius: 8px; background: #f5f5f5; box-shadow: none; white-space: normal; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; overflow-wrap: anywhere; }
.tales-legal-heading { text-align: center; }
.tales-legal-heading h1 { font-size: 30px; font-weight: 700; line-height: 1.2; letter-spacing: normal; }
.tales-legal-back { display: none; }
.tales-policy-content { margin: 0 auto; }
.tales-policy-text h2 { margin: 40px 0 20px; color: #222; text-align: left; font-size: 20px; font-weight: 700; line-height: 1.2; letter-spacing: normal; }
.tales-policy-text h3 { margin: 30px 0 15px; color: #222; font-size: 18px; font-weight: 700; line-height: 1.2; letter-spacing: normal; }
.tales-policy-content > h2:first-child { margin-top: 0; }
.tales-policy-text p { margin: 0 0 20px; color: #8f8f8f; font-size: 20px; font-weight: 400; line-height: 1.8; }
.tales-policy-text ul { margin: 0 0 20px; padding-left: 60px; color: #222; font-size: 14px; line-height: 1.6; }
.tales-policy-text li { margin: 0 0 10px; }
.tales-policy-content > :last-child { margin-bottom: 0; }
.tales-download-qr { display: block; width: 180px; height: 180px; margin: 0 auto; object-fit: contain; }
.tv-button-primary { box-shadow: none; }
.tv-kicker { color: var(--tales-red); }
.tv-profile-avatar { background: var(--tales-red); }
.tv-episode > span { color: var(--tales-red); }
.tales-artwork-missing { display: grid; place-items: center; height: 100%; padding: 24px; text-align: center; color: #777; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--tales-red); outline-offset: 4px; }
@media (max-width: 1100px) {
	.tales-header-search { width: 160px; }
	.tales-hero-play { width: 150px; }
	.tales-hero-copy { max-width: 60%; }
}
@media (max-width: 768px) {
	.tales-footer-community { display: none; }
	.tales-header-search { width: 120px; }
	.tales-header-search.tales-header-search-collapsible { width: 38px; }
	.tales-header-search.tales-header-search-collapsible.is-expanded { width: min(220px, calc(100vw - 100px)); }
	.tales-download, .tales-language { display: none; }
	.tales-header-actions a[href="/app/history"] { display: none; }
	.tales-hero { aspect-ratio: 3 / 4; min-height: 460px; }
	.tales-hero-copy { max-width: none; bottom: 125px; }
	.tales-hero-copy h1 { font-size: 27px; }
	.tales-hero-play { left: 22px; right: 22px; bottom: 48px; width: auto; }
	.tales-watch-layout { grid-template-columns: 1fr; gap: 20px; }
	.tales-watch-layout .tv-player { aspect-ratio: 9 / 14; max-height: 70vh; }
	.tv-series-detail { padding: 24px 16px; border-radius: 12px; }
	.tv-detail-copy h1 { font-size: 30px; }
}
/* Shared page accents follow the reference site's red palette */
:root { --tv-purple: var(--tales-red); --tv-pink: var(--tales-red); --tv-bg: #fff; --tv-ink: var(--tales-text); --tv-border: var(--tales-line); }
.tv-main-content { margin-left: 0; }
.tv-page-heading, .tv-series-detail, .tv-player-page { padding-left: 0; padding-right: 0; }
.tv-filter-row { padding-left: 0; padding-right: 0; }
.tv-filter.active { color: #fff; border-color: var(--tales-red); background: var(--tales-red); }
.tv-poster-grid-wide { padding-left: 0; padding-right: 0; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tv-series-detail { background: #f7f7f8; }
.tv-button-primary { background: var(--tales-red); }
.tv-button-primary:hover { background: var(--tales-red-dark); }
@media (max-width: 1100px) { .tv-poster-grid-wide { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 620px) { .tv-poster-grid-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: 0; padding-right: 0; } }

@media (max-width: 768px) {
	.tales-footer { align-items: flex-start; flex-direction: column; gap: 22px; }
	.tales-footer-right { white-space: normal; }
	.tales-policy-text { margin: 0 0 32px; padding: 28px 22px; }
	.tales-policy-text h2 { font-size: 20px; }
}


.tales-watched { position: relative; }
.tales-watched summary { cursor: pointer; list-style: none; white-space: nowrap; }
.tales-watched .tales-download-panel { width: 300px; }
.tales-history-preview { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.tales-history-preview img { width: 42px; height: 58px; border-radius: 5px; object-fit: cover; }
.tales-profile-button img, .tv-profile-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.tv-profile-edit { max-width: 520px; display: grid; gap: 12px; margin: 24px 0; }
.tv-avatar-upload { display: block; margin-top: 16px; font-size: 14px; }
.tv-avatar-upload input { display: block; max-width: 250px; margin-top: 8px; }
.tv-checkout { max-width: 600px; margin: 24px 0; overflow-wrap: anywhere; }
.tv-checkout form { display: grid; gap: 14px; margin-top: 20px; }
.tv-plan-card .tv-button { margin-top: 16px; }
.tales-episode-groups { display: flex; flex-wrap: wrap; gap: 8px; }
.tales-episode-groups [aria-selected="true"] { color: var(--tales-red); border-color: var(--tales-red); }
@media (max-width: 768px) { .tales-watched { display: none; } .tv-profile-card { flex-wrap: wrap; } }

/* Account center */
.tv-profile-heading { max-width: 1180px; margin: 0 auto; padding: 48px 0 22px; }
.tv-profile-heading h1 { margin: 8px 0 5px; font-size: 42px; }
.tv-profile-heading p { margin: 0; color: var(--tales-muted); font-size: 13px; }
.tales-profile-page { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .8fr); gap: 24px; max-width: 1180px; margin: 0 auto; padding: 0 0 70px; align-items: start; }
.tales-profile-main { min-width: 0; }
.tales-profile-card, .tales-profile-edit-card { border: 1px solid var(--tales-line); border-radius: 15px; background: #fff; box-shadow: 0 12px 30px rgba(30,31,38,.05); }
.tales-profile-card { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 26px 28px; }
.tales-profile-identity { display: flex; align-items: center; gap: 18px; min-width: 0; }
.tales-profile-card .tv-profile-avatar { width: 74px; height: 74px; border-radius: 50%; color: #fff; background: var(--tales-red); font-size: 24px; box-shadow: 0 8px 18px rgba(235,48,57,.18); }
.tales-profile-card .tv-profile-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.tales-profile-card h2 { margin: 0 0 5px; font-size: 20px; letter-spacing: -.02em; }
.tales-profile-card p { margin: 0; color: var(--tales-muted); font-size: 12px; }
.tales-profile-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.tales-profile-badges span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 6px; color: #555961; background: #f7f7f8; font-size: 11px; }
.tales-profile-badges i { color: var(--tales-red); }
.tales-avatar-upload { position: relative; display: inline-flex; align-items: center; padding: 9px 12px; border: 1px solid var(--tales-line); border-radius: 7px; color: #555961; background: #fff; font-size: 11px; cursor: pointer; white-space: nowrap; }
.tales-avatar-upload:hover { color: var(--tales-red); border-color: var(--tales-red); }
.tales-avatar-upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.tales-profile-edit-card { margin-top: 20px; padding: 25px 28px; }
.tales-profile-section-title { display: flex; align-items: start; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.tales-profile-section-title h2 { margin: 7px 0 0; font-size: 18px; }
.tales-profile-message { color: #23865a; font-size: 12px; }
.tales-profile-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 15px; max-width: none; margin: 0; }
.tales-profile-edit label { color: #555961; font-size: 11px; font-weight: 650; }
.tales-profile-edit .tv-input { margin-bottom: 7px; }
.tales-profile-edit button { grid-column: 1 / -1; justify-self: start; margin-top: 8px; }
.tales-logout { margin-top: 16px; }
.tales-profile-links { margin: 0; border: 1px solid var(--tales-line); border-radius: 15px; background: #fff; overflow: hidden; box-shadow: 0 12px 30px rgba(30,31,38,.04); }
.tales-profile-links a { display: flex; align-items: center; gap: 15px; padding: 17px 19px; border-bottom: 1px solid var(--tales-line); color: #25262a; }
.tales-profile-links a:last-child { border-bottom: 0; }
.tales-profile-links a:hover { background: #fff7f7; color: var(--tales-red); }
.tales-profile-links a > span { display: grid; grid-template-columns: 25px 1fr; flex: 1; align-items: center; column-gap: 9px; }
.tales-profile-links a > span > i { grid-row: 1 / span 2; width: 25px; color: var(--tales-red); text-align: center; }
.tales-profile-links b { font-size: 12px; font-weight: 650; }
.tales-profile-links small { grid-column: 2; margin-top: 3px; color: var(--tales-muted); font-size: 10px; }
.tales-profile-links > a > i { color: #b4b6bb; font-size: 10px; }
.tales-profile-page { display: grid; grid-template-columns: 445px minmax(0, 1fr); gap: 24px; max-width: none; margin: 0; padding: 0 0 70px; align-items: start; }
.tv-profile-heading { max-width: none; margin: 0; padding: 48px 0 20px; }
.tv-profile-heading h1 { font-size: 26px; letter-spacing: -.03em; }
.tales-profile-card { width: 445px; display: flex; align-items: stretch; flex-direction: column; gap: 14px; padding: 25px; border: 0; border-radius: 8px; background: linear-gradient(180deg, #fdeaf8 0%, #fff5f5 100%); box-shadow: none; }
.tales-profile-identity { justify-content: space-between; gap: 12px; }
.tales-profile-card .tv-profile-avatar { width: 52px; height: 52px; }
.tales-profile-card h2 { flex: 1; align-self: center; margin: 0; font-size: 16px; }
.tales-avatar-upload { order: 0; align-self: flex-end; margin-top: -53px; padding: 10px 18px; border-color: #8c8290; color: #29252a; font-size: 12px; }
.tales-profile-balance { display: flex; align-items: center; gap: 8px; color: #333; font-size: 13px; }
.tales-profile-balance .tv-button { padding: 5px 11px; border-radius: 999px; font-size: 11px; }
.tales-profile-card > .tv-button-ghost { align-self: flex-start; padding: 8px 15px; border-color: #8c8290; border-radius: 9px; font-size: 12px; }
.tales-profile-vip { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 12px; color: #211c23; background: linear-gradient(90deg, #f5b1dc, #f8a9d0); }
.tales-profile-vip-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tales-profile-vip-info strong { font-size: 14px; line-height: 1.4; }
.tales-profile-vip-expiry { font-size: 12px; line-height: 1.5; }
.tales-profile-vip-expiry time { white-space: nowrap; }
.tales-profile-vip .tv-button { flex-shrink: 0; padding: 9px 13px; border-color: #fbe5f2; font-size: 11px; }
.tales-profile-field { display: flex; align-items: center; gap: 12px; min-height: 57px; padding: 0 15px; border-radius: 12px; background: #fff; color: #333; font-size: 13px; }
.tales-profile-field label, .tales-profile-field > span:first-child { flex: 1; }
.tales-profile-field input { flex: 1; min-width: 0; border: 0; outline: 0; color: #333; text-align: right; font-size: 13px; }
.tales-profile-field button { width: 31px; height: 31px; border: 0; border-radius: 50%; color: #777; background: #eee; }
.tales-profile-message { margin: -4px 0 0; font-size: 12px; }
.tales-profile-logout { width: 100%; padding: 16px; border: 0; border-radius: 10px; color: #fff; background: #d4d3d4; font-size: 14px; }
.tales-profile-page > .tales-profile-links { max-width: 445px; margin: 18px 0 0; box-shadow: none; }
.tales-profile-purchase-panel { grid-column: 2; grid-row: 1 / span 2; min-width: 0; padding: 26px; border: 1px solid var(--tales-line); border-radius: 14px; background: #fff; box-shadow: 0 12px 30px rgba(30,31,38,.04); }
.tales-purchase-tabs { display: flex; gap: 8px; margin-bottom: 28px; border-bottom: 1px solid var(--tales-line); }
.tales-purchase-tabs button { padding: 11px 16px; border: 0; border-bottom: 3px solid transparent; color: var(--tales-muted); background: transparent; font-size: 14px; font-weight: 700; cursor: pointer; }
.tales-purchase-tabs button.active { border-bottom-color: var(--tales-red); color: var(--tales-red); }
.tales-purchase-heading h2 { margin: 8px 0 5px; font-size: 25px; }
.tales-purchase-heading p { margin: 0 0 22px; color: var(--tales-muted); font-size: 13px; }
.tales-purchase-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.tales-purchase-card, .tales-purchase-custom { display: flex; flex-direction: column; gap: 9px; padding: 18px; border: 1px solid var(--tales-line); border-radius: 12px; background: #fff; }
.tales-purchase-card h3, .tales-purchase-custom h3 { margin: 0; font-size: 16px; }
.tales-purchase-card strong, .tales-purchase-custom strong { color: var(--tales-text); font-size: 20px; }
.tales-purchase-card span { color: var(--tales-muted); font-size: 12px; }
.tales-purchase-card .tv-button, .tales-purchase-custom .tv-button { margin-top: 8px; }
.tales-purchase-custom { max-width: 420px; margin-top: 14px; }
.tales-purchase-custom label { color: var(--tales-muted); font-size: 12px; }
.tales-purchase-custom .tv-input { margin: 0; }
.tales-profile-panel-heading { margin-bottom: 24px; }
.tales-profile-panel-heading h2 { margin: 8px 0 5px; font-size: 25px; }
.tales-profile-panel-heading p { margin: 0; color: var(--tales-muted); font-size: 13px; }
.tales-profile-subheading { margin: 24px 0 12px; font-size: 15px; }
.tales-profile-record { margin: 9px 0; padding: 14px 16px; border: 1px solid var(--tales-line); border-radius: 10px; background: #fff; }
.tales-profile-record a { color: var(--tales-red); font-weight: 650; }
.tales-profile-record p { margin: 6px 0 0; color: var(--tales-muted); font-size: 12px; }
.tales-purchase-terms { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 24px auto 0; color: #737780; font-size: 14px; }
.tales-purchase-terms input { width: 20px; height: 20px; accent-color: var(--tales-red); }
.tales-purchase-terms a { color: #59616e; font-weight: 700; }
.tales-purchase-card button:disabled, .tales-purchase-custom button:disabled { cursor: not-allowed; opacity: .48; }
.tales-recharge-panel { border-color: transparent; background: linear-gradient(180deg, #fff0f0 0, #fff 430px); box-shadow: none; }
.tales-recharge-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 8px 0 28px; }
.tales-recharge-heading h2 { margin: 0; color: #111; font-size: 26px; font-weight: 700; line-height: 1.3; }
.tales-recharge-heading button { flex-shrink: 0; padding: 11px 20px; border: 0; border-radius: 999px; color: #292929; background: #f0eeee; font-size: 14px; cursor: pointer; }
.tales-diamond-bag { padding: 24px 32px 22px; border: 1px solid #f3e9ef; border-radius: 10px; background: linear-gradient(180deg, #fbeaf6, #fff4f4); }
.tales-diamond-bag h3, .tales-diamond-custom > label { display: block; margin: 0 0 16px; color: #222; font-size: 20px; font-weight: 400; line-height: 1.4; }
.tales-diamond-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 22px; max-width: 1000px; }
.tales-diamond-card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; min-height: 148px; padding: 14px 0 0; overflow: hidden; border: 0; border-radius: 13px; color: #111; background: #fff; font-family: inherit; cursor: pointer; transition: box-shadow .15s, transform .15s; }
.tales-diamond-card:hover { box-shadow: 0 3px 12px #ed2b7926; transform: translateY(-2px); }
.tales-diamond-card.selected { box-shadow: 0 0 0 2px #ed2945, 0 4px 12px #ed2b791a; }
.tales-diamond-card:focus-visible { outline: 3px solid #ed2945; outline-offset: 4px; }
.tales-diamond-bonus { position: absolute; top: 0; left: 0; padding: 5px 16px; border-radius: 0 0 13px 0; color: #fff; background: linear-gradient(115deg, #f96749, #ed263f); font-size: 15px; font-weight: 700; line-height: 1.25; }
.tales-diamond-icon { flex-shrink: 0; width: 49px; height: 40px; margin: 2px 0 12px; filter: drop-shadow(0 2px 1px #be337b40); }
.tales-diamond-amount { margin-bottom: 12px; font-size: 20px; font-weight: 700; line-height: 1.3; }
.tales-diamond-price { align-self: stretch; margin-top: auto; padding: 10px 6px; color: #111; background: #ffd8da; text-align: center; font-size: 23px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.tales-diamond-price small { font-size: .65em; }
.tales-diamond-custom { width: min(100%, 482px); margin-top: 28px; }
.tales-diamond-custom > label { margin-bottom: 24px; }
.tales-diamond-input { position: relative; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 0 18px; border-radius: 13px; background: #d6d6d6; }
.tales-diamond-input:focus-within { outline: 2px solid #ed2945; outline-offset: 2px; }
.tales-diamond-input input { flex: 1; min-width: 0; width: 100%; padding: 18px 0; border: 0; outline: 0; color: #222; background: transparent; font: inherit; font-size: 16px; appearance: textfield; }
.tales-diamond-input input::-webkit-inner-spin-button, .tales-diamond-input input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.tales-diamond-input input::placeholder { color: transparent; opacity: 1; }
.tales-diamond-placeholder { position: absolute; left: 18px; right: 66px; overflow: hidden; color: #858585; font-size: 16px; white-space: nowrap; text-overflow: ellipsis; pointer-events: none; }
.tales-diamond-input input:not(:placeholder-shown) + .tales-diamond-placeholder { display: none; }
.tales-diamond-input output { flex-shrink: 0; max-width: 45%; color: #111; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.tales-diamond-validation { margin: 10px 0 0; color: #bd2038; font-size: 12px; }
.tales-diamond-buy { display: block; width: min(100%, 376px); min-height: 56px; margin: 68px auto 0; padding: 14px 22px; border: 0; border-radius: 14px; color: #fff; background: linear-gradient(100deg, #f96749, #ed263f); font: inherit; font-size: 18px; font-weight: 600; cursor: pointer; }
.tales-diamond-buy:disabled { cursor: not-allowed; }
.tales-recharge-panel .tales-purchase-terms { gap: 9px; margin-top: 14px; font-size: 16px; line-height: 1.5; }
/* Membership plans follow the reference subscription cards */
.tales-membership-panel { border-color: transparent; background: linear-gradient(180deg, #fff0f0 0, #fff 430px); box-shadow: none; }
.tales-membership-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 8px 0 28px; }
.tales-membership-heading h2 { margin: 0; color: #111; font-size: 26px; font-weight: 700; line-height: 1.3; }
.tales-membership-heading button { flex-shrink: 0; padding: 11px 20px; border: 0; border-radius: 999px; color: #292929; background: #f0eeee; font-size: 14px; cursor: pointer; }
.tales-membership-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.tales-membership-card { container-type: inline-size; display: flex; flex-direction: column; align-items: center; min-width: 0; overflow: hidden; padding-top: 28px; border-radius: 10px; color: #111; background: linear-gradient(180deg, #faeaf6, #fff5f5); text-align: center; }
.tales-membership-card h3 { width: calc(100% - 32px); margin: 0; font-size: clamp(24px, 9cqw, 42px); font-weight: 400; line-height: 1.3; overflow-wrap: anywhere; }
.tales-membership-price { display: block; margin: 32px 16px 52px; color: #ff5a45; font-size: clamp(24px, 8cqw, 36px); font-weight: 750; line-height: 1.25; }
.tales-membership-price small { font-size: .65em; }
.tales-membership-activate { width: calc(100% - 48px); min-height: 56px; padding: 12px; border: 1px solid #e3e4e7; border-radius: 9px; color: #222; background: #fff; font-size: clamp(16px, 5.7cqw, 22px); font-weight: 600; cursor: pointer; }
.tales-membership-activate:hover:enabled { border-color: #ff0084; color: #ff0084; }
.tales-membership-activate:disabled { color: #555; cursor: not-allowed; }
.tales-membership-benefits { display: grid; gap: 24px; max-width: calc(100% - 32px); margin: 28px auto 40px; padding: 0; list-style: none; text-align: left; }
.tales-membership-benefits li { display: flex; align-items: center; gap: 14px; color: #999; font-size: clamp(15px, 5cqw, 20px); line-height: 1.5; }
.tales-membership-benefits i { flex: 0 0 24px; color: #ff0084; text-align: center; font-size: 23px; }
.tales-membership-daily { align-self: stretch; margin-top: auto; padding: 12px 8px; color: #999; background: #ffedef; font-size: clamp(16px, 5.5cqw, 22px); }
.tales-membership-panel .tales-purchase-terms { gap: 9px; margin-top: 58px; margin-bottom: 12px; font-size: 16px; line-height: 1.5; }
.tales-membership-panel .tales-purchase-terms input, .tales-recharge-panel .tales-purchase-terms input { flex: 0 0 19px; height: 19px; margin: 2px 0 0; appearance: none; border: 1px solid #b6b6bc; border-radius: 50%; background: #fff; cursor: pointer; }
.tales-membership-panel .tales-purchase-terms input:checked, .tales-recharge-panel .tales-purchase-terms input:checked { border-color: var(--tales-red); background: var(--tales-red); box-shadow: inset 0 0 0 4px #fff; }
.tales-membership-panel .tales-purchase-terms input:focus-visible, .tales-recharge-panel .tales-purchase-terms input:focus-visible { outline: 2px solid var(--tales-red); outline-offset: 3px; }
@media (min-width: 901px) and (max-width: 1250px) {
	.tales-membership-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tales-membership-heading { align-items: flex-start; flex-direction: column; }
	.tales-diamond-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tales-recharge-heading { align-items: flex-start; flex-direction: column; }
	.tales-diamond-bag { padding: 22px; }
}
@media (max-width: 900px) {
	.tales-membership-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}
@media (max-width: 620px) {
	.tales-membership-heading { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 22px; }
	.tales-membership-heading h2 { font-size: 22px; }
	.tales-membership-heading button { min-height: 44px; font-size: 13px; }
	.tales-membership-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	.tales-membership-panel .tales-purchase-terms { margin-top: 28px; font-size: 14px; }
}
.tales-login-dialog { width: min(740px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: auto; border: 0; border-radius: 20px; color: var(--tales-text); background: #fff; box-shadow: 0 20px 70px #0003; }
.tales-login-dialog::backdrop { background: #0008; }
body:has(.tales-login-dialog[open]) { overflow: hidden; }
.tales-login-dialog-content .tv-login-reference-card { width: 100%; box-sizing: border-box; box-shadow: none; }
.tv-login-reference-card { position: relative; width: min(100%, 740px); padding: 76px 40px 30px; border: 0; border-radius: 20px; box-shadow: 0 15px 40px rgba(0,0,0,.08); }
.tv-login-reference-card h1 { margin: 0 0 52px; text-align: center; font-size: 34px; font-weight: 450; letter-spacing: -.04em; }
.tv-login-close { position: absolute; top: 25px; right: 28px; padding: 0; border: 0; background: transparent; color: inherit; font-size: 24px; }
.tv-login-reference-card form { margin-top: 0; }
.tv-login-reference-card label:not(.tv-terms) { margin: 28px 0 12px; color: #28262b; font-size: 20px; font-weight: 450; }
.tv-login-reference-card .tv-input { padding: 19px 17px; border-color: #e8e7e8; border-radius: 12px; background: #f7f7f7; font-size: 18px; }
.tv-password-input { position: relative; }
.tv-password-input .tv-input { padding-right: 52px; }
.tv-password-input button { position: absolute; top: 50%; right: 15px; width: 30px; height: 30px; transform: translateY(-50%); border: 0; color: #999; background: transparent; }
.tv-login-reference-card .tv-auth-links { margin: 18px 0 58px; color: #454047; font-size: 16px; }
.tv-login-reference-card .tv-button-primary { height: 68px; margin-top: 0; border-radius: 999px; background: linear-gradient(100deg, #f96c4b, #ed263f); font-size: 20px; }
.tv-button-register { height: 68px; margin-top: 30px; border: 0; border-radius: 999px; color: var(--tales-red); background: #fdebed; font-size: 20px; }
.tv-login-reference-card .tv-terms { justify-content: center; margin: 34px 0 0; color: #777; font-size: 17px; }
.tv-login-reference-card .tv-terms input { width: 20px; height: 20px; }
.tv-register-reference-card fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.tv-register-reference-card .tv-input { text-overflow: ellipsis; }
.tales-register-code { position: relative; }
.tv-register-reference-card .tales-register-code .tv-input { padding-right: 125px; }
.tales-register-code button { position: absolute; top: 50%; right: 24px; min-height: 40px; padding: 0; transform: translateY(-50%); border: 0; color: #f04453; background: transparent; font: inherit; font-size: 18px; font-weight: 600; cursor: pointer; }
.tales-register-code button:disabled { cursor: wait; opacity: .6; }
.tales-register-hint { display: block; margin-top: 8px; color: #999; font-size: 12px; }
.tv-register-reference-card .tv-button-primary { margin-top: 32px; }
.tv-register-reference-card .tv-button-primary:disabled { cursor: not-allowed; }
.tv-register-reference-card .tv-terms { color: #999; font-size: 20px; line-height: 1.5; }
.tv-register-reference-card .tv-terms a { color: #777; }
.tv-register-reference-card .tv-terms input { flex: 0 0 22px; width: 22px; height: 22px; margin: 0; appearance: none; border: 1px solid #aaa; border-radius: 50%; background: #fff; cursor: pointer; }
.tv-register-reference-card .tv-terms input:checked { border-color: var(--tales-red); background: var(--tales-red); box-shadow: inset 0 0 0 5px #fff; }
.tv-register-reference-card .tv-terms input:focus-visible { outline: 2px solid var(--tales-red); outline-offset: 3px; }
.tv-register-reference-card .validation-message, .tales-register-message { margin-top: 8px; color: #bd2038; font-size: 13px; }
@media (max-width: 900px) { .tv-profile-heading, .tales-profile-page { max-width: none; margin-left: 5vw; margin-right: 5vw; } .tales-profile-page { grid-template-columns: minmax(0, 1fr); } .tales-profile-card { width: 100%; max-width: 445px; min-width: 0; } .tales-profile-purchase-panel { grid-column: 1; grid-row: auto; } }
@media (max-width: 620px) {
	.tv-profile-heading { padding-top: 32px; }
	.tales-login-dialog-content .tv-login-reference-card { padding: 52px 22px 24px; }
	.tales-login-dialog-content .tv-login-reference-card h1 { margin-bottom: 24px; font-size: 27px; }
	.tales-login-dialog-content .tv-login-reference-card label:not(.tv-terms) { margin-top: 18px; font-size: 16px; }
	.tales-login-dialog-content .tv-login-reference-card .tv-auth-links { margin-bottom: 28px; }
	.tales-login-dialog-content .tv-login-reference-card .tv-terms { margin-top: 24px; font-size: 14px; }
	.tales-login-dialog-content .tv-login-reference-card .tv-button { height: 52px; font-size: 17px; }
	.tv-register-reference-card .tales-register-code .tv-input { padding-right: 92px; }
	.tales-register-code button { right: 14px; font-size: 14px; }
	.tv-register-reference-card .tv-input { font-size: 16px; }
	.tv-register-reference-card .tv-terms input { flex-basis: 20px; width: 20px; height: 20px; }
	.tv-profile-heading h1 { font-size: 35px; }
	.tales-profile-card { width: 100%; box-sizing: border-box; align-items: stretch; flex-direction: column; padding: 21px; }
	.tales-profile-card > .tv-button, .tales-avatar-upload { align-self: stretch; justify-content: center; }
	.tales-profile-card .tales-avatar-upload { margin-top: 0; }
	.tales-profile-field > span:last-child { min-width: 0; overflow-wrap: anywhere; }
	.tales-profile-purchase-panel { width: 100%; box-sizing: border-box; padding: 18px; }
	.tales-profile-page > .tales-profile-links { width: 100%; max-width: none; }
	.tales-diamond-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tales-diamond-card { min-width: 0; }
	.tales-recharge-heading { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 22px; }
	.tales-recharge-heading h2 { font-size: 22px; }
	.tales-recharge-heading button { min-height: 44px; font-size: 13px; }
	.tales-diamond-bag { padding: 20px 14px; }
	.tales-diamond-bag h3, .tales-diamond-custom > label { font-size: 18px; }
	.tales-diamond-grid { gap: 20px 14px; }
	.tales-diamond-card { min-height: 160px; padding-top: 30px; }
	.tales-diamond-bonus { padding: 5px 12px; font-size: 13px; }
	.tales-diamond-custom { margin-top: 24px; }
	.tales-diamond-custom > label { margin-bottom: 16px; }
	.tales-diamond-input { gap: 6px; min-height: 58px; padding: 0 12px; }
	.tales-diamond-input input { font-size: 14px; }
	.tales-diamond-input input::placeholder { color: #858585; }
	.tales-diamond-placeholder { display: none; }
	.tales-diamond-buy { margin-top: 36px; }
	.tales-recharge-panel .tales-purchase-terms { font-size: 13px; }
	.tales-purchase-terms { align-items: flex-start; text-align: left; }
	.tales-profile-edit-card { padding: 21px; }
	.tales-profile-edit { grid-template-columns: 1fr; }
	.tales-profile-edit button { grid-column: auto; width: 100%; }
	.tales-profile-section-title { display: block; }
}
