/* OST Text to Speech Highlighter – front end. */
:root {
	--ost-tts-word: #94bbf9;
	--ost-tts-block: #d2e3fc;
}

.ost-tts-player {
	--ost-tts-bar-bg: #f1f3f4;
	--ost-tts-text: #202124;
	--ost-tts-muted: #5f6368;
	--ost-tts-accent: #1a73e8;
	--ost-tts-track: #dadce0;
	box-sizing: border-box;
	margin-top: 0;
	margin-bottom: 1.5em;
	color: var(--ost-tts-text);
	font-family: "Google Sans", Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
	font-size: 14px;
	line-height: 1.4;
}

.ost-tts-player *,
.ost-tts-player *::before,
.ost-tts-player *::after {
	box-sizing: border-box;
}

.ost-tts-marker {
	display: none !important;
}

.ost-tts-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 56px;
	padding: 8px 16px 8px 8px;
	border-radius: 999px;
	background: var(--ost-tts-bar-bg);
	box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.ost-tts-player button {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--ost-tts-text);
	font: inherit;
	line-height: 1;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.ost-tts-player button:focus-visible,
.ost-tts-seek:focus-visible {
	outline: 2px solid var(--ost-tts-accent);
	outline-offset: 2px;
}

.ost-tts-player .ost-tts-toggle {
	width: 40px;
	height: 40px;
	border: 3px solid var(--ost-tts-text);
	border-radius: 50%;
	background: var(--ost-tts-bar-bg);
	transition: background-color 0.15s ease;
}

.ost-tts-player .ost-tts-toggle:hover {
	background: rgba(32, 33, 36, 0.08);
}

.ost-tts-toggle svg {
	width: 20px;
	height: 20px;
}

.ost-tts-toggle .ost-tts-icon-play {
	margin-left: 2px;
}

.ost-tts-toggle .ost-tts-icon-pause,
.ost-tts-playing .ost-tts-toggle .ost-tts-icon-play {
	display: none;
}

.ost-tts-playing .ost-tts-toggle .ost-tts-icon-pause {
	display: block;
}

.ost-tts-intro {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	gap: 12px;
	min-width: 0;
	padding-left: 4px;
	cursor: pointer;
}

.ost-tts-label {
	overflow: hidden;
	color: var(--ost-tts-text);
	font-size: 16px;
	font-weight: 500;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.ost-tts-duration {
	flex: none;
	margin-left: auto;
	color: var(--ost-tts-muted);
	font-size: 14px;
	font-weight: 400;
}

.ost-tts-started .ost-tts-intro {
	display: none;
}

.ost-tts-controls {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	gap: 4px;
	min-width: 0;
}

.ost-tts-controls[hidden],
.ost-tts-close[hidden] {
	display: none;
}

.ost-tts-player .ost-tts-skip-btn,
.ost-tts-player .ost-tts-close {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	color: var(--ost-tts-muted);
}

.ost-tts-player .ost-tts-skip-btn:hover,
.ost-tts-player .ost-tts-close:hover,
.ost-tts-player .ost-tts-speed:hover {
	background: rgba(32, 33, 36, 0.08);
	color: var(--ost-tts-text);
}

.ost-tts-time {
	flex: none;
	min-width: 34px;
	color: var(--ost-tts-muted);
	font-size: 12px;
	font-variant-numeric: tabular-nums;
	text-align: center;
}

.ost-tts-seek {
	--ost-tts-progress: 0%;
	flex: 1 1 auto;
	min-width: 40px;
	height: 20px;
	margin: 0 4px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.ost-tts-seek::-webkit-slider-runnable-track {
	height: 4px;
	border-radius: 2px;
	background: linear-gradient(to right, var(--ost-tts-accent) var(--ost-tts-progress), var(--ost-tts-track) var(--ost-tts-progress));
}

.ost-tts-seek::-webkit-slider-thumb {
	width: 12px;
	height: 12px;
	margin-top: -4px;
	border: 0;
	border-radius: 50%;
	background: var(--ost-tts-accent);
	-webkit-appearance: none;
	appearance: none;
	transition: transform 0.1s ease;
}

.ost-tts-seek:hover::-webkit-slider-thumb,
.ost-tts-seek:active::-webkit-slider-thumb {
	transform: scale(1.25);
}

.ost-tts-seek::-moz-range-track {
	height: 4px;
	border-radius: 2px;
	background: var(--ost-tts-track);
}

.ost-tts-seek::-moz-range-progress {
	height: 4px;
	border-radius: 2px;
	background: var(--ost-tts-accent);
}

.ost-tts-seek::-moz-range-thumb {
	width: 12px;
	height: 12px;
	border: 0;
	border-radius: 50%;
	background: var(--ost-tts-accent);
}

.ost-tts-player .ost-tts-speed {
	min-width: 44px;
	height: 32px;
	padding: 0 8px;
	border-radius: 16px;
	color: var(--ost-tts-text);
	font-size: 13px;
	font-weight: 500;
}

.ost-tts-audio {
	display: none;
}

.ost-tts-sticky {
	position: fixed;
	z-index: 99990;
	top: auto;
	right: 20px;
	bottom: 20px;
	left: auto;
	width: min(480px, calc(100% - 40px));
	max-width: none !important;
	margin: 0 !important;
	transform: none;
}

@media (max-width: 600px) {
	.ost-tts-sticky {
		right: 12px;
		bottom: 12px;
		width: calc(100% - 24px);
	}
}

.ost-tts-sticky .ost-tts-bar {
	box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
}

@media (max-width: 480px) {
	.ost-tts-bar {
		gap: 4px;
		padding-right: 10px;
	}

	.ost-tts-label {
		font-size: 15px;
	}

	.ost-tts-time {
		display: none;
	}

	.ost-tts-player .ost-tts-skip-btn {
		width: 32px;
	}
}

.ost-tts-w {
	border-radius: 3px;
	transition: background-color 0.1s linear;
}

.ost-tts-block-active {
	background-color: var(--ost-tts-block);
	border-radius: 4px;
	transition: background-color 0.2s linear;
}

.ost-tts-w.ost-tts-word-active {
	background-color: var(--ost-tts-word);
	color: inherit;
}

@media (prefers-reduced-motion: reduce) {
	.ost-tts-w,
	.ost-tts-block-active {
		transition: none;
	}
}

@media print {
	.ost-tts-player,
	.ost-tts-sentinel {
		display: none !important;
	}

	.ost-tts-block-active,
	.ost-tts-word-active {
		background: none !important;
	}
}
