/* ==========================================================================
   ASTRA AI x MINIMI DESIGN SYSTEM
   Soft, cozy, modern, minimalist, aesthetic, friendly, mobile-first
   ========================================================================== */

:root {
	color-scheme: light;
	--font-sans: "Nunito", -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "Quicksand", "Segoe UI", Roboto, sans-serif;
	
	/* Palette Minimi Aesthetic */
	--bg-canvas: #FAF8F5;
	--bg-card: #FFFFFF;
	--bg-subtle: #F5F1EA;
	--bg-active: #EFE8DE;

	--text-main: #2D2727;
	--text-muted: #7E7272;
	--text-light: #A89F9F;
	--text-on-accent: #FFFFFF;

	/* Default Pastels */
	--pink-soft: #FFF0F4;
	--pink-tint: #FFE3EC;
	--pink-main: #FF7B9C;
	--pink-deep: #E85D81;
	--pink-shadow: rgba(255, 123, 156, 0.22);

	--sage-soft: #EEF7F2;
	--sage-tint: #D6EFE0;
	--sage-main: #4EA37E;
	--sage-shadow: rgba(78, 163, 126, 0.2);

	--lavender-soft: #F4F0FF;
	--lavender-tint: #E5DCFF;
	--lavender-main: #8C62FF;
	--lavender-shadow: rgba(140, 98, 255, 0.2);

	--butter-soft: #FEF9EB;
	--butter-tint: #FEE7B8;
	--butter-main: #D97706;
	--butter-shadow: rgba(217, 119, 6, 0.2);

	--sky-soft: #EFF6FF;
	--sky-tint: #DBEAFE;
	--sky-main: #2563EB;
	--sky-shadow: rgba(37, 99, 235, 0.2);

	--coral-soft: #FFE4E6;
	--coral-tint: #FECDD3;
	--coral-main: #E11D48;

	--stone-soft: #F5F5F4;
	--stone-tint: #E7E5E4;
	--stone-main: #57534E;

	--border-light: rgba(230, 220, 210, 0.7);
	--border-card: rgba(235, 226, 218, 0.85);

	/* Elevation */
	--shadow-sm: 0 2px 8px rgba(90, 70, 60, 0.04);
	--shadow-card: 0 6px 20px rgba(100, 75, 70, 0.06);
	--shadow-float: 0 12px 36px rgba(100, 75, 70, 0.12);
	--shadow-glow-pink: 0 8px 24px var(--pink-shadow);

	/* Radius */
	--radius-sm: 14px;
	--radius-md: 20px;
	--radius-lg: 28px;
	--radius-xl: 36px;
	--radius-pill: 9999px;

	--safe-bottom: env(safe-area-inset-bottom, 16px);
}

/* Dynamic Subject Style Themes */
.subject-theme-nature {
	--sub-color: #4EA37E;
	--sub-bg-soft: #EEF7F2;
	--sub-border: #D6EFE0;
	--sub-shadow: rgba(78, 163, 126, 0.2);
}

.subject-theme-math {
	--sub-color: #FF7B9C;
	--sub-bg-soft: #FFF0F4;
	--sub-border: #FFE3EC;
	--sub-shadow: rgba(255, 123, 156, 0.22);
}

.subject-theme-history {
	--sub-color: #D97706;
	--sub-bg-soft: #FEF9EB;
	--sub-border: #FEE7B8;
	--sub-shadow: rgba(217, 119, 6, 0.2);
}

.subject-theme-language {
	--sub-color: #8C62FF;
	--sub-bg-soft: #F4F0FF;
	--sub-border: #E5DCFF;
	--sub-shadow: rgba(140, 98, 255, 0.2);
}

.subject-theme-tech {
	--sub-color: #2563EB;
	--sub-bg-soft: #EFF6FF;
	--sub-border: #DBEAFE;
	--sub-shadow: rgba(37, 99, 235, 0.2);
}

.subject-theme-creative {
	--sub-color: #E11D48;
	--sub-bg-soft: #FFE4E6;
	--sub-border: #FECDD3;
	--sub-shadow: rgba(225, 29, 72, 0.2);
}

.subject-theme-minimal {
	--sub-color: #57534E;
	--sub-bg-soft: #F5F5F4;
	--sub-border: #E7E5E4;
	--sub-shadow: rgba(87, 83, 78, 0.15);
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	-webkit-tap-highlight-color: transparent;
}

body {
	background-color: #EFE9E0;
	color: var(--text-main);
	font-family: var(--font-sans);
	line-height: 1.45;
	-webkit-font-smoothing: antialiased;
	min-height: 100vh;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding: 0;
}

/* Mobile Frame Shell */
.astra-viewport-wrapper {
	width: 100%;
	max-width: 480px;
	min-height: 100vh;
	background: var(--bg-canvas);
	box-shadow: 0 0 60px rgba(0, 0, 0, 0.08);
	display: flex;
	flex-direction: column;
	position: relative;
	overflow-x: hidden;
}

@media (min-width: 520px) {
	.astra-viewport-wrapper {
		margin: 20px auto;
		border-radius: 40px;
		min-height: calc(100vh - 40px);
		max-height: 920px;
		border: 8px solid #FFFFFF;
		box-shadow: 0 20px 60px rgba(90, 70, 60, 0.15);
		overflow-y: auto;
	}
}

/* Header */
.astra-header {
	position: sticky;
	top: 0;
	z-index: 40;
	background: rgba(250, 248, 245, 0.92);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	padding: 12px 18px 10px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid var(--border-light);
}

.header-brand {
	display: flex;
	align-items: center;
	gap: 10px;
}

.astra-avatar-mini {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: linear-gradient(135deg, #FFE3EC 0%, #FFB6C8 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	box-shadow: var(--shadow-glow-pink);
	position: relative;
}

.astra-avatar-mini .online-dot {
	position: absolute;
	bottom: 0;
	right: 0;
	width: 10px;
	height: 10px;
	background: #10B981;
	border-radius: 50%;
	border: 2px solid #FFFFFF;
}

.header-title-group h1 {
	font-size: 1.15rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--text-main);
	display: flex;
	align-items: center;
	gap: 6px;
}

.header-title-group .sub {
	font-size: 0.72rem;
	color: var(--text-muted);
	font-weight: 600;
}

.header-status-pills {
	display: flex;
	align-items: center;
	gap: 6px;
}

.pill-status {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 5px 10px;
	border-radius: var(--radius-pill);
	font-size: 0.75rem;
	font-weight: 700;
	background: var(--bg-card);
	border: 1px solid var(--border-card);
	color: var(--text-main);
	box-shadow: var(--shadow-sm);
	cursor: pointer;
	transition: all 0.2s ease;
}

.pill-status:hover {
	transform: translateY(-1px);
}

.pill-status.streak {
	background: var(--butter-soft);
	color: var(--butter-main);
	border-color: var(--butter-tint);
}

.pill-status.sick {
	background: #FEE2E2;
	color: #DC2626;
	border-color: #FECACA;
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.7; }
}

/* App Main Container */
.app-content {
	flex: 1;
	padding: 16px 18px 100px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Bottom Navigation */
.astra-bottom-nav {
	position: fixed;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 100%;
	max-width: 480px;
	background: rgba(255, 255, 255, 0.94);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border-top: 1px solid var(--border-card);
	padding: 8px 12px calc(8px + var(--safe-bottom));
	display: flex;
	justify-content: space-around;
	align-items: center;
	z-index: 50;
}

@media (min-width: 520px) {
	.astra-bottom-nav {
		border-bottom-left-radius: 32px;
		border-bottom-right-radius: 32px;
	}
}

.nav-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	background: none;
	border: none;
	color: var(--text-muted);
	font-family: inherit;
	font-size: 0.68rem;
	font-weight: 700;
	cursor: pointer;
	padding: 6px 8px;
	border-radius: var(--radius-md);
	transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
	position: relative;
}

.nav-item .nav-icon {
	font-size: 1.35rem;
	transition: transform 0.2s ease;
}

.nav-item.active {
	color: var(--pink-main);
}

.nav-item.active .nav-icon {
	transform: scale(1.15) translateY(-2px);
}

.nav-item.active::after {
	content: '';
	position: absolute;
	bottom: 1px;
	width: 14px;
	height: 3px;
	background: var(--pink-main);
	border-radius: 3px;
}

/* Cards Base */
.m-card {
	background: var(--bg-card);
	border-radius: var(--radius-lg);
	padding: 18px;
	border: 1px solid var(--border-card);
	box-shadow: var(--shadow-card);
	display: flex;
	flex-direction: column;
	gap: 12px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	position: relative;
}

.m-card.styled-subject {
	background: linear-gradient(145deg, #FFFFFF 0%, var(--sub-bg-soft) 100%);
	border-color: var(--sub-border);
}

.m-card.styled-subject:hover {
	box-shadow: 0 8px 26px var(--sub-shadow);
}

/* Empty State Minimi Styling */
.cozy-empty-state {
	padding: 36px 20px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	background: linear-gradient(145deg, #FFFFFF 0%, #FAF8F5 100%);
	border-radius: var(--radius-xl);
	border: 2px dashed var(--border-card);
}

.cozy-empty-icon {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--pink-soft);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	box-shadow: var(--shadow-sm);
}

.cozy-empty-title {
	font-size: 1.05rem;
	font-weight: 800;
	color: var(--text-main);
}

.cozy-empty-desc {
	font-size: 0.82rem;
	color: var(--text-muted);
	max-width: 280px;
	line-height: 1.45;
}

/* Astra Greeting Banner */
.astra-mood-banner {
	background: linear-gradient(135deg, #FFF0F4 0%, #FFF8FA 60%, #F5F0FF 100%);
	border-radius: var(--radius-xl);
	padding: 18px 20px;
	border: 1px solid rgba(255, 200, 220, 0.5);
	box-shadow: 0 8px 24px rgba(255, 123, 156, 0.1);
	position: relative;
	overflow: hidden;
}

.mood-banner-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 8px;
}

.mood-banner-avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #FFFFFF;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 26px;
	box-shadow: 0 4px 14px rgba(255, 123, 156, 0.25);
	flex-shrink: 0;
	border: 2px solid #FFE3EC;
}

.mood-banner-text {
	font-size: 0.94rem;
	color: var(--text-main);
	font-weight: 700;
	line-height: 1.4;
}

.mood-energy-selector {
	margin-top: 12px;
	display: flex;
	background: rgba(255, 255, 255, 0.7);
	padding: 4px;
	border-radius: var(--radius-pill);
	gap: 4px;
	border: 1px solid rgba(255, 200, 220, 0.6);
}

.energy-btn {
	flex: 1;
	border: none;
	background: transparent;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--text-muted);
	padding: 6px 8px;
	border-radius: var(--radius-pill);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	transition: all 0.2s ease;
	font-family: inherit;
}

.energy-btn.active {
	background: #FFFFFF;
	color: var(--pink-deep);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Quick Action Tiles */
.quick-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}

.quick-tile {
	background: var(--bg-card);
	border: 1px solid var(--border-card);
	border-radius: var(--radius-lg);
	padding: 14px 16px;
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	box-shadow: var(--shadow-sm);
	transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
	text-align: left;
	font-family: inherit;
}

.quick-tile:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-card);
}

.quick-tile.pink { background: var(--pink-soft); border-color: var(--pink-tint); }
.quick-tile.sage { background: var(--sage-soft); border-color: var(--sage-tint); }
.quick-tile.lavender { background: var(--lavender-soft); border-color: var(--lavender-tint); }
.quick-tile.butter { background: var(--butter-soft); border-color: var(--butter-tint); }

.quick-tile-icon {
	width: 40px;
	height: 40px;
	border-radius: 14px;
	background: #FFFFFF;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
	flex-shrink: 0;
}

.quick-tile-info h4 {
	font-size: 0.85rem;
	font-weight: 800;
	color: var(--text-main);
	margin-bottom: 2px;
}

.quick-tile-info p {
	font-size: 0.72rem;
	color: var(--text-muted);
}

/* Section Header */
.section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 6px;
}

.section-head h2 {
	font-size: 1.05rem;
	font-weight: 800;
	color: var(--text-main);
	display: flex;
	align-items: center;
	gap: 6px;
}

.section-head .action-link {
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--pink-main);
	cursor: pointer;
	background: none;
	border: none;
	font-family: inherit;
}

/* Badge & Tag */
.m-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 10px;
	border-radius: var(--radius-pill);
	font-size: 0.72rem;
	font-weight: 700;
	width: fit-content;
}

.m-badge.pink { background: var(--pink-soft); color: var(--pink-deep); }
.m-badge.sage { background: var(--sage-soft); color: var(--sage-main); }
.m-badge.lavender { background: var(--lavender-soft); color: var(--lavender-main); }
.m-badge.butter { background: var(--butter-soft); color: var(--butter-main); }
.m-badge.sky { background: var(--sky-soft); color: var(--sky-main); }
.m-badge.coral { background: var(--coral-soft); color: var(--coral-main); }
.m-badge.stone { background: var(--stone-soft); color: var(--stone-main); }

/* Buttons Minimi Style */
.m-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 18px;
	border-radius: var(--radius-pill);
	border: none;
	background: var(--pink-main);
	color: #FFFFFF;
	font-family: inherit;
	font-size: 0.88rem;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 4px 16px var(--pink-shadow);
	transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
	text-decoration: none;
}

.m-btn:hover {
	transform: translateY(-2px);
	filter: brightness(1.04);
}

.m-btn:active {
	transform: translateY(0);
}

.m-btn.secondary {
	background: var(--bg-card);
	color: var(--text-main);
	border: 1px solid var(--border-card);
	box-shadow: var(--shadow-sm);
}

.m-btn.secondary:hover {
	background: var(--bg-subtle);
}

.m-btn.danger {
	background: #FEE2E2;
	color: #DC2626;
	border: 1px solid #FECACA;
	box-shadow: none;
}

.m-btn.danger:hover {
	background: #FCA5A5;
	color: #991B1B;
}

.m-btn.sage {
	background: var(--sage-main);
	box-shadow: 0 4px 16px var(--sage-shadow);
}

.m-btn.lavender {
	background: var(--lavender-main);
	box-shadow: 0 4px 16px var(--lavender-shadow);
}

.m-btn.sm {
	padding: 6px 12px;
	font-size: 0.76rem;
}

/* Style Selector Chips */
.style-picker-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	gap: 8px;
	margin: 8px 0;
}

.style-chip-card {
	padding: 10px 12px;
	border-radius: var(--radius-md);
	border: 2px solid var(--border-card);
	background: #FFFFFF;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.78rem;
	font-weight: 700;
	transition: all 0.2s ease;
}

.style-chip-card:hover {
	transform: translateY(-1px);
}

.style-chip-card.selected {
	border-color: var(--sub-color, var(--pink-main));
	background: var(--sub-bg-soft, var(--pink-soft));
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Chat Styles */
.chat-container {
	display: flex;
	flex-direction: column;
	height: calc(100vh - 160px);
	max-height: 720px;
}

.chat-messages-scroll {
	flex: 1;
	overflow-y: auto;
	padding: 10px 4px 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.chat-bubble {
	max-width: 85%;
	padding: 12px 16px;
	border-radius: 22px;
	font-size: 0.92rem;
	line-height: 1.45;
	position: relative;
	animation: popIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
	from { opacity: 0; transform: translateY(8px) scale(0.96); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-bubble.astra {
	align-self: flex-start;
	background: #FFFFFF;
	color: var(--text-main);
	border-bottom-left-radius: 6px;
	border: 1px solid var(--border-card);
	box-shadow: var(--shadow-sm);
}

.chat-bubble.user {
	align-self: flex-end;
	background: var(--pink-main);
	color: #FFFFFF;
	border-bottom-right-radius: 6px;
	box-shadow: 0 4px 14px var(--pink-shadow);
}

.chat-bubble .msg-time {
	font-size: 0.65rem;
	margin-top: 4px;
	opacity: 0.7;
	text-align: right;
}

.chat-quick-actions {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding: 6px 2px 10px;
	scrollbar-width: none;
}

.chat-quick-actions::-webkit-scrollbar {
	display: none;
}

.chat-chip {
	white-space: nowrap;
	padding: 6px 14px;
	border-radius: var(--radius-pill);
	background: var(--bg-card);
	border: 1px solid var(--border-card);
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--text-main);
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: inherit;
}

.chat-chip:hover {
	background: var(--pink-soft);
	border-color: var(--pink-tint);
	color: var(--pink-deep);
}

.chat-input-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #FFFFFF;
	border-radius: var(--radius-pill);
	padding: 6px 8px 6px 16px;
	border: 1px solid var(--border-card);
	box-shadow: var(--shadow-card);
}

.chat-input-bar input {
	flex: 1;
	border: none;
	background: transparent;
	font-family: inherit;
	font-size: 0.9rem;
	color: var(--text-main);
	outline: none;
}

.chat-input-bar button {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: none;
	background: var(--pink-main);
	color: #FFFFFF;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	cursor: pointer;
	box-shadow: 0 2px 8px var(--pink-shadow);
	transition: transform 0.2s ease;
}

.chat-input-bar button:hover {
	transform: scale(1.08);
}

/* Flashcard 3D Card */
.flashcard-wrapper {
	perspective: 1000px;
	width: 100%;
	height: 280px;
	cursor: pointer;
}

.flashcard-inner {
	position: relative;
	width: 100%;
	height: 100%;
	text-align: center;
	transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
	transform-style: preserve-3d;
	border-radius: var(--radius-xl);
}

.flashcard-inner.flipped {
	transform: rotateY(180deg);
}

.flashcard-front, .flashcard-back {
	position: absolute;
	width: 100%;
	height: 100%;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	border-radius: var(--radius-xl);
	padding: 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	border: 1px solid var(--border-card);
	box-shadow: var(--shadow-float);
}

.flashcard-front {
	background: linear-gradient(145deg, #FFFFFF 0%, #FFF5F7 100%);
	color: var(--text-main);
}

.flashcard-back {
	background: linear-gradient(145deg, #FFF0F4 0%, #FFE5ED 100%);
	color: var(--text-main);
	transform: rotateY(180deg);
}

.card-question {
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.4;
	margin: auto 0;
}

.card-hint {
	font-size: 0.78rem;
	color: var(--text-muted);
}

/* Slide Deck Presentation Viewer */
.presentation-slide-deck {
	background: #FFFFFF;
	border-radius: var(--radius-xl);
	border: 1px solid var(--border-card);
	box-shadow: var(--shadow-float);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	min-height: 360px;
}

.slide-canvas {
	flex: 1;
	padding: 28px 24px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	position: relative;
	transition: background 0.3s ease;
}

.slide-canvas.pink { background: linear-gradient(145deg, #FFF0F5 0%, #FFFFFF 100%); }
.slide-canvas.sage { background: linear-gradient(145deg, #EEF7F2 0%, #FFFFFF 100%); }
.slide-canvas.lavender { background: linear-gradient(145deg, #F4F0FF 0%, #FFFFFF 100%); }
.slide-canvas.butter { background: linear-gradient(145deg, #FEF9EB 0%, #FFFFFF 100%); }
.slide-canvas.sky { background: linear-gradient(145deg, #EFF6FF 0%, #FFFFFF 100%); }

.slide-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.slide-title-area h3 {
	font-size: 1.28rem;
	font-weight: 800;
	color: var(--text-main);
	margin-top: 8px;
}

.slide-title-area p {
	font-size: 0.82rem;
	color: var(--text-muted);
}

.slide-bullets {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 16px 0;
}

.slide-bullet-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--text-main);
}

.slide-bullet-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--pink-main);
	margin-top: 6px;
	flex-shrink: 0;
}

.slide-diagram-box {
	background: rgba(255, 255, 255, 0.85);
	border: 1px dashed var(--border-card);
	border-radius: var(--radius-md);
	padding: 12px 14px;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--text-muted);
	display: flex;
	align-items: center;
	gap: 8px;
}

.slide-controls-bar {
	padding: 12px 18px;
	background: #FFFFFF;
	border-top: 1px solid var(--border-light);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

/* Audio Player */
.audio-player-card {
	background: linear-gradient(135deg, #FFF0F4 0%, #FFFFFF 100%);
	border-radius: var(--radius-xl);
	padding: 20px;
	border: 1px solid var(--pink-tint);
	box-shadow: var(--shadow-card);
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.podcast-visual-wave {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	height: 48px;
	padding: 0 10px;
}

.wave-bar {
	width: 4px;
	height: 12px;
	background: var(--pink-main);
	border-radius: 4px;
	transition: height 0.2s ease;
}

.wave-bar.animating {
	animation: soundWave 0.8s ease-in-out infinite alternate;
}

@keyframes soundWave {
	0% { height: 8px; }
	100% { height: 38px; }
}

/* Tab Sub-Nav Pill Switcher */
.sub-nav-pills {
	display: flex;
	background: var(--bg-subtle);
	padding: 4px;
	border-radius: var(--radius-pill);
	gap: 4px;
}

.sub-pill-btn {
	flex: 1;
	border: none;
	background: transparent;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--text-muted);
	padding: 8px 12px;
	border-radius: var(--radius-pill);
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: inherit;
	text-align: center;
}

.sub-pill-btn.active {
	background: #FFFFFF;
	color: var(--text-main);
	box-shadow: var(--shadow-sm);
}

/* Modal Overlay */
.m-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(45, 39, 39, 0.45);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	z-index: 100;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

.m-modal-sheet {
	width: 100%;
	max-width: 480px;
	background: #FFFFFF;
	border-top-left-radius: 32px;
	border-top-right-radius: 32px;
	padding: 24px 20px calc(24px + var(--safe-bottom));
	max-height: 88vh;
	overflow-y: auto;
	box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
	animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
	display: flex;
	flex-direction: column;
	gap: 16px;
}

@keyframes slideUp {
	from { transform: translateY(100%); }
	to { transform: translateY(0); }
}

.sheet-handle {
	width: 44px;
	height: 5px;
	background: var(--border-light);
	border-radius: 3px;
	margin: -8px auto 8px;
}

/* Homework OCR Step list */
.hw-step-card {
	padding: 12px 14px;
	border-radius: var(--radius-md);
	border: 1px solid var(--border-light);
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 0.85rem;
}

.hw-step-card.correct {
	background: var(--sage-soft);
	border-color: var(--sage-tint);
}

.hw-step-card.error {
	background: var(--pink-soft);
	border-color: var(--pink-tint);
}

.hw-step-card.derived_error {
	background: var(--butter-soft);
	border-color: var(--butter-tint);
}

/* Custom Checkbox / Radio / Inputs */
.m-input {
	width: 100%;
	padding: 11px 16px;
	border-radius: var(--radius-md);
	border: 1px solid var(--border-card);
	background: var(--bg-card);
	font-family: inherit;
	font-size: 0.9rem;
	color: var(--text-main);
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.m-input:focus {
	border-color: var(--pink-main);
	box-shadow: 0 0 0 3px var(--pink-soft);
}

.m-textarea {
	width: 100%;
	padding: 12px 16px;
	border-radius: var(--radius-md);
	border: 1px solid var(--border-card);
	background: var(--bg-card);
	font-family: inherit;
	font-size: 0.9rem;
	color: var(--text-main);
	outline: none;
	resize: vertical;
	min-height: 80px;
}

.m-textarea:focus {
	border-color: var(--pink-main);
	box-shadow: 0 0 0 3px var(--pink-soft);
}

.stack {
	display: flex;
	flex-direction: column;
}

.row {
	display: flex;
	align-items: center;
}
