/**
 * Tokutei Vocabulary V2 - Flashcard Styles
 * Irodori-inspired Interactive Flashcard Experience
 *
 * @package TokuteiVocabulary
 * @since 2.0.0
 *
 * Note: Uses CSS variables from frontend.css and irodori-table.css
 */

/* ============================================================================
   IRODORI COLOR VARIABLES FOR FLASHCARD
   ============================================================================ */

:root {
	/* Theme colors - default green (will be overridden by lesson themes) */
	--fc-primary: #27AE60;
	--fc-primary-light: #58D68D;
	--fc-primary-dark: #1E8449;
	--fc-primary-pale: #D5F5E3;

	/* Fixed colors */
	--fc-ruby: #E74C3C;
	--fc-hanviet: #6B4C9A;
	--fc-hanviet-bg: #FFFBEB;
	--fc-text: #1A1A1A;
	--fc-text-secondary: #4A4A4A;
	--fc-text-muted: #777777;
	--fc-border: #ADB5BD;
	--fc-bg: #FFFFFF;
	--fc-bg-subtle: #F8F9FA;

	/* Sentence game colors */
	--fc-target-bg: #FFF5F5;
	--fc-target-border: #FFCDD2;
	--fc-chip-selected-bg: #FFFDE7;
	--fc-chip-selected-text: #6B4C9A;
	--fc-chip-selected-border: #FFE082;
	--fc-chip-selected-ruby: #E74C3C;

	/* Progress bar */
	--fc-progress-bg: #E8D5B7;
	--fc-progress-fill: #8B7355;
}

/* ============================================================================
   LESSON THEME COLORS - Irodori inspired
   Each theme provides a complete color palette for the entire interface
   ============================================================================ */

/* Theme 1: Purple (Tím đậm) - Bài 1 */
.tvoc2-theme-purple {
	--fc-primary: #6B4C9A;
	--fc-primary-light: #9575CD;
	--fc-primary-dark: #4A2C7A;
	--fc-primary-pale: #EDE7F6;
	--fc-progress-bg: #E1D5ED;
	--fc-progress-fill: #6B4C9A;
	--fc-sidebar-accent: #6B4C9A;
	--fc-sidebar-accent-pale: #EDE7F6;
}

/* Theme 2: Orange (Cam đậm) - Bài 2 */
.tvoc2-theme-orange {
	--fc-primary: #E67E22;
	--fc-primary-light: #F5A623;
	--fc-primary-dark: #D35400;
	--fc-primary-pale: #FFF3E0;
	--fc-progress-bg: #FFE0B2;
	--fc-progress-fill: #E67E22;
	--fc-sidebar-accent: #E67E22;
	--fc-sidebar-accent-pale: #FFF3E0;
}

/* Theme 3: Navy (Xanh navy đậm) - Bài 3 */
.tvoc2-theme-navy {
	--fc-primary: #34495E;
	--fc-primary-light: #5D6D7E;
	--fc-primary-dark: #2C3E50;
	--fc-primary-pale: #ECEFF1;
	--fc-progress-bg: #CFD8DC;
	--fc-progress-fill: #34495E;
	--fc-sidebar-accent: #34495E;
	--fc-sidebar-accent-pale: #ECEFF1;
}

/* Theme 4: Brown (Nâu đất) - Bài 4 */
.tvoc2-theme-brown {
	--fc-primary: #8B7355;
	--fc-primary-light: #A89078;
	--fc-primary-dark: #5D4E37;
	--fc-primary-pale: #EFEBE9;
	--fc-progress-bg: #D7CCC8;
	--fc-progress-fill: #8B7355;
	--fc-sidebar-accent: #8B7355;
	--fc-sidebar-accent-pale: #EFEBE9;
}

/* Theme 5: Teal (Xanh ngọc) - Bài 5 */
.tvoc2-theme-teal {
	--fc-primary: #00897B;
	--fc-primary-light: #4DB6AC;
	--fc-primary-dark: #00695C;
	--fc-primary-pale: #E0F2F1;
	--fc-progress-bg: #B2DFDB;
	--fc-progress-fill: #00897B;
	--fc-sidebar-accent: #00897B;
	--fc-sidebar-accent-pale: #E0F2F1;
}

/* Theme 6: Green (Xanh lá - default) - Bài 6 */
.tvoc2-theme-green {
	--fc-primary: #27AE60;
	--fc-primary-light: #58D68D;
	--fc-primary-dark: #1E8449;
	--fc-primary-pale: #D5F5E3;
	--fc-progress-bg: #C8E6C9;
	--fc-progress-fill: #27AE60;
	--fc-sidebar-accent: #27AE60;
	--fc-sidebar-accent-pale: #D5F5E3;
}

/* Theme 7: Rose (Hồng đậm) - Bài 7 */
.tvoc2-theme-rose {
	--fc-primary: #C2185B;
	--fc-primary-light: #E91E63;
	--fc-primary-dark: #880E4F;
	--fc-primary-pale: #FCE4EC;
	--fc-progress-bg: #F8BBD9;
	--fc-progress-fill: #C2185B;
	--fc-sidebar-accent: #C2185B;
	--fc-sidebar-accent-pale: #FCE4EC;
}

/* Theme 8: Indigo (Chàm) - Bài 8 */
.tvoc2-theme-indigo {
	--fc-primary: #3F51B5;
	--fc-primary-light: #7986CB;
	--fc-primary-dark: #303F9F;
	--fc-primary-pale: #E8EAF6;
	--fc-progress-bg: #C5CAE9;
	--fc-progress-fill: #3F51B5;
	--fc-sidebar-accent: #3F51B5;
	--fc-sidebar-accent-pale: #E8EAF6;
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes pulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.1); }
}

@keyframes spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(180deg); }
}

@keyframes fadeIn {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
	0% { background-position: -200% 0; }
	100% { background-position: 200% 0; }
}

@keyframes pulse-green {
	0%, 100% {
		box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.4);
	}
	50% {
		box-shadow: 0 0 0 10px rgba(39, 174, 96, 0);
	}
}

/* ============================================================================
   THREE-COLUMN LAYOUT
   ============================================================================ */

.tvoc2-flashcard-layout {
	display: grid;
	grid-template-columns: 280px 1fr 280px;
	gap: 1rem;
	width: 100%;
	max-width: none;
	animation: fadeIn 0.3s ease-out;
}

/* ============================================================================
   LEFT SIDEBAR
   ============================================================================ */

.tvoc2-flashcard-sidebar {
	background: var(--fc-bg);
	border: 2px solid var(--fc-border);
	border-radius: 12px;
	padding: 1rem;
	height: 560px;
	position: sticky;
	top: 100px;
	overflow-y: auto;
	overflow-x: hidden;
}

.tvoc2-sidebar-section {
	margin-bottom: 1rem;
}

.tvoc2-sidebar-title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--fc-text);
	margin: 0 0 0.75rem 0;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--fc-primary, var(--fc-sidebar-accent, #8B7355));
}

.tvoc2-sidebar-title .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: var(--fc-primary, var(--fc-sidebar-accent, #8B7355));
}

/* Vocabulary Progress Grid - Fixed 4 columns for ellipse dots */
.tvoc2-vocab-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
	justify-content: center;
}

.tvoc2-vocab-dot {
	width: 100%;
	height: 36px;
	border-radius: 18px;
	border: 2px solid var(--fc-border);
	background: var(--fc-bg-subtle);
	color: var(--fc-text-muted);
	font-size: 0.75rem;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 0.5rem;
	box-sizing: border-box;
	flex-shrink: 0;
}

.tvoc2-vocab-dot:hover {
	border-color: var(--fc-primary);
	background: var(--fc-primary-pale);
	color: var(--fc-primary-dark);
	transform: scale(1.05);
}

.tvoc2-vocab-dot.is-active {
	border-color: var(--fc-primary);
	background: var(--fc-primary);
	color: white;
	box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.3);
}

/* Status colors */
.tvoc2-vocab-dot[data-status="remembered"] {
	border-color: var(--fc-primary);
	background: var(--fc-primary);
	color: white;
}

.tvoc2-vocab-dot[data-status="forgot"] {
	border-color: #E74C3C;
	background: #E74C3C;
	color: white;
}

.tvoc2-vocab-dot[data-status="pending"] {
	border-color: var(--fc-border);
	background: var(--fc-bg-subtle);
	color: var(--fc-text-muted);
}

/* Current card highlight */
.tvoc2-vocab-dot.is-current {
	box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.4);
	transform: scale(1.05);
}

/* Legend */
.tvoc2-sidebar-legend {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	padding: 0.75rem;
	background: var(--fc-bg-subtle);
	border-radius: 8px;
	margin-bottom: 1rem;
}

.tvoc2-legend-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.75rem;
	color: var(--fc-text-secondary);
}

.tvoc2-legend-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	flex-shrink: 0;
}

.tvoc2-legend-dot--pending {
	background: var(--fc-bg-subtle);
	border: 2px solid var(--fc-border);
}

.tvoc2-legend-dot--remembered {
	background: var(--fc-primary);
}

.tvoc2-legend-dot--forgot {
	background: #E74C3C;
}

/* Stats */
.tvoc2-sidebar-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.5rem;
}

.tvoc2-stat {
	text-align: center;
	padding: 0.5rem 0.25rem;
	background: var(--fc-bg-subtle);
	border-radius: 6px;
}

.tvoc2-stat__value {
	display: block;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--fc-text-muted);
}

.tvoc2-stat--remembered .tvoc2-stat__value {
	color: var(--fc-primary);
}

.tvoc2-stat--forgot .tvoc2-stat__value {
	color: #E74C3C;
}

.tvoc2-stat__label {
	font-size: 0.625rem;
	color: var(--fc-text-muted);
	text-transform: uppercase;
}

/* ============================================================================
   CENTER: FLASHCARD AREA
   ============================================================================ */

.tvoc2-flashcard-center {
	flex: 1;
	min-width: 0;
	text-align: center;
}

/* Flashcard area with side navigation */
.tvoc2-flashcard-area {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
	position: relative;
}

/* Side navigation arrows */
.tvoc2-flashcard-nav {
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--fc-bg);
	border: 2px solid var(--fc-primary);
	border-radius: 50%;
	color: var(--fc-primary);
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 2px 8px rgba(39, 174, 96, 0.15);
	flex-shrink: 0;
	z-index: 10;
}

.tvoc2-flashcard-nav:hover:not(:disabled) {
	background: var(--fc-primary);
	color: white;
	transform: scale(1.05);
	box-shadow: 0 4px 12px rgba(39, 174, 96, 0.25);
}

.tvoc2-flashcard-nav:disabled {
	opacity: 0.3;
	cursor: not-allowed;
	box-shadow: none;
}

.tvoc2-flashcard-nav .dashicons {
	font-size: 22px;
	width: 22px;
	height: 22px;
}

/* ============================================================================
   RIGHT: SENTENCE GAME
   ============================================================================ */

.tvoc2-flashcard-game {
	min-width: 0;
}

/* ============================================================================
   ACTION BUTTONS ROW (Memory + Shuffle)
   ============================================================================ */

.tvoc2-flashcard-actions {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
}

.tvoc2-memory-btn {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.625rem 1.25rem;
	border: 2px solid;
	border-radius: 25px;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.tvoc2-memory-btn--forgot {
	background: white;
	border-color: #E74C3C;
	color: #E74C3C;
}

.tvoc2-memory-btn--forgot:hover {
	background: #E74C3C;
	color: white;
}

.tvoc2-memory-btn--remembered {
	background: white;
	border-color: var(--fc-primary);
	color: var(--fc-primary);
}

.tvoc2-memory-btn--remembered:hover,
.tvoc2-memory-btn--remembered.is-active {
	background: var(--fc-primary);
	color: white;
}

.tvoc2-memory-btn--forgot.is-active {
	background: #E74C3C;
	color: white;
}

.tvoc2-memory-btn .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/* Shuffle button - same style as memory buttons */
.tvoc2-btn--shuffle {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.625rem 1.25rem;
	background: white;
	border: 2px solid var(--fc-border);
	border-radius: 25px;
	color: var(--fc-text-secondary);
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.tvoc2-btn--shuffle:hover {
	border-color: var(--fc-primary);
	color: var(--fc-primary);
	transform: scale(1.02);
}

.tvoc2-btn--shuffle.is-active {
	animation: spin 0.3s ease-out;
}

.tvoc2-btn--shuffle .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/* ============================================================================
   SENTENCE GAME SECTION
   ============================================================================ */

.tvoc2-sentence-game {
	padding: 1rem;
	background: var(--fc-bg);
	border: 2px solid var(--fc-border);
	border-radius: 12px;
	height: 560px;
	display: flex;
	flex-direction: column;
	position: sticky;
	top: 100px;
	overflow: hidden;
}

.tvoc2-sentence-game__title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--fc-text);
	margin: 0 0 0.75rem 0;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--fc-primary);
}

.tvoc2-sentence-game__title .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: var(--fc-primary);
}

.tvoc2-sentence-game__content {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
}

.tvoc2-sentence-game__placeholder {
	text-align: center;
	color: var(--fc-text-muted);
	font-size: 0.8rem;
	padding: 2rem 1rem;
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Sentence Game Styles */
.tvoc2-sentence-game__question {
	font-size: 0.8rem;
	color: var(--fc-text-secondary);
	margin-bottom: 0.75rem;
	padding: 0.5rem;
	background: var(--fc-bg-subtle);
	border-radius: 6px;
	text-align: center;
}

.tvoc2-sentence-game__target {
	min-height: 50px;
	padding: 0.5rem;
	background: var(--fc-target-bg);
	border: 2px dashed var(--fc-target-border);
	border-radius: 8px;
	margin-bottom: 0.75rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	align-items: center;
	justify-content: center;
}

.tvoc2-sentence-game__target.is-correct {
	border-color: var(--fc-primary);
	background: var(--fc-primary-pale);
	border-style: solid;
}

.tvoc2-sentence-game__target.is-wrong {
	border-color: #E74C3C;
	background: #FDEDEC;
	border-style: solid;
	animation: shake 0.3s ease-in-out;
}

@keyframes shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-5px); }
	75% { transform: translateX(5px); }
}

.tvoc2-sentence-game__options {
	flex: 1;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-content: flex-start;
	justify-content: center;
	padding: 0.75rem;
	background: var(--fc-bg-subtle);
	border-radius: 8px;
	overflow-y: auto;
	min-height: 80px;
}

.tvoc2-word-chip {
	display: inline-block;
	padding: 0.5rem 0.75rem 0.375rem;
	background: var(--fc-bg);
	border: 2px solid var(--fc-border);
	border-radius: 8px;
	font-size: 0.9rem;
	font-family: "Noto Sans JP", sans-serif;
	color: var(--fc-text);
	cursor: pointer;
	transition: all 0.15s ease;
	user-select: none;
	line-height: 1.8;
	vertical-align: bottom;
}

/* Ruby text support in word chips */
.tvoc2-word-chip ruby {
	ruby-position: over;
	ruby-align: center;
}

.tvoc2-word-chip ruby rt {
	font-size: 0.6em;
	color: var(--fc-text-secondary);
	font-weight: normal;
	line-height: 1;
}

.tvoc2-word-chip.is-selected ruby rt {
	color: var(--fc-chip-selected-ruby);
}

.tvoc2-word-chip:hover {
	border-color: var(--fc-primary);
	background: var(--fc-primary-pale);
	transform: scale(1.02);
}

.tvoc2-word-chip.is-selected {
	border-color: var(--fc-chip-selected-border);
	background: var(--fc-chip-selected-bg);
	color: var(--fc-chip-selected-text);
	border-radius: 6px;
}

.tvoc2-word-chip.is-disabled {
	opacity: 0.4;
	pointer-events: none;
}

.tvoc2-sentence-game__result {
	text-align: center;
	padding: 0.5rem;
	font-size: 0.8rem;
	font-weight: 600;
	border-radius: 6px;
	margin-top: 0.5rem;
}

.tvoc2-sentence-game__result.is-correct {
	background: var(--fc-primary-pale);
	color: var(--fc-primary-dark);
}

.tvoc2-sentence-game__result.is-wrong {
	background: #FDEDEC;
	color: #C0392B;
}

.tvoc2-sentence-game__actions {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.75rem;
	justify-content: center;
}

.tvoc2-sentence-game__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.375rem 0.75rem;
	border: 2px solid var(--fc-border);
	border-radius: 20px;
	background: var(--fc-bg);
	color: var(--fc-text-secondary);
	font-size: 0.75rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s ease;
}

.tvoc2-sentence-game__btn:hover {
	border-color: var(--fc-primary);
	color: var(--fc-primary);
}

.tvoc2-sentence-game__btn .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}

.tvoc2-sentence-game__translation {
	font-size: 0.75rem;
	color: var(--fc-text-muted);
	text-align: center;
	margin-top: 0.5rem;
	font-style: italic;
}

.tvoc2-sentence-game__vietnamese {
	display: block;
	font-size: 1rem;
	font-weight: 500;
	color: var(--fc-primary-dark);
	line-height: 1.5;
}

.tvoc2-sentence-game__hint {
	font-size: 0.8rem;
	color: var(--fc-text-muted);
	background: var(--fc-bg-subtle);
	padding: 0.5rem 0.75rem;
	border-radius: 6px;
	margin-bottom: 0.75rem;
	text-align: center;
	border-left: 3px solid var(--fc-warning);
	line-height: 1.6;
}

.tvoc2-sentence-game__hint ruby {
	ruby-position: over;
}

.tvoc2-sentence-game__hint rt {
	font-size: 0.6em;
	color: var(--fc-text-muted);
}

.tvoc2-sentence-game__answer {
	background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
	padding: 0.5rem 0.75rem;
	border-radius: 6px;
	margin-top: 0.5rem;
	font-family: "Noto Sans JP", sans-serif;
	border-left: 3px solid #4caf50;
	box-shadow: 0 1px 4px rgba(76, 175, 80, 0.12);
}

.tvoc2-sentence-game__answer-label {
	font-size: 0.65rem;
	font-weight: 600;
	color: #2e7d32;
	margin-bottom: 0.25rem;
	letter-spacing: 0.3px;
	text-align: center;
}

.tvoc2-sentence-game__answer-content {
	font-size: 0.85rem;
	color: #1b5e20;
	line-height: 1.6;
	text-align: center;
}

.tvoc2-sentence-game__answer-content rt {
	font-size: 0.5em;
	color: #388e3c;
}

/* ============================================================================
   FLASHCARD CONTAINER (Legacy support)
   ============================================================================ */

.tvoc2-flashcard-container {
	display: block !important;
	max-width: 900px !important;
	width: 100% !important;
	margin: 0 auto !important;
	padding: var(--tvoc2-space-6) !important;
	animation: fadeIn 0.3s ease-out;
	box-sizing: border-box !important;
}

/* ============================================================================
   PROGRESS BAR - IRODORI STYLE
   ============================================================================ */

.tvoc2-flashcard-progress {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
	padding: 0.5rem 0.75rem;
	background: var(--fc-bg);
	border-radius: 20px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
	border: 1px solid var(--fc-border);
	max-width: 300px;
	margin-left: auto;
	margin-right: auto;
}

.tvoc2-flashcard-progress__bar {
	flex: 1;
	height: 8px;
	background: var(--fc-progress-bg);
	border-radius: 4px;
	overflow: hidden;
	position: relative;
}

.tvoc2-flashcard-progress__fill {
	height: 100%;
	background: var(--fc-progress-fill);
	border-radius: 4px;
	transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tvoc2-flashcard-progress__text {
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--fc-text-secondary);
	white-space: nowrap;
}

.tvoc2-flashcard-progress__text .current {
	color: var(--fc-primary);
	font-size: 1rem;
}

/* ============================================================================
   THE FLASHCARD - IRODORI STYLE
   ============================================================================ */

.tvoc2-flashcard {
	position: relative !important;
	display: block !important;
	width: 550px !important;
	max-width: 550px !important;
	height: 330px !important;
	min-height: 330px !important;
	margin: 0 !important;
	cursor: pointer;
	perspective: 1200px;
	outline: none;
	box-sizing: border-box !important;
	flex-shrink: 0;
}

.tvoc2-flashcard:focus {
	box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.3);
	border-radius: 16px;
}

.tvoc2-flashcard__inner {
	position: relative !important;
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	transform-style: preserve-3d;
	transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.tvoc2-flashcard.is-flipped .tvoc2-flashcard__inner {
	transform: rotateY(180deg);
}

.tvoc2-flashcard__front,
.tvoc2-flashcard__back {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
	backface-visibility: hidden;
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 2rem !important;
	background: var(--fc-bg);
	border-radius: 16px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
	border: 2px solid var(--fc-border);
	overflow: hidden;
	box-sizing: border-box !important;
}

/* Decorative gradient border effect - Irodori green */
.tvoc2-flashcard__front::before,
.tvoc2-flashcard__back::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 5px;
	background: linear-gradient(
		90deg,
		var(--fc-primary-light) 0%,
		var(--fc-primary) 50%,
		var(--fc-primary-dark) 100%
	);
}

.tvoc2-flashcard__back {
	transform: rotateY(180deg);
	justify-content: flex-start;
	padding-top: 1.5rem;
}

/* ============================================================================
   FRONT SIDE CONTENT - IRODORI STYLE
   ============================================================================ */

.tvoc2-flashcard__word {
	font-size: 2.75rem;
	font-weight: 700;
	font-family: "Noto Sans JP", sans-serif;
	color: var(--fc-text);
	text-align: center;
	line-height: 1.4;
	margin-bottom: 0.5rem;
	word-break: keep-all;
}

/* Ruby text styling for flashcard word */
.tvoc2-flashcard__word ruby {
	ruby-position: over;
}

.tvoc2-flashcard__word ruby rt {
	font-size: 0.35em;
	color: var(--fc-ruby);
	font-weight: 500;
}

.tvoc2-flashcard__furigana {
	font-size: 1rem;
	color: var(--fc-text-muted);
	font-family: "Noto Sans JP", sans-serif;
	margin-bottom: 0.5rem;
}

/* Audio button on card - White background with primary icon */
.tvoc2-flashcard__audio {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	color: var(--fc-primary);
	border: 2px solid var(--fc-primary);
	border-radius: 50%;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tvoc2-flashcard__audio:hover {
	transform: scale(1.08);
	background: var(--fc-primary-pale);
	border-color: var(--fc-primary-dark);
	color: var(--fc-primary-dark);
}

.tvoc2-flashcard__audio.is-playing {
	animation: pulse-audio 1s ease-in-out infinite;
	background: var(--fc-primary-pale);
	border-color: var(--fc-primary);
}

@keyframes pulse-audio {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.1); }
}

.tvoc2-flashcard__audio .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/* Hint text */
.tvoc2-flashcard__hint {
	position: absolute;
	bottom: 0.75rem;
	display: flex;
	align-items: center;
	gap: 0.375rem;
	font-size: 0.75rem;
	color: var(--fc-text-muted);
	padding: 0.375rem 0.75rem;
	background: var(--fc-bg-subtle);
	border-radius: 20px;
	border: 1px solid #E0E0E0;
	transition: opacity 0.3s ease;
}

.tvoc2-flashcard.is-flipped .tvoc2-flashcard__hint {
	opacity: 0;
}

/* ============================================================================
   BACK SIDE CONTENT - IRODORI STYLE
   ============================================================================ */

.tvoc2-flashcard__reading {
	font-size: 0.875rem;
	color: var(--fc-text-muted);
	font-family: "Noto Sans JP", sans-serif;
	margin-bottom: 0.5rem;
}

/* Han Viet - Purple with yellow background like table */
.tvoc2-flashcard__hanviet {
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--fc-hanviet);
	background: var(--fc-hanviet-bg);
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
	margin-bottom: 0.75rem;
	display: inline-block;
}

.tvoc2-flashcard__hanviet:empty {
	display: none;
}

.tvoc2-flashcard__meaning {
	font-size: 1.6rem;
	font-weight: 700;
	color: var(--fc-text);
	text-align: center;
	margin-bottom: 0.75rem;
	line-height: 1.4;
}

.tvoc2-flashcard__pos {
	display: inline-block;
	padding: 0.125rem 0.625rem;
	font-size: 0.7rem;
	font-weight: 600;
	background: var(--fc-primary-pale);
	color: var(--fc-primary-dark);
	border-radius: 20px;
	margin-bottom: 0.75rem;
}

.tvoc2-flashcard__examples {
	width: 100%;
	max-width: 400px;
	max-height: 110px;
	overflow-y: auto;
	padding: 0 0.5rem;
	margin: 0.25rem auto 0;
}

.tvoc2-flashcard__examples-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.tvoc2-flashcard__example {
	padding: 0.5rem 0.75rem;
	background: var(--fc-bg-subtle);
	border-radius: 6px;
	margin-bottom: 0.5rem;
	border-left: 3px solid var(--fc-primary);
	text-align: center;
}

.tvoc2-flashcard__example:last-child {
	margin-bottom: 0;
}

.tvoc2-flashcard__example-jp {
	font-family: "Noto Sans JP", sans-serif;
	font-weight: 500;
	font-size: 0.95rem;
	color: var(--fc-text);
	margin-bottom: 0.35rem;
	display: block;
	line-height: 1.6;
}

/* Ruby text in examples */
.tvoc2-flashcard__example-jp ruby rt {
	font-size: 0.55em;
	color: var(--fc-ruby);
}

.tvoc2-flashcard__example-vi {
	font-size: 0.85rem;
	text-align: center;
	color: #555;
	display: block;
}

/* ============================================================================
   KEYBOARD SHORTCUTS HINT - COMPACT
   ============================================================================ */

.tvoc2-flashcard-shortcuts {
	display: inline-flex;
	justify-content: center;
	gap: 0.75rem;
	padding: 0.5rem 1rem;
	background: var(--fc-bg-subtle);
	border-radius: 20px;
	font-size: 0.7rem;
	color: var(--fc-text-muted);
	border: 1px solid #E0E0E0;
}

.tvoc2-flashcard-shortcuts span {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	white-space: nowrap;
}

.tvoc2-flashcard-shortcuts kbd {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 20px;
	padding: 0 0.375rem;
	background: var(--fc-bg);
	border: 1px solid var(--fc-border);
	border-radius: 3px;
	box-shadow: 0 1px 0 var(--fc-border);
	font-family: inherit;
	font-size: 0.65rem;
	font-weight: 600;
	color: var(--fc-text-secondary);
}

/* ============================================================================
   SHORTCODE-BASED FLASHCARD STYLES (Legacy)
   ============================================================================ */

.tvoc2-flashcards {
	max-width: 600px;
	margin: 0 auto;
	padding: var(--tvoc2-space-6);
}

.tvoc2-flashcards .tvoc2-flashcard {
	height: 320px;
}

.tvoc2-flashcards .tvoc2-flashcard-front .tvoc2-word {
	font-size: 3rem;
}

.tvoc2-flashcards .tvoc2-flashcard-front .tvoc2-reading {
	font-size: var(--tvoc2-text-xl);
}

.tvoc2-flashcards .tvoc2-flashcard-back .tvoc2-meaning {
	font-size: var(--tvoc2-text-xl);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

/* Tablet: 2 columns - sidebar + flashcard, game below */
@media (max-width: 1100px) {
	.tvoc2-flashcard-layout {
		grid-template-columns: 180px 1fr;
		grid-template-rows: auto auto;
	}

	.tvoc2-flashcard-sidebar {
		grid-row: 1 / 3;
	}

	.tvoc2-flashcard-center {
		grid-column: 2;
		grid-row: 1;
	}

	.tvoc2-flashcard-game {
		grid-column: 2;
		grid-row: 2;
	}

	.tvoc2-sentence-game {
		position: static;
		margin-top: 1rem;
	}

	/* Nav arrows on tablet */
	.tvoc2-flashcard-nav {
		width: 40px;
		height: 40px;
	}

	.tvoc2-flashcard-nav .dashicons {
		font-size: 20px;
		width: 20px;
		height: 20px;
	}

	.tvoc2-vocab-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 6px;
	}

	.tvoc2-vocab-dot {
		height: 32px !important;
		min-height: 32px !important;
		max-height: 32px !important;
		padding: 0 0.25rem !important;
		font-size: 0.65rem !important;
	}
}

/* Mobile: Stack all */
@media (max-width: 768px) {
	.tvoc2-flashcard-layout {
		grid-template-columns: 1fr;
		gap: 1rem;
		max-width: calc(100% - 1.5rem);
		margin: 0 auto;
		overflow: visible;
		padding: 0;
	}

	.tvoc2-flashcard-sidebar {
		position: static;
		order: 3;
		grid-row: auto;
		height: auto;
		max-height: 280px;
	}

	.tvoc2-flashcard-center {
		order: 1;
		grid-column: auto;
		grid-row: auto;
		width: 100%;
		max-width: 100%;
		overflow-x: hidden;
	}

	.tvoc2-flashcard-game {
		order: 2;
		grid-column: auto;
		grid-row: auto;
	}

	.tvoc2-sentence-game {
		height: auto;
		min-height: 300px;
	}

	.tvoc2-vocab-grid {
		grid-template-columns: repeat(6, 1fr);
		gap: 5px;
	}

	.tvoc2-vocab-dot {
		height: 26px !important;
		min-height: 26px !important;
		max-height: 26px !important;
		padding: 0 0.25rem !important;
		font-size: 0.6rem !important;
		border-radius: 13px !important;
	}

	.tvoc2-vocab-dot.is-current {
		transform: scale(1);
		box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.4);
	}

	.tvoc2-sidebar-legend {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
		gap: 0.5rem;
	}

	.tvoc2-sidebar-stats {
		grid-template-columns: repeat(3, 1fr);
	}

	/* Flashcard area - position relative for overlay nav */
	.tvoc2-flashcard-area {
		width: 100%;
		justify-content: center;
		position: relative;
		gap: 0;
	}

	/* Nav arrows on mobile - overlay on flashcard edges */
	.tvoc2-flashcard-nav {
		position: absolute;
		top: 50%;
		transform: translateY(-50%);
		width: 32px;
		height: 32px;
		background: transparent;
		border: none;
		box-shadow: none;
		color: rgba(0, 0, 0, 0.25);
		z-index: 20;
		opacity: 0.6;
		transition: opacity 0.2s ease, color 0.2s ease;
	}

	.tvoc2-flashcard-nav:hover:not(:disabled),
	.tvoc2-flashcard-nav:active:not(:disabled) {
		background: transparent;
		color: var(--fc-primary);
		opacity: 1;
		transform: translateY(-50%);
		box-shadow: none;
	}

	.tvoc2-flashcard-nav--prev {
		left: 0.25rem;
	}

	.tvoc2-flashcard-nav--next {
		right: 0.25rem;
	}

	.tvoc2-flashcard-nav .dashicons {
		font-size: 20px;
		width: 20px;
		height: 20px;
	}

	/* Action buttons - compact row */
	.tvoc2-flashcard-actions {
		gap: 0.375rem;
		flex-wrap: nowrap;
		justify-content: center;
		margin-bottom: 0.75rem;
	}

	/* Memory buttons compact - smaller on mobile */
	.tvoc2-memory-btn {
		padding: 0.375rem 0.625rem;
		font-size: 0.7rem;
		gap: 0.25rem;
		border-width: 1.5px;
	}

	.tvoc2-memory-btn .dashicons {
		font-size: 14px;
		width: 14px;
		height: 14px;
	}

	.tvoc2-btn--shuffle {
		padding: 0.375rem 0.5rem;
		font-size: 0.7rem;
		border-width: 1.5px;
	}

	.tvoc2-btn--shuffle .dashicons {
		font-size: 14px;
		width: 14px;
		height: 14px;
	}

	/* Hide some shortcuts on mobile */
	.tvoc2-flashcard-shortcuts {
		gap: 0.5rem;
		font-size: 0.65rem;
	}

	/* Audio button - override theme min-height */
	.tvoc2-flashcard__audio {
		width: 36px !important;
		height: 36px !important;
		min-height: 36px !important;
		max-height: 36px !important;
		min-width: 36px !important;
		max-width: 36px !important;
		padding: 0 !important;
	}
}

/* Large screens */
@media (min-width: 1400px) {
	.tvoc2-flashcard-layout {
		grid-template-columns: 320px 1fr 320px;
		gap: 1.5rem;
	}

	.tvoc2-vocab-grid {
		grid-template-columns: repeat(5, 1fr);
		gap: 8px;
	}

	.tvoc2-vocab-dot {
		height: 38px;
	}

	.tvoc2-flashcard {
		width: 605px !important;
		max-width: 605px !important;
		height: 363px !important;
		min-height: 363px !important;
	}

	.tvoc2-flashcard__word {
		font-size: 3.25rem;
	}

	.tvoc2-flashcard__meaning {
		font-size: 1.75rem;
	}

	.tvoc2-flashcard__examples {
		max-height: 140px;
	}
}

@media (max-width: 640px) {
	.tvoc2-flashcard-layout {
		padding: 0 0.5rem;
	}

	.tvoc2-flashcard-container {
		padding: 0.5rem;
	}

	/* Vocab dots - smaller on 640px */
	.tvoc2-vocab-dot {
		height: 28px !important;
		min-height: 28px !important;
		max-height: 28px !important;
		padding: 0 0.25rem !important;
		font-size: 0.6rem !important;
	}

	/* Flashcard - full width since nav overlays */
	.tvoc2-flashcard {
		width: 100% !important;
		max-width: 400px !important;
		height: 280px !important;
		min-height: 280px !important;
	}

	/* Nav arrows - smaller on 640px */
	.tvoc2-flashcard-nav {
		width: 28px;
		height: 28px;
	}

	.tvoc2-flashcard-nav .dashicons {
		font-size: 18px;
		width: 18px;
		height: 18px;
	}

	.tvoc2-flashcard__front,
	.tvoc2-flashcard__back {
		padding: 1rem;
	}

	.tvoc2-flashcard__word {
		font-size: 1.75rem;
	}

	.tvoc2-flashcard__furigana {
		font-size: 0.875rem;
	}

	.tvoc2-flashcard__meaning {
		font-size: 1.15rem;
	}

	.tvoc2-flashcard__audio {
		width: 32px !important;
		height: 32px !important;
		min-height: 32px !important;
		max-height: 32px !important;
		min-width: 32px !important;
		max-width: 32px !important;
		padding: 0 !important;
		top: 0.5rem;
		right: 0.5rem;
	}

	.tvoc2-flashcard__audio .dashicons {
		font-size: 14px;
		width: 14px;
		height: 14px;
	}

	.tvoc2-flashcard-controls .tvoc2-btn--icon {
		width: 40px;
		height: 40px;
	}

	.tvoc2-flashcard-controls #btn-shuffle {
		width: 48px;
		height: 48px;
	}

	.tvoc2-flashcard-controls .tvoc2-btn--icon .dashicons {
		font-size: 20px;
		width: 20px;
		height: 20px;
	}

	.tvoc2-flashcard-shortcuts {
		flex-wrap: wrap;
		gap: 0.5rem;
		justify-content: center;
		padding: 0.75rem;
		font-size: 0.75rem;
	}

	.tvoc2-flashcard-progress {
		padding: 0.5rem 0.75rem;
	}

	.tvoc2-flashcard-progress__bar {
		height: 8px;
	}

	/* Sidebar mobile */
	.tvoc2-vocab-grid {
		grid-template-columns: repeat(4, 1fr);
		gap: 6px;
	}

	.tvoc2-vocab-dot {
		height: 30px;
		font-size: 0.625rem;
	}

	.tvoc2-sidebar-legend {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
	}

	/* Memory buttons - compact inline */
	.tvoc2-flashcard-actions {
		gap: 0.375rem;
	}

	.tvoc2-memory-btn {
		padding: 0.4rem 0.75rem;
		font-size: 0.75rem;
		gap: 0.25rem;
	}

	.tvoc2-memory-btn .dashicons {
		font-size: 14px;
		width: 14px;
		height: 14px;
	}

	.tvoc2-btn--shuffle {
		padding: 0.4rem 0.625rem;
		font-size: 0.75rem;
	}

	.tvoc2-btn--shuffle .dashicons {
		font-size: 14px;
		width: 14px;
		height: 14px;
	}

	.tvoc2-sentence-game {
		margin-top: 1rem;
		padding: 0.75rem;
	}

	/* Hide Irodori header decorations on mobile */
	.tvoc2-irodori-header--flashcard .tvoc2-irodori-lesson::before {
		display: none;
	}
}

@media (max-width: 480px) {
	/* Vocab grid - more columns on smaller screens */
	.tvoc2-vocab-grid {
		grid-template-columns: repeat(7, 1fr);
		gap: 4px;
	}

	/* Vocab dots - even smaller on 480px */
	.tvoc2-vocab-dot {
		height: 24px !important;
		min-height: 24px !important;
		max-height: 24px !important;
		padding: 0 0.15rem !important;
		font-size: 0.55rem !important;
		border-radius: 12px !important;
		border-width: 1px !important;
	}

	/* Audio button - smaller on 480px */
	.tvoc2-flashcard__audio {
		width: 28px !important;
		height: 28px !important;
		min-height: 28px !important;
		max-height: 28px !important;
		min-width: 28px !important;
		max-width: 28px !important;
		padding: 0 !important;
		top: 0.375rem;
		right: 0.375rem;
	}

	.tvoc2-flashcard__audio .dashicons {
		font-size: 12px !important;
		width: 12px !important;
		height: 12px !important;
	}

	/* Flashcard - full width with overlay nav */
	.tvoc2-flashcard {
		width: 100% !important;
		max-width: 360px !important;
		height: 260px !important;
		min-height: 260px !important;
	}

	/* Nav arrows - compact on 480px */
	.tvoc2-flashcard-nav {
		width: 26px;
		height: 26px;
	}

	.tvoc2-flashcard-nav .dashicons {
		font-size: 16px;
		width: 14px;
		height: 14px;
	}

	.tvoc2-flashcard__word {
		font-size: 1.625rem;
	}

	.tvoc2-flashcard__meaning {
		font-size: 0.9rem;
	}

	.tvoc2-flashcard__examples {
		max-height: 70px;
	}

	/* Memory buttons - very compact */
	.tvoc2-flashcard-actions {
		gap: 0.25rem;
	}

	.tvoc2-memory-btn {
		padding: 0.3rem 0.5rem;
		font-size: 0.65rem;
		border-radius: 14px;
		border-width: 1px;
	}

	.tvoc2-memory-btn .dashicons {
		font-size: 12px;
		width: 12px;
		height: 12px;
	}

	.tvoc2-btn--shuffle {
		padding: 0.3rem 0.4rem;
		font-size: 0.65rem;
		border-width: 1px;
	}

	.tvoc2-btn--shuffle .dashicons {
		font-size: 12px;
		width: 12px;
		height: 12px;
	}

	/* Hide keyboard shortcuts on small screens */
	.tvoc2-flashcard-shortcuts {
		display: none;
	}
}

/* ============================================================================
   DARK MODE SUPPORT (Optional)
   ============================================================================ */

@media (prefers-color-scheme: dark) {
	/* Dark mode can be added later if needed */
}

/* ============================================================================
   REDUCED MOTION
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
	.tvoc2-flashcard__inner {
		transition: none;
	}

	.tvoc2-flashcard__audio.is-playing {
		animation: none;
	}

	.tvoc2-flashcard-controls #btn-shuffle.is-active {
		animation: none;
	}

	.tvoc2-flashcard-progress__fill {
		animation: none;
	}
}

/* ============================================================================
   LESSON NAVIGATION DROPDOWN
   ============================================================================ */

.tvoc2-lesson-dropdown {
	position: relative;
	margin-left: auto;
	flex-shrink: 0;
	z-index: 10;
}

.tvoc2-lesson-dropdown__select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background: var(--fc-bg);
	border: 2px solid var(--fc-primary);
	border-radius: 8px;
	padding: 0.5rem 2.5rem 0.5rem 1rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--fc-primary-dark);
	cursor: pointer;
	transition: all 0.2s ease;
	min-width: 140px;
	font-family: "Noto Sans JP", sans-serif;
}

.tvoc2-lesson-dropdown__select:hover {
	background: var(--fc-primary-pale);
	border-color: var(--fc-primary-dark);
}

.tvoc2-lesson-dropdown__select:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(var(--fc-primary), 0.2);
	border-color: var(--fc-primary-dark);
}

.tvoc2-lesson-dropdown__icon {
	position: absolute;
	right: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	color: var(--fc-primary);
}

.tvoc2-lesson-dropdown__icon .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/* Responsive */
@media (max-width: 768px) {
	.tvoc2-irodori-header--flashcard {
		margin-left: 0.75rem;
		margin-right: 0.75rem;
		border-radius: 8px;
	}

	.tvoc2-irodori-header--flashcard .tvoc2-irodori-lesson {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.tvoc2-irodori-header--flashcard .tvoc2-irodori-lesson__number {
		padding-right: 0;
		margin-right: 0;
		border-right: none;
		border-bottom: 2px solid var(--fc-primary);
		padding-bottom: 0.5rem;
		margin-bottom: 0.5rem;
		justify-content: center;
		width: 100%;
	}

	.tvoc2-irodori-header--flashcard .tvoc2-irodori-lesson__title {
		text-align: center;
		width: 100%;
		justify-content: center;
	}

	.tvoc2-lesson-dropdown {
		margin-left: 0;
		margin-top: 0.75rem;
		width: 100%;
	}

	.tvoc2-lesson-dropdown__select {
		width: 100%;
	}
}

/* ============================================================================
   ENHANCED RESPONSIVE - TABLET (768-1100px)
   ============================================================================ */

@media (min-width: 768px) and (max-width: 1100px) {
	/* Flashcard header on tablet */
	.tvoc2-irodori-header--flashcard .tvoc2-irodori-lesson {
		padding: 1rem 1.25rem;
	}

	.tvoc2-irodori-header--flashcard .tvoc2-irodori-lesson__number-value {
		font-size: 2.5rem;
	}

	.tvoc2-irodori-header--flashcard .tvoc2-irodori-lesson__title {
		font-size: 1.25rem;
	}

	/* Dropdown on tablet */
	.tvoc2-lesson-dropdown__select {
		min-width: 120px;
		padding: 0.4rem 2rem 0.4rem 0.75rem;
		font-size: 0.8rem;
	}

	/* Sidebar adjustments */
	.tvoc2-sidebar-title {
		font-size: 0.85rem;
	}

	.tvoc2-sidebar-stats {
		gap: 0.5rem;
	}

	.tvoc2-stat__value {
		font-size: 1.25rem;
	}

	/* Sentence game on tablet */
	.tvoc2-sentence-game__title {
		font-size: 0.9rem;
	}
}

/* ============================================================================
   ENHANCED RESPONSIVE - SMALL MOBILE (320-480px)
   ============================================================================ */

@media (max-width: 480px) {
	/* Header compact */
	.tvoc2-irodori-header--flashcard {
		margin-bottom: 0.75rem;
	}

	.tvoc2-irodori-header--flashcard .tvoc2-irodori-topic {
		padding: 0.5rem 0.75rem;
	}

	.tvoc2-irodori-header--flashcard .tvoc2-irodori-topic__label {
		padding: 0.2rem 0.5rem;
		font-size: 0.65rem;
	}

	.tvoc2-irodori-header--flashcard .tvoc2-irodori-lesson {
		padding: 0.75rem;
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.tvoc2-irodori-header--flashcard .tvoc2-irodori-lesson__number {
		padding-bottom: 0.5rem;
		margin-bottom: 0.5rem;
		padding-right: 0;
		margin-right: 0;
		border-right: none;
		border-bottom: 2px solid var(--fc-primary);
		justify-content: center;
		width: 100%;
	}

	.tvoc2-irodori-header--flashcard .tvoc2-irodori-lesson__number-value {
		font-size: 1.75rem;
	}

	.tvoc2-irodori-header--flashcard .tvoc2-irodori-lesson__number-label,
	.tvoc2-irodori-header--flashcard .tvoc2-irodori-lesson__number-sublabel {
		font-size: 0.9rem;
	}

	.tvoc2-irodori-header--flashcard .tvoc2-irodori-lesson__title {
		font-size: 1rem;
		text-align: center;
		width: 100%;
		justify-content: center;
	}

	/* Dropdown compact */
	.tvoc2-lesson-dropdown__select {
		padding: 0.4rem 2rem 0.4rem 0.75rem;
		font-size: 0.8rem;
	}

	/* Progress bar compact */
	.tvoc2-flashcard-progress {
		padding: 0.4rem 0.75rem;
		margin-bottom: 0.5rem;
	}

	.tvoc2-flashcard-progress__text {
		font-size: 0.75rem;
	}

	/* Action buttons compact */
	.tvoc2-flashcard-actions {
		gap: 0.375rem;
		margin-top: 0.75rem;
	}

	.tvoc2-memory-btn {
		padding: 0.4rem 0.75rem;
		font-size: 0.75rem;
		border-radius: 16px;
	}

	.tvoc2-memory-btn .dashicons {
		font-size: 14px;
		width: 14px;
		height: 14px;
	}

	.tvoc2-btn--shuffle {
		padding: 0.4rem 0.625rem;
		font-size: 0.75rem;
	}

	.tvoc2-btn--shuffle .dashicons {
		font-size: 14px;
		width: 14px;
		height: 14px;
	}

	/* Sidebar compact */
	.tvoc2-flashcard-sidebar {
		padding: 0.75rem;
		max-height: 300px;
	}

	.tvoc2-sidebar-section {
		margin-bottom: 0.75rem;
	}

	.tvoc2-sidebar-title {
		font-size: 0.8rem;
		margin-bottom: 0.5rem;
	}

	.tvoc2-sidebar-title .dashicons {
		font-size: 14px;
		width: 14px;
		height: 14px;
	}

	.tvoc2-vocab-grid {
		gap: 4px;
	}

	.tvoc2-vocab-dot {
		height: 28px;
		font-size: 0.6rem;
		border-radius: 4px;
	}

	/* Legend compact */
	.tvoc2-sidebar-legend {
		gap: 0.375rem;
		margin-bottom: 0.75rem;
	}

	.tvoc2-legend-item {
		font-size: 0.7rem;
	}

	.tvoc2-legend-dot {
		width: 10px;
		height: 10px;
	}

	/* Stats compact */
	.tvoc2-sidebar-stats {
		gap: 0.5rem;
	}

	.tvoc2-stat {
		padding: 0.5rem;
	}

	.tvoc2-stat__value {
		font-size: 1.125rem;
	}

	.tvoc2-stat__label {
		font-size: 0.65rem;
	}

	/* Sentence game compact */
	.tvoc2-sentence-game {
		padding: 0.75rem;
		min-height: 200px;
	}

	.tvoc2-sentence-game__title {
		font-size: 0.8rem;
		margin-bottom: 0.75rem;
	}

	/* Shortcuts hide some on very small */
	.tvoc2-flashcard-shortcuts {
		font-size: 0.6rem;
		gap: 0.375rem;
		padding: 0.5rem;
	}

	.tvoc2-flashcard-shortcuts kbd {
		min-width: 22px;
		height: 20px;
		font-size: 0.6rem;
	}
}

/* ============================================================================
   ENHANCED RESPONSIVE - VERY SMALL MOBILE (< 360px)
   ============================================================================ */

@media (max-width: 360px) {
	/* Header ultra compact */
	.tvoc2-irodori-header--flashcard .tvoc2-irodori-topic__label {
		display: none;
	}

	.tvoc2-irodori-header--flashcard .tvoc2-irodori-lesson__number-value {
		font-size: 1.5rem;
	}

	.tvoc2-irodori-header--flashcard .tvoc2-irodori-lesson__title {
		font-size: 0.9rem;
	}

	/* Flashcard - nearly full width with overlay nav */
	.tvoc2-flashcard {
		width: 100% !important;
		max-width: 340px !important;
		height: 240px !important;
		min-height: 240px !important;
	}

	.tvoc2-flashcard__word {
		font-size: 1.5rem;
	}

	.tvoc2-flashcard__meaning {
		font-size: 0.8rem;
	}

	/* Nav arrows - minimal on 360px */
	.tvoc2-flashcard-nav {
		width: 26px;
		height: 26px;
	}

	.tvoc2-flashcard-nav--prev {
		left: 0;
	}

	.tvoc2-flashcard-nav--next {
		right: 0;
	}

	.tvoc2-flashcard-nav .dashicons {
		font-size: 12px;
		width: 12px;
		height: 12px;
	}

	/* Action buttons ultra compact */
	.tvoc2-flashcard-actions {
		gap: 0.125rem;
	}

	.tvoc2-memory-btn {
		padding: 0.25rem 0.375rem;
		font-size: 0.6rem;
		border-radius: 12px;
	}

	.tvoc2-memory-btn .dashicons {
		font-size: 10px;
		width: 10px;
		height: 10px;
	}

	.tvoc2-btn--shuffle {
		padding: 0.25rem 0.3rem;
		font-size: 0.6rem;
	}

	.tvoc2-btn--shuffle .dashicons {
		font-size: 10px;
		width: 10px;
		height: 10px;
	}

	/* Hide keyboard shortcuts on very small screens */
	.tvoc2-flashcard-shortcuts {
		display: none;
	}

	/* Sidebar ultra compact */
	.tvoc2-flashcard-sidebar {
		max-height: 250px;
	}

	.tvoc2-vocab-grid {
		grid-template-columns: repeat(4, 1fr);
	}

	.tvoc2-vocab-dot {
		height: 26px;
		font-size: 0.55rem;
	}
}

/* ============================================================================
   LANDSCAPE MOBILE ADJUSTMENTS
   ============================================================================ */

@media (max-width: 896px) and (orientation: landscape) {
	/* Header more compact in landscape */
	.tvoc2-irodori-header--flashcard .tvoc2-irodori-lesson {
		padding: 0.625rem 1rem;
	}

	.tvoc2-irodori-header--flashcard .tvoc2-irodori-lesson__number {
		flex-direction: row;
		border-right: 2px solid var(--fc-primary);
		border-bottom: none;
		padding-right: 0.75rem;
		padding-bottom: 0;
		margin-right: 0.75rem;
		margin-bottom: 0;
	}

	.tvoc2-irodori-header--flashcard .tvoc2-irodori-lesson__number-value {
		font-size: 1.75rem;
	}

	.tvoc2-irodori-header--flashcard .tvoc2-irodori-lesson__title {
		font-size: 1rem;
	}

	/* Flashcard smaller height in landscape */
	.tvoc2-flashcard {
		height: 220px !important;
		min-height: 220px !important;
	}

	.tvoc2-flashcard__word {
		font-size: 1.75rem;
	}

	/* Hide sidebar and game in landscape mobile */
	.tvoc2-flashcard-sidebar,
	.tvoc2-flashcard-game {
		display: none;
	}

	.tvoc2-flashcard-layout {
		grid-template-columns: 1fr;
	}

	.tvoc2-flashcard-center {
		order: 1;
	}

	/* Progress and actions more compact */
	.tvoc2-flashcard-progress {
		margin-bottom: 0.5rem;
	}

	.tvoc2-flashcard-actions {
		margin-top: 0.5rem;
	}
}

/* ============================================================================
   MOBILE OVERRIDES - HIGH SPECIFICITY TO PREVENT CONFLICTS
   This section MUST be at the end of the file to override all other styles
   ============================================================================ */

/*
 * MOBILE NAV ARROWS - Redesigned as tall, thin arrows without border
 * Positioned absolute to overlay on flashcard edges
 */
@media screen and (max-width: 768px) {
	/* Layout - no overflow hidden */
	.tvoc2-flashcard-layout {
		overflow: visible !important;
		padding: 0 0.5rem !important;
	}

	/* Flashcard center - allow full width */
	.tvoc2-flashcard-center {
		overflow: visible !important;
		width: 100% !important;
		max-width: 100% !important;
	}

	/* Flashcard area needs relative positioning */
	.tvoc2-flashcard-center .tvoc2-flashcard-area {
		position: relative !important;
		display: flex !important;
		justify-content: center !important;
		align-items: center !important;
		width: 100% !important;
		overflow: visible !important;
	}

	/* Nav arrows - tall thin design, no border/circle */
	.tvoc2-flashcard-center .tvoc2-flashcard-nav,
	.tvoc2-flashcard-area .tvoc2-flashcard-nav {
		position: absolute !important;
		top: 50% !important;
		transform: translateY(-50%) !important;
		width: 28px !important;
		height: 80px !important;
		padding: 0 !important;
		margin: 0 !important;
		background: rgba(0, 0, 0, 0.06) !important;
		border: none !important;
		border-radius: 4px !important;
		color: var(--fc-text-secondary) !important;
		cursor: pointer !important;
		z-index: 50 !important;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		box-shadow: none !important;
		transition: background 0.2s ease !important;
	}

	.tvoc2-flashcard-area .tvoc2-flashcard-nav:hover {
		background: rgba(0, 0, 0, 0.12) !important;
	}

	.tvoc2-flashcard-area .tvoc2-flashcard-nav--prev {
		left: 2px !important;
		right: auto !important;
	}

	.tvoc2-flashcard-area .tvoc2-flashcard-nav--next {
		right: 2px !important;
		left: auto !important;
	}

	/* Arrow icons - larger and thinner looking */
	.tvoc2-flashcard-area .tvoc2-flashcard-nav .dashicons {
		font-size: 24px !important;
		width: 24px !important;
		height: 24px !important;
		line-height: 1 !important;
	}

	/* Flashcard - full width since nav overlays */
	.tvoc2-flashcard-center .tvoc2-flashcard {
		width: 100% !important;
		max-width: 440px !important;
		height: 300px !important;
		min-height: 300px !important;
	}

	/* Flashcard content - larger text on mobile */
	.tvoc2-flashcard-center .tvoc2-flashcard__word {
		font-size: 2.25rem !important;
	}

	.tvoc2-flashcard-center .tvoc2-flashcard__furigana {
		font-size: 1rem !important;
	}

	.tvoc2-flashcard-center .tvoc2-flashcard__meaning {
		font-size: 1.25rem !important;
	}

	.tvoc2-flashcard-center .tvoc2-flashcard__reading {
		font-size: 0.9rem !important;
	}

	.tvoc2-flashcard-center .tvoc2-flashcard__hanviet {
		font-size: 0.85rem !important;
	}

	.tvoc2-flashcard-center .tvoc2-flashcard__pos {
		font-size: 0.75rem !important;
	}

	.tvoc2-flashcard-center .tvoc2-flashcard__example-jp {
		font-size: 0.9rem !important;
	}

	.tvoc2-flashcard-center .tvoc2-flashcard__example-vi {
		font-size: 0.8rem !important;
	}
}

/*
 * MOBILE ACTION BUTTONS - Memory buttons and Shuffle
 * Using high specificity to override .tvoc2-btn base styles
 */
@media screen and (max-width: 768px) {
	/* Actions container */
	.tvoc2-flashcard-center .tvoc2-flashcard-actions {
		display: flex !important;
		justify-content: center !important;
		align-items: center !important;
		gap: 6px !important;
		margin: 0.5rem 0 !important;
		flex-wrap: nowrap !important;
	}

	/* Memory buttons - small compact pills */
	.tvoc2-flashcard-actions .tvoc2-memory-btn {
		display: inline-flex !important;
		align-items: center !important;
		gap: 4px !important;
		padding: 6px 10px !important;
		font-size: 11px !important;
		font-weight: 600 !important;
		border-width: 1.5px !important;
		border-radius: 16px !important;
		min-height: auto !important;
		min-width: auto !important;
		line-height: 1.2 !important;
	}

	.tvoc2-flashcard-actions .tvoc2-memory-btn .dashicons {
		font-size: 12px !important;
		width: 12px !important;
		height: 12px !important;
		line-height: 1 !important;
	}

	/* Shuffle button - override .tvoc2-btn base class completely */
	.tvoc2-flashcard-actions .tvoc2-btn.tvoc2-btn--shuffle {
		display: inline-flex !important;
		align-items: center !important;
		gap: 4px !important;
		padding: 6px 8px !important;
		font-size: 11px !important;
		font-weight: 600 !important;
		border-width: 1.5px !important;
		border-radius: 16px !important;
		min-height: auto !important;
		min-width: auto !important;
		line-height: 1.2 !important;
		background: white !important;
		border-color: var(--fc-border) !important;
		color: var(--fc-text-secondary) !important;
	}

	.tvoc2-flashcard-actions .tvoc2-btn.tvoc2-btn--shuffle .dashicons {
		font-size: 12px !important;
		width: 12px !important;
		height: 12px !important;
		line-height: 1 !important;
	}
}

/* Even smaller on 480px */
@media screen and (max-width: 480px) {
	/* Nav arrows - minimal on 480px */
	.tvoc2-flashcard-area .tvoc2-flashcard-nav {
		width: 24px !important;
		height: 24px !important;
	}

	.tvoc2-flashcard-area .tvoc2-flashcard-nav .dashicons {
		font-size: 16px !important;
		width: 16px !important;
		height: 16px !important;
	}

	/* Flashcard */
	.tvoc2-flashcard-center .tvoc2-flashcard {
		width: 100% !important;
		max-width: 380px !important;
		height: 280px !important;
		min-height: 280px !important;
	}

	/* Flashcard content - adjusted for 480px */
	.tvoc2-flashcard-center .tvoc2-flashcard__word {
		font-size: 2rem !important;
	}

	.tvoc2-flashcard-center .tvoc2-flashcard__meaning {
		font-size: 1.125rem !important;
	}

	/* Action buttons - even smaller */
	.tvoc2-flashcard-actions .tvoc2-memory-btn {
		padding: 5px 8px !important;
		font-size: 10px !important;
		gap: 3px !important;
	}

	.tvoc2-flashcard-actions .tvoc2-memory-btn .dashicons {
		font-size: 10px !important;
		width: 10px !important;
		height: 10px !important;
	}

	.tvoc2-flashcard-actions .tvoc2-btn.tvoc2-btn--shuffle {
		padding: 5px 6px !important;
		font-size: 10px !important;
		gap: 3px !important;
	}

	.tvoc2-flashcard-actions .tvoc2-btn.tvoc2-btn--shuffle .dashicons {
		font-size: 10px !important;
		width: 10px !important;
		height: 10px !important;
	}
}

/* Ultra small screens 360px */
@media screen and (max-width: 360px) {
	/* Nav arrows - minimal */
	.tvoc2-flashcard-area .tvoc2-flashcard-nav {
		width: 20px !important;
		height: 60px !important;
		left: 2px !important;
	}

	.tvoc2-flashcard-area .tvoc2-flashcard-nav--next {
		right: 2px !important;
		left: auto !important;
	}

	.tvoc2-flashcard-area .tvoc2-flashcard-nav .dashicons {
		font-size: 18px !important;
		width: 18px !important;
		height: 18px !important;
	}

	/* Flashcard */
	.tvoc2-flashcard-center .tvoc2-flashcard {
		width: 100% !important;
		max-width: 340px !important;
		height: 260px !important;
		min-height: 260px !important;
	}

	/* Flashcard content - adjusted for 360px */
	.tvoc2-flashcard-center .tvoc2-flashcard__word {
		font-size: 1.75rem !important;
	}

	.tvoc2-flashcard-center .tvoc2-flashcard__meaning {
		font-size: 1rem !important;
	}

	/* Action buttons - minimal */
	.tvoc2-flashcard-actions .tvoc2-memory-btn {
		padding: 4px 6px !important;
		font-size: 9px !important;
		gap: 2px !important;
		border-radius: 12px !important;
	}

	.tvoc2-flashcard-actions .tvoc2-memory-btn .dashicons {
		font-size: 9px !important;
		width: 9px !important;
		height: 9px !important;
	}

	.tvoc2-flashcard-actions .tvoc2-btn.tvoc2-btn--shuffle {
		padding: 4px 5px !important;
		font-size: 9px !important;
		gap: 2px !important;
		border-radius: 12px !important;
	}

	.tvoc2-flashcard-actions .tvoc2-btn.tvoc2-btn--shuffle .dashicons {
		font-size: 9px !important;
		width: 9px !important;
		height: 9px !important;
	}
}
