/**
 * PPA Lesson Post – modern, SEO-friendly, mobile-responsive layout.
 * Loaded on single post when the post was created via "Create a new post".
 * Body gets .ppa-lp-single on these posts so we can hide theme's duplicate featured image and top title/category.
 */
/* Let content use full width and remove blue/theme background */
body.ppa-lp-single #content,
body.ppa-lp-single .site-content,
body.ppa-lp-single .entry-content,
body.ppa-lp-single .site-inner,
body.ppa-lp-single .content-area,
body.ppa-lp-single .elementor-section.elementor-section-boxed > .elementor-container,
body.ppa-lp-single .elementor-location-single .elementor-section,
body.ppa-lp-single .elementor-widget-container {
	max-width: 100% !important;
	width: 100% !important;
	background: #fff !important;
}
body.ppa-lp-single .elementor-location-single .elementor-section,
body.ppa-lp-single .elementor-widget-container,
body.ppa-lp-single [class*="elementor"] .elementor-section,
body.ppa-lp-single .elementor-inner-section,
body.ppa-lp-single .elementor-column-wrap,
body.ppa-lp-single #main,
body.ppa-lp-single .site-main,
body.ppa-lp-single main {
	background: #fff !important;
	background-color: #fff !important;
}
body.ppa-lp-single .elementor-section-boxed > .elementor-container {
	max-width: none !important;
}

body.ppa-lp-single .post-thumbnail,
body.ppa-lp-single .entry-thumbnail,
body.ppa-lp-single .elementor-widget-theme-post-featured-image {
	display: none !important;
}

/* Hide only the theme's header block (title + category), not the article. Avoid [class*="category"] – WordPress adds it to the article. */
body.ppa-lp-single .entry-header,
body.ppa-lp-single .post-header,
body.ppa-lp-single .single-post-header,
body.ppa-lp-single .elementor-widget-theme-post-title,
body.ppa-lp-single article > header,
body.ppa-lp-single .entry-meta,
body.ppa-lp-single .cat-links,
body.ppa-lp-single .post-categories,
body.ppa-lp-single .post-meta,
body.ppa-lp-single .entry-title:not(.ppa-lp-title) {
	display: none !important;
}

/* Lesson container: centered box, pale green background, light blue border (matching reference design) */
.ppa-lp {
	--ppa-lp-gap: 1.5rem;
	--ppa-lp-radius: 12px;
	--ppa-lp-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
	--ppa-lp-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
	--ppa-lp-text: #1e293b;
	--ppa-lp-muted: #64748b;
	--ppa-lp-border: #e2e8f0;
	--ppa-lp-bg: #f8fafc;
	--ppa-lp-box-bg: #e8f7ec;
	--ppa-lp-box-border: #63b3ed;
	box-sizing: border-box;
	width: 100%;
	max-width: 1000px;
	margin-left: auto;
	margin-right: auto;
	padding: 1.5rem 2rem;
	background: var(--ppa-lp-box-bg);
	border: 2px solid var(--ppa-lp-box-border);
	border-radius: var(--ppa-lp-radius);
}

.ppa-lp *,
.ppa-lp *::before,
.ppa-lp *::after {
	box-sizing: border-box;
}

/* Isolate quiz: prevent our, theme, and editor CSS from affecting quiz; quiz plugin styles control appearance */
.ppa-lp-quiz,
.ppa-lp-quiz *,
.ppa-lp-quiz *::before,
.ppa-lp-quiz *::after {
	box-sizing: revert;
}
/* Strong reset so quiz plugin rules win – overrides theme/YellowPencil; higher specificity than :where() */
.ppa-lp .ppa-lp-quiz,
.ppa-lp .ppa-lp-quiz *,
.ppa-lp .ppa-lp-quiz *::before,
.ppa-lp .ppa-lp-quiz *::after {
	color: revert;
	font-family: revert;
	font-size: 0.8125rem;
	font-weight: revert;
	font-style: revert;
	line-height: revert;
	letter-spacing: revert;
	text-align: left;
	text-decoration: revert;
	text-transform: revert;
	background: revert;
	background-color: revert;
	border: revert;
	border-radius: revert;
	box-shadow: revert;
}

.ppa-lp-article {
	display: block;
}
/* Keep main blocks stacked (theme may use flex on entry-content) */
.ppa-lp-article > .ppa-lp-back,
.ppa-lp-article > .ppa-lp-back-bottom,
.ppa-lp-article > .ppa-lp-social,
.ppa-lp-article > .ppa-lp-section {
	display: block !important;
	width: 100% !important;
	flex: none !important;
	max-width: none !important;
}
.ppa-lp-article > .ppa-lp-intro {
	display: grid !important;
	grid-template-columns: 1fr minmax(180px, 320px);
	align-items: start;
	width: 100% !important;
	flex: none !important;
	max-width: none !important;
}
@media (max-width: 640px) {
	.ppa-lp-article > .ppa-lp-intro {
		grid-template-columns: 1fr;
	}
}

/* Back to main library */
.ppa-lp-back {
	margin: 0.75rem 0 1rem;
}
.ppa-lp-back-bottom {
	margin-top: 1.5rem;
	margin-bottom: 0.5rem;
}
.ppa-lp-back-link {
	display: inline-block;
	padding: 0.5rem 1rem;
	background: #dc2626;
	color: #fff !important;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9375rem;
	border-radius: 8px;
	transition: background 0.2s;
}
.ppa-lp-back-link:hover {
	background: #b91c1c;
	color: #fff !important;
}

/* Intro left column: title + description stacked, aligns with picture */
.ppa-lp-intro-left {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	min-width: 0;
}
/* Title row: inside intro */
.ppa-lp-title-row {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1rem;
	margin: 0;
	padding: 0;
	clear: both;
}
.ppa-lp .ppa-lp-title {
	display: block !important;
	font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
	font-size: clamp(1.5rem, 4vw, 2.25rem);
	font-weight: 700;
	line-height: 1.3;
	color: var(--ppa-lp-box-border);
	margin: 0;
	padding: 0;
	visibility: visible !important;
	position: relative;
	z-index: 1;
	background: none !important;
	box-shadow: none !important;
	border: none !important;
	flex-shrink: 0;
	max-width: none !important;
	white-space: nowrap;
}
@media (max-width: 520px) {
	.ppa-lp .ppa-lp-title {
		white-space: normal;
	}
}
.ppa-lp .ppa-lp-title::before,
.ppa-lp .ppa-lp-title::after {
	display: none !important;
	content: none !important;
}

/* Intro: description (left) and picture + social (right) always same level – use Grid so they don’t stack */
.ppa-lp-intro {
	display: grid !important;
	grid-template-columns: 1fr minmax(180px, 320px);
	gap: 1.5rem 2rem;
	align-items: start;
	margin-top: 0;
	margin-bottom: var(--ppa-lp-gap);
	padding-top: 0.25rem;
	clear: both;
	position: relative;
	z-index: 0;
}
@media (max-width: 640px) {
	.ppa-lp-intro {
		grid-template-columns: 1fr;
	}
}
.ppa-lp-intro-text {
	min-width: 0;
	font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
	font-size: 1.125rem;
	line-height: 1.65;
	color: var(--ppa-lp-text);
}
.ppa-lp-intro-media {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	min-width: 0;
}
.ppa-lp-intro-media .ppa-lp-hero-media {
	width: 100%;
	border-radius: var(--ppa-lp-radius);
	overflow: hidden;
	box-shadow: var(--ppa-lp-shadow-lg);
	line-height: 0;
	border: 2px solid var(--ppa-lp-box-border);
}
.ppa-lp-intro-media .ppa-lp-hero-media:empty {
	display: none;
}
.ppa-lp-hero-placeholder {
	width: 100%;
	min-height: 200px;
	background: var(--ppa-lp-border);
	border-radius: var(--ppa-lp-radius);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	text-align: center;
	font-size: 0.9375rem;
	color: var(--ppa-lp-muted);
}
.ppa-lp-hero-placeholder span {
	max-width: 220px;
}
.ppa-lp-hero-img {
	width: 100%;
	height: auto;
	display: block;
	vertical-align: middle;
	object-fit: cover;
}

/* Sections */
.ppa-lp-section {
	background: #fff !important;
	border-radius: var(--ppa-lp-radius);
	box-shadow: var(--ppa-lp-shadow);
	padding: 1.5rem;
	margin-bottom: var(--ppa-lp-gap);
}
/* Force white content area for Reading – overrides theme/Elementor */
.ppa-lp-section.ppa-lp-reading,
.ppa-lp-section.ppa-lp-reading .ppa-lp-prose,
.ppa-lp-section.ppa-lp-reading .ppa-lp-script,
.ppa-lp-section.ppa-lp-reading .ppa-lp-vocabulary {
	background: #fff !important;
}
.ppa-lp-section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--ppa-lp-border);
}
.ppa-lp-section-head .ppa-lp-h2 {
	margin: 0;
	padding-bottom: 0;
	border-bottom: none;
}

/* Beautiful section titles: Listening & Reading – premium badge style */
.ppa-lp-section-head-listening,
.ppa-lp-section-head-reading {
	padding: 1rem 1.25rem;
	margin: -1.5rem -1.5rem 1.25rem -1.5rem;
	border-radius: var(--ppa-lp-radius) var(--ppa-lp-radius) 0 0;
	border-bottom: none;
}
@media (min-width: 640px) {
	.ppa-lp-section-head-listening,
	.ppa-lp-section-head-reading {
		margin: -2rem -2rem 1.5rem -2rem;
		padding: 1.15rem 1.5rem;
	}
}
.ppa-lp-section-head-listening {
	background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
	box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
}
.ppa-lp-section-head-reading {
	background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
	box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
/* Listening section: no PDF button, so lead text sits below the bar */
.ppa-lp-section.ppa-lp-listening .ppa-lp-lead {
	margin-top: 0.5rem;
}

/* Custom audio player – matches Listening teal theme */
.ppa-lp-audio-wrap {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem 1.25rem;
	margin-bottom: 1.5rem;
	background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
	border: 2px solid rgba(13, 148, 136, 0.3);
	border-radius: var(--ppa-lp-radius);
	box-shadow: 0 1px 3px rgba(13, 148, 136, 0.1);
}
.ppa-lp-audio-wrap .ppa-lp-audio {
	position: absolute;
	width: 0;
	height: 0;
	opacity: 0;
	pointer-events: none;
}
.ppa-lp-audio-ui {
	display: flex;
	align-items: center;
	gap: 1rem;
	width: 100%;
	max-width: 100%;
}
.ppa-lp-audio-play {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%) !important;
	background-color: #0d9488 !important;
	color: #fff !important;
	border: none !important;
	border-radius: 50%;
	cursor: pointer;
	flex-shrink: 0;
	transition: transform 0.15s, box-shadow 0.2s;
}
.ppa-lp-audio-play:hover {
	transform: scale(1.05);
	box-shadow: 0 4px 12px rgba(13, 148, 136, 0.4);
}
.ppa-lp-audio-play svg {
	fill: #fff !important;
	width: 26px;
	height: 26px;
	flex-shrink: 0;
}
/* Bar area: timer on top right, progress bar below */
.ppa-lp-audio-bar-wrap {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}
.ppa-lp-audio-bar-top {
	display: flex;
	justify-content: flex-end;
	align-items: center;
}
.ppa-lp-audio-progress-wrap {
	min-width: 0;
	display: flex;
	align-items: center;
}
.ppa-lp-audio-progress {
	width: 100%;
	height: 6px;
	margin: 0;
	vertical-align: middle;
	accent-color: #0d9488;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	background: rgba(13, 148, 136, 0.2);
	border-radius: 3px;
}
.ppa-lp-audio-progress::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 16px;
	height: 16px;
	background: #0d9488;
	border-radius: 50%;
	cursor: pointer;
}
.ppa-lp-audio-progress::-moz-range-thumb {
	width: 16px;
	height: 16px;
	background: #0d9488;
	border: none;
	border-radius: 50%;
	cursor: pointer;
}
.ppa-lp-audio-time {
	font-size: 0.875rem;
	color: var(--ppa-lp-muted);
	flex-shrink: 0;
	min-width: 5.5em;
}
/* Listening player only: bar wrap lives in .ppa-lp-audio-wrap (not Speak Up modal) */
.ppa-lp-audio-wrap .ppa-lp-audio-bar-wrap { flex: 1; }
.ppa-lp-h2-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	margin-right: 0.65rem;
	font-size: 1.25rem;
	line-height: 1;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.ppa-lp-h2-listening,
.ppa-lp-h2-reading {
	display: inline-flex;
	align-items: center;
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.2;
	color: #fff !important;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.ppa-lp-section-head-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
}
.ppa-lp-play-audio-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.4rem 0.9rem;
	background: rgba(255, 255, 255, 0.95);
	color: #4f46e5 !important;
	border: none;
	font-size: 0.875rem;
	font-weight: 600;
	border-radius: 6px;
	cursor: pointer;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	transition: background 0.2s, transform 0.15s;
}
.ppa-lp-play-audio-btn:hover {
	background: #fff;
	transform: translateY(-1px);
}
.ppa-lp-play-icon {
	font-size: 0.75rem;
}
.ppa-lp-section-head-listening .ppa-lp-pdf-download,
.ppa-lp-section-head-reading .ppa-lp-pdf-download {
	background: #eeee22;
	color: #1e3a8a !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.ppa-lp-section-head-listening .ppa-lp-pdf-download:hover,
.ppa-lp-section-head-reading .ppa-lp-pdf-download:hover {
	background: #d4d41e;
	color: #1e3a8a !important;
}

.ppa-lp-pdf-download {
	display: inline-block;
	padding: 0.4rem 0.9rem;
	background: #dc2626;
	color: #fff !important;
	text-decoration: none;
	font-size: 0.875rem;
	font-weight: 600;
	border-radius: 6px;
	white-space: nowrap;
}
.ppa-lp-pdf-download:hover {
	background: #b91c1c;
	color: #fff !important;
}
.ppa-lp-h2 {
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--ppa-lp-text);
	margin: 0 0 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--ppa-lp-border);
}
.ppa-lp-prose {
	font-size: 1rem;
	line-height: 1.7;
	color: var(--ppa-lp-text);
}
.ppa-lp-prose p {
	margin: 0 0 1rem;
}
.ppa-lp-prose p:last-child {
	margin-bottom: 0;
}
/**
 * 4 containers for Vocabulary & Useful Sentences – customize each separately:
 * Container 1: ✅ Vocabulary (header)
 * Container 2: Vocabulary list (word definitions)
 * Container 3: ✅ Useful Sentences / Takeaways (header)
 * Container 4: Useful sentences list
 */
.ppa-lp-vocabulary .ppa-lp-container {
	margin-bottom: 1rem;
	border-radius: 12px;
	padding: 1.25rem 1.5rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	border: 1px solid rgba(0, 0, 0, 0.06);
}
.ppa-lp-vocabulary .ppa-lp-container:last-child {
	margin-bottom: 0;
}
/* Container 1: Vocabulary header */
.ppa-lp-container-1.ppa-lp-vocab-header-wrap {
	background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
	border-left: 5px solid #22c55e;
}
.ppa-lp-container-1 .ppa-lp-section-label {
	margin: 0;
	padding: 0;
	background: none;
	border: none;
	font-weight: 700;
	font-size: 1.3rem;
	color: #166534;
}
/* Container 2: Vocabulary list */
.ppa-lp-container-2.ppa-lp-vocab-list-wrap {
	background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
	border-left: 5px solid #22c55e;
	line-height: 1.4;
}
.ppa-lp-container-2 p {
	margin: 0;
}
.ppa-lp-container-2 p:last-child {
	margin-bottom: 0;
}
/* Container 3: Useful Sentences header */
.ppa-lp-container-3.ppa-lp-useful-header-wrap {
	margin-top: 1.5rem;
	background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
	border-left: 5px solid #3b82f6;
}
.ppa-lp-container-3 .ppa-lp-section-label {
	margin: 0;
	padding: 0;
	background: none;
	border: none;
	font-weight: 700;
	font-size: 1.45rem;
	color: #1e40af;
}
/* Container 4: Useful sentences list */
.ppa-lp-container-4.ppa-lp-useful-list-wrap {
	background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
	border-left: 5px solid #3b82f6;
}
.ppa-lp-container-4 p {
	margin: 0 0 0.5rem 0;
}
.ppa-lp-container-4 p:last-child {
	margin-bottom: 0;
}

.ppa-lp-script,
.ppa-lp-vocabulary {
	font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
}
.ppa-lp-script {
	margin-bottom: 1.5rem;
	font-size: 1rem;
	line-height: 1.7;
	color: var(--ppa-lp-text);
	font-weight: 400;
}
.ppa-lp-script p {
	margin-bottom: 1rem;
}
.ppa-lp-script:last-child {
	margin-bottom: 0;
}
.ppa-lp-lead {
	color: var(--ppa-lp-muted);
	font-size: 0.9375rem;
	margin: 0 0 1rem;
}
.ppa-lp-quiz,
.ppa-lp-download-wrap {
	margin-top: 0.5rem;
}
.ppa-lp-placeholder {
	color: var(--ppa-lp-muted);
	font-size: 0.9375rem;
	font-style: italic;
	margin: 0;
}
.ppa-lp-placeholder code {
	background: var(--ppa-lp-bg);
	padding: 0.15em 0.4em;
	border-radius: 4px;
	font-size: 0.9em;
}
.ppa-lp-social {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

/* Floating audio player – sticks to bottom while scrolling */
.ppa-lp-floating-player {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 99999;
	background: linear-gradient(180deg, rgba(30, 41, 59, 0.97) 0%, #1e293b 100%);
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
	padding: 0.75rem 1.25rem;
}
.ppa-lp-floating-player-inner {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	max-width: 100%;
	min-width: 0;
}
/* Bar area: label + time on top right, progress bar below */
.ppa-lp-floating-bar-wrap {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}
.ppa-lp-floating-bar-top {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
	gap: 0.5rem;
}
.ppa-lp-floating-label {
	color: #e2e8f0;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
}
.ppa-lp-floating-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-top: 12px;
	background: #6366f1;
	color: #fff !important;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	font-size: 1.25rem;
	flex-shrink: 0;
	transition: background 0.2s, transform 0.15s;
}
.ppa-lp-floating-toggle:hover {
	background: #4f46e5;
	transform: scale(1.05);
}
.ppa-lp-floating-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	color: #fff !important;
}
.ppa-lp-floating-icon svg {
	flex-shrink: 0;
}
.ppa-lp-floating-icon.ppa-lp-icon-play svg {
	margin-left: 2px;
}
.ppa-lp-floating-progress-wrap {
	min-width: 0;
	display: flex;
	align-items: center;
}
.ppa-lp-floating-progress {
	width: 100%;
	height: 6px;
	margin: 0;
	vertical-align: middle;
	accent-color: #6366f1;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	background: rgba(99, 102, 241, 0.25);
	border-radius: 3px;
}
.ppa-lp-floating-progress::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 16px;
	height: 16px;
	background: #6366f1;
	border-radius: 50%;
	cursor: pointer;
}
.ppa-lp-floating-progress::-moz-range-thumb {
	width: 16px;
	height: 16px;
	background: #6366f1;
	border: none;
	border-radius: 50%;
	cursor: pointer;
}
.ppa-lp-floating-time {
	flex-shrink: 0;
	font-size: 0.875rem;
	color: #94a3b8;
	min-width: 5.5em;
}
.ppa-lp-floating-close {
	background: transparent;
	border: none;
	color: #94a3b8;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	padding: 0.25rem;
	transition: color 0.2s;
	flex-shrink: 0;
}
.ppa-lp-floating-close:hover {
	color: #fff;
}

/* Speak Up! button */
.ppa-lp-speak-up-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.4rem 0.9rem;
	background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
	color: #fff !important;
	border: none;
	font-size: 0.875rem;
	font-weight: 600;
	border-radius: 6px;
	cursor: pointer;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	transition: background 0.2s, transform 0.15s, opacity 0.2s;
}
.ppa-lp-speak-up-btn:hover:not(:disabled) {
	background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
	transform: translateY(-1px);
}
.ppa-lp-speak-up-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}
.ppa-lp-speak-up-icon {
	font-size: 1rem;
}

/* Floating circular Speak Up button - appears when bar is visible */
.ppa-speak-up-floating-btn {
	position: fixed;
	bottom: clamp(1.5rem, 5vw, 2.5rem);
	right: clamp(1rem, 4vw, 2rem);
	z-index: 99999;
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
	width: clamp(64px, 16vw, 80px);
	height: clamp(64px, 16vw, 80px);
	padding: 0.5rem;
	background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
	color: #fff !important;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(20, 184, 166, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
	transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
	font-family: inherit;
}
.ppa-speak-up-floating-btn:hover:not(:disabled) {
	background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
	transform: scale(1.05);
	box-shadow: 0 6px 20px rgba(20, 184, 166, 0.5), 0 4px 12px rgba(0, 0, 0, 0.25);
}
.ppa-speak-up-floating-btn:active:not(:disabled) {
	transform: scale(0.98);
}
.ppa-speak-up-floating-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}
.ppa-speak-up-floating-icon {
	font-size: clamp(1.25rem, 4vw, 1.5rem);
	line-height: 1;
}
.ppa-speak-up-floating-text {
	font-size: clamp(0.5rem, 1.8vw, 0.625rem);
	font-weight: 700;
	line-height: 1;
	text-align: center;
	white-space: nowrap;
	letter-spacing: 0.02em;
}
@media (max-width: 480px) {
	.ppa-speak-up-floating-btn {
		bottom: clamp(1rem, 4vw, 1.5rem);
		right: clamp(0.75rem, 3vw, 1.25rem);
	}
}
.ppa-lp-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Speak Up! – floating bar at bottom (matches lesson audio player style) */
.ppa-speak-up-modal {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 100000;
}
/* Feedback & Review: full-viewport overlay so page content never overlaps the modal */
.ppa-speak-up-has-feedback.ppa-speak-up-modal,
.ppa-speak-up-has-review.ppa-speak-up-modal {
	top: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(0.5rem, 2vw, 1rem);
	box-sizing: border-box;
}
.ppa-speak-up-modal-backdrop {
	display: none;
}
.ppa-speak-up-has-feedback .ppa-speak-up-modal-backdrop,
.ppa-speak-up-has-review .ppa-speak-up-modal-backdrop {
	display: block;
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	z-index: 0;
}
.ppa-speak-up-has-feedback .ppa-speak-up-modal-content,
.ppa-speak-up-has-review .ppa-speak-up-modal-content {
	position: relative;
	z-index: 1;
	max-height: 100%;
}
.ppa-speak-up-has-feedback .ppa-speak-up-modal-content {
	margin: auto;
	width: 100%;
	max-width: min(1000px, calc(100vw - 2rem));
	/* Rebuild: strict column so header/body/actions never clip */
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	max-height: min(90vh, calc(100% - 1rem));
	min-height: 0;
	overflow: hidden;
}
.ppa-speak-up-has-review .ppa-speak-up-modal-content {
	margin: auto;
	width: 100%;
	max-width: min(1000px, calc(100vw - 2rem));
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	max-height: min(90vh, calc(100% - 1rem));
	min-height: 0;
	overflow: hidden;
}
.ppa-speak-up-modal-content {
	position: relative;
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	max-width: min(1000px, calc(100vw - 2rem));
	width: 100%;
	margin: 0 auto;
	padding: 0.75rem clamp(1rem, 4vw, 2rem) 0.75rem clamp(1rem, 3vw, 1.5rem);
	background: linear-gradient(180deg, rgba(30, 41, 59, 0.97) 0%, #1e293b 100%);
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
	min-height: 72px;
	box-sizing: border-box;
	overflow-x: hidden;
}
.ppa-speak-up-modal-close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: none;
	background: #1a1a1a;
	color: #fff !important;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
}
.ppa-speak-up-modal-close:hover {
	background: #000;
	color: #fff !important;
}
.ppa-speak-up-modal-title {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 600;
	color: #e2e8f0;
	flex-shrink: 0;
}
.ppa-speak-up-modal-body {
	margin: 0;
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	box-sizing: border-box;
	overflow-x: hidden;
}
.ppa-speak-up-instruction {
	margin: 0;
	color: #e2e8f0;
	font-size: 0.9375rem;
	line-height: 1.4;
}

/* Start recording prompt: single sentence bold centered, responsive */
.ppa-speak-up-prompt .ppa-speak-up-modal-title {
	display: none !important;
}
.ppa-speak-up-prompt .ppa-speak-up-modal-body {
	width: 100%;
	justify-content: center;
	overflow: visible;
}
.ppa-speak-up-prompt .ppa-speak-up-modal-content {
	max-height: none;
	overflow: visible;
}
.ppa-speak-up-prompt-layout {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	width: 100%;
	padding: 0 0.5rem;
}
.ppa-speak-up-prompt-instruction {
	margin: 0;
	color: #e2e8f0;
	font-size: 0.9375rem;
	font-weight: 700;
	text-align: center;
	line-height: 1.4;
	max-width: 100%;
}
@media (min-width: 480px) {
	.ppa-speak-up-prompt-instruction {
		font-size: 1.0625rem;
	}
}
@media (min-width: 768px) {
	.ppa-speak-up-prompt-instruction {
		font-size: 1.125rem;
	}
}
@media (min-width: 1024px) {
	.ppa-speak-up-prompt-instruction {
		font-size: 1.25rem;
	}
}
.ppa-speak-up-mic-label {
	margin: 0 0.25rem 0 0;
	color: #94a3b8;
	font-size: 0.875rem;
	font-weight: 600;
}
.ppa-speak-up-mic-select {
	display: inline-block;
	max-width: 220px;
	margin: 0;
	padding: 0.4rem 0.6rem;
	border: 1px solid #475569;
	border-radius: 6px;
	font-size: 0.875rem;
	background: rgba(255, 255, 255, 0.1);
	color: #e2e8f0;
}
.ppa-speak-up-playback-hint {
	margin: 0.25rem 0 0;
	color: #94a3b8;
	font-size: 0.8125rem;
	line-height: 1.5;
}
.ppa-speak-up-record-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem 1rem;
	background: #6366f1;
	color: #fff !important;
	border: none;
	font-size: 0.875rem;
	font-weight: 600;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s, transform 0.15s;
	flex-shrink: 0;
}
.ppa-speak-up-record-btn:hover {
	background: #4f46e5;
	transform: scale(1.02);
}
.ppa-speak-up-record-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}
.ppa-speak-up-start-record-btn {
	position: relative;
	overflow: visible;
}
.ppa-speak-up-start-record-btn::before {
	content: '';
	position: absolute;
	inset: -4px;
	border-radius: 12px;
	background: transparent;
	pointer-events: none;
	animation: ppa-pulse-yellow 1.5s ease-in-out infinite;
}
@keyframes ppa-pulse-yellow {
	0%, 100% { box-shadow: 0 0 0 0 #fde047; }
	50% { box-shadow: 0 0 0 14px rgba(253, 224, 71, 0); }
}
.ppa-speak-up-progress-wrap {
	margin: 0;
	flex: 1;
	min-width: 120px;
}
.ppa-speak-up-progress-bar {
	height: 6px;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 4px;
	overflow: hidden;
	margin-bottom: 0.35rem;
}
.ppa-speak-up-progress-fill {
	height: 100%;
	width: 0%;
	background: #6366f1;
	border-radius: 4px;
	transition: width 0.1s linear;
}
.ppa-speak-up-progress-pct {
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #94a3b8;
}

/* Recording screen: no title, Speak now! + mic bar, progress bar in frame */
.ppa-speak-up-recording .ppa-speak-up-modal-title {
	display: none !important;
}
.ppa-speak-up-recording-layout {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	width: 100%;
}
.ppa-speak-up-recording-top {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
}
.ppa-speak-up-speak-now {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 700;
	color: #e2e8f0;
	line-height: 1.2;
	flex-shrink: 0;
}
.ppa-speak-up-recording-tip {
	width: 100%;
	margin: 0.25rem 0 0 0;
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.85);
	flex-basis: 100%;
}
.ppa-speak-up-mic-icon-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0.35rem;
	background: #fff;
	border-radius: 10px;
	border: 2px solid rgba(255, 255, 255, 0.9);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.ppa-speak-up-mic-icon {
	width: 2rem;
	height: 2rem;
	color: #14b8a6;
}
.ppa-speak-up-mic-bar-wrap {
	flex: 1;
	min-width: 140px;
	display: flex;
	align-items: center;
}
.ppa-speak-up-mic-bar {
	width: 100%;
	max-width: 260px;
	height: 12px;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 6px;
	overflow: hidden;
	display: flex;
	align-items: stretch;
	justify-content: flex-start;
	border: 3px double rgba(255, 255, 255, 0.4);
}
.ppa-speak-up-mic-bar-fill {
	width: 0%;
	min-width: 0;
	height: 100%;
	background: linear-gradient(90deg, #14b8a6 0%, #0d9488 100%);
	border-radius: 4px;
	transition: width 0.1s ease-out;
}
.ppa-speak-up-recording-progress-frame {
	width: 100%;
	padding: 1rem 1.25rem;
	background: rgba(255, 255, 255, 0.06);
	border: 2px solid rgba(255, 255, 255, 0.15);
	border-radius: 12px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
.ppa-speak-up-recording-progress-bar {
	width: 100%;
	height: 12px;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 6px;
	overflow: hidden;
}
.ppa-speak-up-recording-progress-bar .ppa-speak-up-progress-fill {
	background: linear-gradient(90deg, #6366f1 0%, #14b8a6 100%);
	border-radius: 6px;
}
.ppa-speak-up-msg {
	margin: 0;
	color: #94a3b8;
	font-size: 0.875rem;
}

/* Preparing popup: no title, centered big instruction + hourglass */
.ppa-speak-up-preparing .ppa-speak-up-modal-title {
	display: none !important;
}
.ppa-speak-up-preparing .ppa-speak-up-modal-content {
	justify-content: center;
}
.ppa-speak-up-preparing .ppa-speak-up-modal-body {
	justify-content: center;
	align-items: center;
}
.ppa-speak-up-preparing-layout {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1.5rem;
	padding: 1.5rem 0;
	width: 100%;
	text-align: center;
}
.ppa-speak-up-preparing-msg {
	margin: 0;
	color: #e2e8f0;
	font-size: 1.5rem;
	font-weight: 700;
	text-align: center;
	line-height: 1.4;
}
.ppa-speak-up-hourglass {
	font-size: 3.5rem;
	line-height: 1;
	color: #94a3b8;
	animation: ppa-hourglass-flip 1.5s ease-in-out infinite;
}
@keyframes ppa-hourglass-flip {
	0%, 100% { transform: rotate(0deg); }
	50% { transform: rotate(180deg); }
}
.ppa-speak-up-error {
	color: #f87171;
	margin: 0;
	font-size: 0.875rem;
}
.ppa-speak-up-feedback-text {
	margin: 0 0.5rem 0 0;
	line-height: 1.5;
	color: #e2e8f0;
	font-size: 0.875rem;
	flex: 1;
	min-width: 0;
}
/* Feedback modal: header (fixed) + scrollable body + footer (fixed) */
.ppa-speak-up-has-feedback .ppa-speak-up-modal-content {
	padding: 0;
	align-items: stretch;
}
.ppa-speak-up-has-feedback .ppa-speak-up-modal-content .ppa-speak-up-feedback-layout {
	overflow-x: hidden;
}
.ppa-speak-up-has-feedback .ppa-speak-up-modal-close {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	margin-left: 0;
	z-index: 2;
}
.ppa-speak-up-has-feedback .ppa-speak-up-modal-title {
	flex-shrink: 0;
	font-size: 1.1rem;
	margin: 0;
	padding: clamp(0.5rem, 2vw, 0.75rem) clamp(1rem, 3vw, 1.5rem) 0.5rem 2.75rem;
}
.ppa-speak-up-has-feedback .ppa-speak-up-modal-body {
	display: block;
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	padding: 0 clamp(1rem, 3vw, 1.5rem);
}
.ppa-speak-up-has-feedback .ppa-speak-up-modal-content .ppa-speak-up-feedback-layout {
	flex: none;
	min-height: 0;
	padding-bottom: 0.5rem;
}
.ppa-speak-up-has-feedback .ppa-speak-up-modal-actions {
	flex-shrink: 0;
	padding: clamp(0.5rem, 2vw, 0.75rem) clamp(1rem, 3vw, 1.5rem) clamp(0.75rem, 2.5vw, 1rem);
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(0, 0, 0, 0.15);
}
/* Wireframe: optional "What we heard", then 3 rows [square score | content], then full-width audio, then buttons */
.ppa-speak-up-feedback-transcript {
	margin-bottom: 0.25rem;
	padding: 0.4rem 0.5rem;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 6px;
	font-size: 0.9rem;
}
.ppa-speak-up-feedback-transcript-label {
	color: rgba(255, 255, 255, 0.7);
	margin-right: 0.35rem;
}
.ppa-speak-up-feedback-transcript-text {
	color: #e2e8f0;
	font-style: italic;
}
.ppa-speak-up-feedback-raw-scores {
	margin-bottom: 0.2rem;
	padding: 0.3rem 0.5rem;
	font-size: 0.8rem;
	color: rgba(255, 255, 255, 0.6);
	background: rgba(0, 0, 0, 0.2);
	border-radius: 4px;
}
.ppa-speak-up-feedback-layout {
	display: flex;
	flex-direction: column;
	gap: clamp(0.35rem, 1.5vw, 0.65rem);
	width: 100%;
	min-width: 0;
}
/* Compact feedback layout on short viewports */
@media (max-height: 700px) {
	.ppa-speak-up-has-feedback .ppa-speak-up-modal-content {
		max-height: min(95vh, calc(100% - 0.5rem));
	}
	.ppa-speak-up-has-feedback .ppa-speak-up-modal-title {
		font-size: 1rem;
		padding-top: 0.4rem;
		padding-bottom: 0.35rem;
	}
	.ppa-speak-up-has-feedback .ppa-speak-up-modal-body {
		padding-left: clamp(0.75rem, 2.5vw, 1rem);
		padding-right: clamp(0.75rem, 2.5vw, 1rem);
	}
	.ppa-speak-up-feedback-layout {
		gap: 0.4rem;
	}
	.ppa-speak-up-feedback-row-pair {
		gap: 0.4rem;
	}
	.ppa-speak-up-feedback-box {
		padding: 0.4rem 0.5rem;
		gap: 0.25rem;
	}
	.ppa-speak-up-feedback-box-title {
		font-size: 0.8rem;
	}
	.ppa-speak-up-feedback-box-content {
		font-size: 0.75rem;
		line-height: 1.4;
	}
	.ppa-speak-up-feedback-score-cell {
		width: clamp(44px, 12vw, 60px);
		min-width: 44px;
	}
	.ppa-speak-up-feedback-audio-block {
		margin-top: 0.35rem;
	}
	.ppa-speak-up-has-feedback .ppa-speak-up-modal-actions {
		padding: 0.5rem clamp(0.75rem, 2.5vw, 1rem);
	}
}
@media (max-height: 500px) {
	.ppa-speak-up-feedback-layout {
		gap: 0.25rem;
	}
	.ppa-speak-up-feedback-box {
		padding: 0.3rem 0.45rem;
	}
	.ppa-speak-up-feedback-box-title {
		font-size: 0.75rem;
	}
	.ppa-speak-up-feedback-box-content {
		font-size: 0.7rem;
	}
	.ppa-speak-up-feedback-score-cell {
		width: 40px;
		min-width: 40px;
	}
}
.ppa-speak-up-feedback-row {
	display: flex;
	align-items: stretch;
	min-width: 0;
	flex: 0 0 auto;
}
.ppa-speak-up-feedback-row-pair {
	display: flex;
	align-items: stretch;
	gap: clamp(0.35rem, 1.5vw, 0.75rem);
	width: 100%;
	min-width: 0;
}
.ppa-speak-up-feedback-row-pair .ppa-speak-up-feedback-box {
	flex: 1;
	min-width: 0;
}
/* Small square score cell – fixed size so it never overflows on small screens */
.ppa-speak-up-feedback-score-cell {
	flex-shrink: 0;
	width: clamp(44px, 12vw, 64px);
	min-width: 44px;
	aspect-ratio: 1;
}
.ppa-speak-up-feedback-score-cell .ppa-speak-up-score-card {
	width: 100%;
	height: 100%;
	min-height: 0;
}
/* Full-width audio block below the three rows (wireframe template) */
.ppa-speak-up-feedback-audio-block {
	flex-shrink: 0;
	width: 100%;
	min-width: 0;
	margin-top: clamp(0.35rem, 1.5vw, 0.5rem);
	margin-bottom: 0;
}
.ppa-speak-up-feedback-audio-block .ppa-lp-audio-ui {
	max-width: 100%;
}
.ppa-speak-up-feedback-audio-block .ppa-lp-audio-time {
	flex-shrink: 0;
	font-size: clamp(0.7rem, 2vw, 0.875rem);
}
.ppa-speak-up-feedback-box {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	padding: clamp(0.5rem, 2.5vw, 1rem) clamp(0.6rem, 3vw, 1.25rem);
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	overflow: hidden;
	flex-shrink: 0;
}
.ppa-speak-up-feedback-box-title {
	font-weight: 700;
	font-size: clamp(0.8rem, 2.2vw, 0.9375rem);
	color: #e2e8f0;
	flex-shrink: 0;
}
.ppa-speak-up-feedback-box-content {
	font-size: clamp(0.75rem, 2vw, 0.875rem);
	line-height: 1.5;
	color: #cbd5e1;
	overflow-wrap: break-word;
	word-wrap: break-word;
	min-width: 0;
}
.ppa-speak-up-feedback-sub {
	display: block;
	font-weight: 600;
	color: #94a3b8;
	margin-bottom: 0.35rem;
}
.ppa-speak-up-feedback-words {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.25rem;
}
.ppa-speak-up-feedback-word {
	display: inline-block;
	padding: 0.25rem 0.6rem;
	background: rgba(99, 102, 241, 0.25);
	border-radius: 6px;
	font-weight: 600;
}
.ppa-speak-up-feedback-word-clickable {
	border: none;
	cursor: pointer;
	font-family: inherit;
	font-size: inherit;
	color: inherit;
	transition: background 0.15s;
}
.ppa-speak-up-feedback-word-clickable:hover {
	background: rgba(99, 102, 241, 0.4);
}
.ppa-speak-up-feedback-word-clickable:disabled {
	cursor: wait;
	opacity: 0.7;
}
.ppa-speak-up-feedback-empty {
	color: #64748b;
	font-style: italic;
}
.ppa-speak-up-feedback-hint {
	font-weight: 400;
	color: #64748b;
	font-size: 0.9em;
}
.ppa-speak-up-feedback-global-text {
	margin: 0 0 0.75rem;
}
/* All rows: title full-width, then score card + content share same height and base */
.ppa-speak-up-feedback-box-pronunciation,
.ppa-speak-up-feedback-box-intonation,
.ppa-speak-up-feedback-box-global {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}
.ppa-speak-up-row-title {
	display: block;
}
.ppa-speak-up-feedback-body,
.ppa-speak-up-feedback-global-body {
	display: flex;
	align-items: stretch;
	gap: 1rem;
	min-height: 0;
}
.ppa-speak-up-feedback-body .ppa-speak-up-feedback-box-content,
.ppa-speak-up-feedback-global-body .ppa-speak-up-feedback-box-content {
	flex: 1;
	min-width: 0;
}
.ppa-speak-up-feedback-layout .ppa-speak-up-audio-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	width: 100%;
	max-width: 100%;
}
.ppa-speak-up-feedback-score-cell.ppa-speak-up-score-global-cell .ppa-speak-up-score-card {
	background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(20, 184, 166, 0.2) 100%);
	border-color: rgba(99, 102, 241, 0.4);
}
/* Speak Up audio: match Listening design (light green, teal) */
.ppa-speak-up-review-audio-wrap.ppa-lp-audio-wrap,
.ppa-speak-up-audio-row.ppa-lp-audio-wrap {
	padding: clamp(0.5rem, 2.5vw, 1rem) clamp(0.6rem, 3vw, 1.25rem);
	background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
	border: 2px solid rgba(13, 148, 136, 0.3);
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(13, 148, 136, 0.1);
}
.ppa-speak-up-review-audio-wrap.ppa-lp-audio-wrap .ppa-lp-audio-time,
.ppa-speak-up-audio-row.ppa-lp-audio-wrap .ppa-lp-audio-time {
	color: #64748b;
}
.ppa-speak-up-scores {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	order: 3;
	margin-top: 0.25rem;
	padding-top: 1rem;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.ppa-speak-up-score-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 0;
	min-height: 0;
	padding: 0.35em 0.5em;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	position: relative;
	overflow: hidden;
}
.ppa-speak-up-feedback-score-cell .ppa-speak-up-score-card {
	border-radius: clamp(6px, 1.5vw, 10px);
	padding: clamp(0.2em, 1vw, 0.35em) clamp(0.25em, 1.2vw, 0.4em);
}
.ppa-speak-up-score-meter {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: rgba(255, 255, 255, 0.2);
}
.ppa-speak-up-score-meter::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: var(--pct, 0%);
	height: 100%;
	background: linear-gradient(90deg, #6366f1 0%, #14b8a6 100%);
	border-radius: 0 2px 2px 0;
	transition: width 0.4s ease;
}
/* Score label: scale dynamically so "Pronunciation", "Intonation", "Global Score" fit without truncation */
.ppa-speak-up-score-label {
	font-size: clamp(0.45rem, 1.5vw, 0.6rem);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: #94a3b8;
	margin-bottom: 0.25rem;
	line-height: 1.15;
	word-wrap: break-word;
	overflow-wrap: break-word;
	white-space: normal;
	max-width: 100%;
	text-align: center;
}
.ppa-speak-up-score-val {
	font-size: clamp(0.75rem, 3.5vw, 1.1rem);
	font-weight: 700;
	color: #e2e8f0;
	line-height: 1.2;
}
.ppa-speak-up-score-max {
	font-size: clamp(0.5rem, 2vw, 0.75rem);
	color: #64748b;
	margin-left: 0.1em;
}
.ppa-speak-up-feedback-score-cell .ppa-speak-up-score-label {
	font-size: clamp(0.4rem, 1.8vw, 0.55rem);
	margin-bottom: 0.15rem;
}
.ppa-speak-up-score-global-num {
	font-size: 1.5rem;
	font-weight: 800;
	color: #fff;
}
.ppa-speak-up-feedback-audio {
	height: 36px;
	min-width: 200px;
	flex-shrink: 0;
}
.ppa-speak-up-play-btn {
	padding: 0.4rem 1rem;
	background: #14b8a6;
	color: #fff;
	border: none;
	font-size: 0.9375rem;
	font-weight: 600;
	border-radius: 6px;
	cursor: pointer;
	display: inline-block;
}
.ppa-speak-up-play-btn:hover {
	background: #0d9488;
}
/* Review step: instruction + audio, then Get feedback & Cancel at bottom */
.ppa-speak-up-has-review .ppa-speak-up-modal-content {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: stretch;
	padding: 1.25rem clamp(1rem, 4vw, 2rem);
	gap: 1rem;
	overflow: visible;
	max-width: min(1000px, calc(100vw - 2rem));
}
.ppa-speak-up-has-review .ppa-speak-up-modal-close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	margin-left: 0;
}
.ppa-speak-up-has-review .ppa-speak-up-modal-title {
	flex-shrink: 0;
	font-size: 1.0625rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 0;
	padding: 0.625rem 2.5rem 0.625rem 1.25rem;
	text-align: center;
	background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
	color: #fff !important;
	border-radius: 10px;
	box-shadow: 0 2px 12px rgba(20, 184, 166, 0.35);
}
.ppa-speak-up-has-review .ppa-speak-up-modal-body {
	flex: 1 1 auto;
	min-height: 0;
	flex-direction: column;
	align-items: stretch;
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
}
/* Pic2: row1 = instruction, row2 = audio (left) | buttons (right); right column wider so button aligns with audio and isn’t cut off */
.ppa-speak-up-review-layout {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(140px, 1.5fr);
	grid-template-rows: auto auto;
	gap: 1rem;
	align-items: start;
	width: 100%;
	min-width: 0;
}
.ppa-speak-up-review-left {
	grid-column: 1;
	grid-row: 1 / -1;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	min-width: 0;
	padding: 1rem 1.25rem;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	justify-content: flex-start;
}
.ppa-speak-up-review-text .ppa-speak-up-instruction {
	font-size: 1rem;
	font-weight: 600;
	margin: 0;
}
.ppa-speak-up-review-text .ppa-speak-up-playback-hint {
	margin-top: 0.35rem;
}
/* Review audio: same look as Listening (light green gradient, teal) */
.ppa-speak-up-review-audio-wrap {
	margin: 0;
	padding: 1rem 1.25rem;
	background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
	border: 2px solid rgba(13, 148, 136, 0.3);
	border-radius: var(--ppa-lp-radius, 12px);
	box-shadow: 0 1px 3px rgba(13, 148, 136, 0.1);
}
.ppa-speak-up-recording-audio {
	width: 100%;
	height: 44px;
	min-height: 44px;
	accent-color: #14b8a6;
}
.ppa-speak-up-recording-audio::-webkit-media-controls-panel {
	background: transparent;
}
/* Right column row 2: Get feedback + Cancel; slightly narrow so both are fully visible */
.ppa-speak-up-review-actions {
	grid-column: 2;
	grid-row: 2;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	align-items: stretch;
	justify-content: flex-start;
	margin: 0;
	align-self: end;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
	padding-right: 0.5rem;
}
.ppa-speak-up-review-actions .ppa-speak-up-get-feedback-btn,
.ppa-speak-up-review-actions .ppa-speak-up-review-cancel-btn {
	max-width: 100%;
	box-sizing: border-box;
}
.ppa-speak-up-review-cancel-btn {
	width: calc(100% - 0.25rem);
	max-width: 100%;
	box-sizing: border-box;
	padding: 0.5rem 1.25rem;
	font-size: 0.9375rem;
	font-weight: 600;
	border-radius: 8px;
	cursor: pointer;
	background: transparent;
	color: #94a3b8 !important;
	border: 2px solid #475569;
	transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.ppa-speak-up-review-cancel-btn:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #e2e8f0 !important;
	border-color: #64748b;
}

/* Mobile only: rebuild Get feedback (Review) popup – single column, no grid */
@media (max-width: 639px) {
	.ppa-speak-up-has-review .ppa-speak-up-modal-content {
		padding: 0.75rem 1rem 1rem;
		max-height: min(92vh, calc(100% - 0.5rem));
	}
	.ppa-speak-up-has-review .ppa-speak-up-modal-title {
		padding: 0.5rem 2.25rem 0.5rem 1rem;
		font-size: 1rem;
	}
	.ppa-speak-up-has-review .ppa-speak-up-modal-body {
		padding: 0 0 0.5rem;
	}
	/* Single-column stack: instruction → audio → GET FEEDBACK → CANCEL */
	.ppa-speak-up-has-review .ppa-speak-up-review-layout {
		display: flex;
		flex-direction: column;
		gap: 1rem;
		width: 100%;
		min-width: 0;
		grid-template-columns: unset;
		grid-template-rows: unset;
	}
	.ppa-speak-up-has-review .ppa-speak-up-review-left {
		grid-column: unset;
		grid-row: unset;
		width: 100%;
		min-width: 0;
		order: 1;
		padding: 0.875rem 1rem;
		gap: 0.75rem;
	}
	.ppa-speak-up-has-review .ppa-speak-up-review-text .ppa-speak-up-instruction {
		font-size: 0.9375rem;
	}
	.ppa-speak-up-has-review .ppa-speak-up-review-text .ppa-speak-up-playback-hint {
		font-size: 0.8125rem;
		margin-top: 0.25rem;
	}
	.ppa-speak-up-has-review .ppa-speak-up-review-audio-wrap {
		padding: 0.75rem 1rem;
		width: 100%;
		min-width: 0;
	}
	.ppa-speak-up-has-review .ppa-speak-up-review-actions {
		grid-column: unset;
		grid-row: unset;
		align-self: stretch;
		width: 100%;
		min-width: 0;
		order: 2;
		flex-direction: column;
		gap: 0.75rem;
		justify-content: flex-start;
		padding: 0;
		padding-right: 0;
	}
	.ppa-speak-up-has-review .ppa-speak-up-review-actions .ppa-speak-up-get-feedback-btn,
	.ppa-speak-up-has-review .ppa-speak-up-review-actions .ppa-speak-up-review-cancel-btn {
		width: 100%;
		max-width: 100%;
		min-height: 48px;
	}
	.ppa-speak-up-has-review .ppa-speak-up-get-feedback-btn {
		height: 48px;
		min-height: 48px;
	}
}

.ppa-speak-up-play-recording-btn {
	background: #0ea5e9;
}
.ppa-speak-up-play-recording-btn:hover {
	background: #0284c7;
}
/* Teal design; slightly narrow so fully visible inside modal */
.ppa-speak-up-get-feedback-btn {
	position: relative;
	overflow: visible;
	width: calc(100% - 0.25rem);
	max-width: 100%;
	height: 52px;
	min-height: 52px;
	padding: 0 1.25rem;
	font-size: 1rem;
	font-weight: 600;
	color: #fff !important;
	background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%) !important;
	background-color: #14b8a6 !important;
	box-shadow: 0 2px 12px rgba(20, 184, 166, 0.35);
	border: none;
	border-radius: 12px;
	transition: transform 0.15s, box-shadow 0.2s;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
}
.ppa-speak-up-get-feedback-btn::before {
	content: '';
	position: absolute;
	inset: -4px;
	border-radius: 14px;
	background: transparent;
	pointer-events: none;
	animation: ppa-pulse-yellow 1.5s ease-in-out infinite;
}
.ppa-speak-up-get-feedback-btn:hover {
	background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%) !important;
	transform: translateY(-1px);
	box-shadow: 0 4px 16px rgba(20, 184, 166, 0.4);
}
.ppa-speak-up-modal-actions {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}
/* Two bottom buttons: Keep Practicing + Done, always at bottom of modal */
.ppa-speak-up-has-feedback .ppa-speak-up-modal-actions {
	display: flex;
	justify-content: stretch;
	align-items: stretch;
	gap: clamp(0.5rem, 2vw, 0.75rem);
	width: 100%;
	margin: 0;
}
.ppa-speak-up-has-feedback .ppa-speak-up-keep-practicing-btn {
	flex: 1.6;
	min-width: 0;
	max-width: 60%;
}
.ppa-speak-up-has-feedback #ppa-speak-up-modal-done {
	flex: 1;
	min-width: 0;
	max-width: 40%;
}
.ppa-speak-up-modal-btn {
	padding: 0.5rem 1.25rem;
	font-size: 0.9375rem;
	font-weight: 600;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s, color 0.2s;
}
/* Done = primary teal when in feedback; Cancel = secondary when in review/start */
#ppa-speak-up-modal-done {
	background: #14b8a6;
	color: #fff !important;
	border: 2px solid transparent;
}
#ppa-speak-up-modal-done:hover {
	background: #0d9488;
	color: #fff !important;
}
/* modal-done (Cancel) hidden in review – Cancel lives in review-actions */
.ppa-speak-up-keep-practicing-btn {
	background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
	color: #fff !important;
	border: none;
}
.ppa-speak-up-keep-practicing-btn:hover {
	background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
	color: #fff !important;
}
.ppa-speak-up-spinner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
}
.ppa-speak-up-spinner-dot {
	width: 8px;
	height: 8px;
	background: #94a3b8;
	border-radius: 50%;
	animation: ppa-speak-up-bounce 1.4s ease-in-out infinite both;
}
.ppa-speak-up-spinner-dot:nth-child(1) { animation-delay: -0.32s; }
.ppa-speak-up-spinner-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes ppa-speak-up-bounce {
	0%, 80%, 100% { transform: scale(0); }
	40% { transform: scale(1); }
}

@media (min-width: 640px) {
	.ppa-lp {
		padding: 0 1.5rem;
	}
	.ppa-lp-section {
		padding: 2rem;
	}
}
