/* =========================================================
   Mokymų platforma – vaiko aplikacija
   Šiltas, žaismingas, bet ramus dizainas 7–10 m. vaikams.
   Planšetė – pagrindinis scenarijus. WCAG 2.2 AA orientyras.
   ========================================================= */

:root {
	--epc-bg: #FFF7EC;
	--epc-bg-2: #F3EEFF;
	--epc-surface: #FFFFFF;
	--epc-ink: #23263B;
	--epc-ink-soft: #545873;
	--epc-line: #ECE6F7;
	--epc-primary: #6C5CE7;
	--epc-primary-dark: #4B3CC9;
	--epc-primary-soft: #EEEBFF;
	--epc-success: #00A884;
	--epc-success-dark: #00806A;
	--epc-success-soft: #E0F7F0;
	--epc-warn: #B86E00;
	--epc-warn-soft: #FFF3D6;
	--epc-danger: #C8452C;
	--epc-danger-soft: #FDE7E1;
	--epc-sun: #FFB703;
	--epc-radius: 24px;
	--epc-radius-sm: 16px;
	--epc-shadow: 0 10px 30px rgba(52, 40, 120, .10), 0 2px 6px rgba(52, 40, 120, .06);
	--epc-shadow-sm: 0 4px 14px rgba(52, 40, 120, .08);
	--epc-font: "Nunito", "Segoe UI Rounded", ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
	--epc-color: #6C5CE7;
	--epc-focus: 0 0 0 4px #fff, 0 0 0 7px #23263B;
}

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

html.epc-html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html.epc-html { scroll-behavior: auto; } }

body.epc-app:not(.epc-in-theme) {
	margin: 0;
	min-height: 100vh;
	font-family: var(--epc-font);
	font-size: var(--epc-font-size, 18px);
	line-height: 1.55;
	color: var(--epc-ink);
	background: var(--epc-bg);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
body.epc-no-scroll { overflow: hidden; }

.epc-app h1, .epc-app h2, .epc-app h3 { line-height: 1.2; margin: 0 0 .4em; font-weight: 800; letter-spacing: -.01em; font-family: var(--epc-font-heading, var(--epc-font)); }
.epc-app button, .epc-app input, .epc-app select, .epc-app textarea { font-family: inherit; }

/* Dizaino variantai */
.epc-flat .epc-btn, .epc-flat .epc-key, .epc-flat .epc-ltkey, .epc-flat .epc-token, .epc-flat .epc-match__right { box-shadow: none !important; }
.epc-flat .epc-btn:active, .epc-flat .epc-key:active { transform: scale(.97); }
.epc-bg-plain .epc-bg { display: none; }
body.epc-bg-dots:not(.epc-in-theme), .epc-in-theme.epc-bg-dots .epc-app-root { background-image: radial-gradient(rgba(108, 92, 231, .12) 1.5px, transparent 1.6px); background-size: 22px 22px; }
.epc-bg-dots .epc-bg { display: none; }
.epc-mascot--img { object-fit: contain; }
.epc-logo__img { display: block; max-width: 220px; }

/* Temos režimas: vaiko erdvė temos šablone */
.epc-in-theme .epc-app-root { position: relative; background: var(--epc-bg); color: var(--epc-ink); font-family: var(--epc-font); font-size: var(--epc-font-size, 18px); line-height: 1.55; isolation: isolate; overflow: hidden; }
.epc-in-theme .epc-bg { position: absolute; }
.epc-in-theme .epc-topbar { position: relative; top: auto; border-radius: var(--epc-radius); margin-top: 16px; }
.epc-app p { margin: 0 0 1em; }
.epc-app img { max-width: 100%; height: auto; }
.epc-app a { color: var(--epc-primary-dark); }
.epc-app button { font-family: inherit; }
.epc-app :focus-visible { outline: none; box-shadow: var(--epc-focus); border-radius: 12px; }

.epc-visually-hidden, .epc-skip:not(:focus) {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.epc-skip:focus { position: fixed; top: 12px; left: 12px; z-index: 1000; background: #fff; padding: 12px 18px; border-radius: 12px; }

/* Fono dekoracijos */
.epc-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.epc-bg span { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .55; }
.epc-bg span:nth-child(1) { width: 420px; height: 420px; background: radial-gradient(circle, #E9E4FF 0%, transparent 70%); top: -120px; right: -100px; }
.epc-bg span:nth-child(2) { width: 360px; height: 360px; background: radial-gradient(circle, #DDF6EF 0%, transparent 70%); bottom: -120px; left: -120px; }
.epc-bg span:nth-child(3) { width: 260px; height: 260px; background: radial-gradient(circle, #FFE9C2 0%, transparent 70%); top: 40%; left: 55%; }

/* ---------------- Viršutinė juosta ---------------- */

.epc-topbar {
	position: sticky; top: 0; z-index: 50;
	display: flex; align-items: center; gap: 16px;
	max-width: 1180px; margin: 0 auto; padding: 12px 20px;
	background: rgba(255, 255, 255, .92);
	backdrop-filter: saturate(1.4) blur(10px);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
	border-radius: 0 0 var(--epc-radius) var(--epc-radius);
	box-shadow: var(--epc-shadow-sm);
}
.epc-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--epc-ink); font-weight: 800; font-size: 20px; }
.epc-logo__mark { display: inline-flex; }
.epc-nav { display: flex; gap: 6px; margin-left: auto; }
.epc-nav__link {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 10px 18px; min-height: 48px;
	border-radius: 999px; text-decoration: none; font-weight: 700;
	color: var(--epc-ink-soft) !important;
	transition: background .2s, color .2s;
}
.epc-nav__link:hover { background: var(--epc-primary-soft); color: var(--epc-primary-dark) !important; }
.epc-nav__link.is-active { background: var(--epc-primary); color: #fff !important; }
.epc-nav__icon { font-size: 22px; line-height: 1; }

.epc-user { position: relative; }
.epc-user__btn {
	display: inline-flex; align-items: center; gap: 8px; min-height: 48px;
	padding: 6px 14px 6px 6px; border: 2px solid var(--epc-line); border-radius: 999px;
	background: #fff; cursor: pointer; font-weight: 700; color: var(--epc-ink); font-size: 16px;
}
.epc-avatar {
	display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
	background: var(--epc-primary-soft); font-size: 24px; line-height: 1;
}
.epc-user__menu {
	position: absolute; right: 0; top: calc(100% + 10px); width: 300px;
	background: #fff; border-radius: var(--epc-radius); box-shadow: var(--epc-shadow); padding: 16px; z-index: 60;
}
.epc-user__title { font-weight: 700; margin-bottom: 10px; }
.epc-avatar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.epc-avatar-choice {
	aspect-ratio: 1; font-size: 30px; border: 3px solid transparent; border-radius: 16px;
	background: var(--epc-bg); cursor: pointer; transition: transform .15s;
}
.epc-avatar-choice:hover { transform: scale(1.08); }
.epc-avatar-choice.is-selected { border-color: var(--epc-primary); background: var(--epc-primary-soft); }
.epc-menu-row {
	display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 10px 12px;
	border: 0; border-radius: 12px; background: none; text-align: left; text-decoration: none;
	color: var(--epc-ink) !important; font-size: 17px; font-weight: 700; cursor: pointer;
}
.epc-menu-row:hover { background: var(--epc-bg); }
.epc-menu-row--danger { color: var(--epc-danger) !important; }

/* ---------------- Turinys ---------------- */

.epc-main { max-width: 1180px; margin: 0 auto; padding: 28px 20px 120px; outline: none; }
.epc-view-lesson .epc-main, .epc-view-login .epc-main { padding-top: 20px; }

.epc-eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 13px; font-weight: 800; color: var(--epc-ink-soft); margin: 0 0 4px !important; }
.epc-link { font-weight: 800; text-decoration: none; }
.epc-link:hover { text-decoration: underline; }

.epc-page-head { margin: 8px 0 20px; }
.epc-page-head h1 { font-size: clamp(30px, 4.5vw, 42px); }
.epc-page-head__lead { color: var(--epc-ink-soft); font-size: 20px; }

.epc-section { margin-top: 36px; }
.epc-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.epc-section__head h2 { font-size: 26px; margin: 0; }

/* ---------------- Mygtukai ---------------- */

.epc-btn {
	--b: var(--epc-surface); --t: var(--epc-ink); --s: #DCD5EE;
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 52px; padding: 12px 24px;
	border: 0; border-radius: 18px;
	background: var(--b); color: var(--t) !important;
	font-family: inherit; font-size: 18px; font-weight: 800; line-height: 1.2;
	text-decoration: none; cursor: pointer; text-align: center;
	box-shadow: 0 5px 0 var(--s);
	transform: translateY(0);
	transition: transform .08s, box-shadow .08s, filter .2s;
	-webkit-tap-highlight-color: transparent;
	user-select: none;
}
.epc-btn:hover { filter: brightness(1.04); }
.epc-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--s); }
.epc-btn:focus-visible { box-shadow: 0 5px 0 var(--s), var(--epc-focus); }
.epc-btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.epc-btn--primary { --b: var(--epc-primary); --t: #fff; --s: var(--epc-primary-dark); }
.epc-btn--success { --b: var(--epc-success); --t: #fff; --s: var(--epc-success-dark); }
.epc-btn--soft { --b: var(--epc-primary-soft); --t: var(--epc-primary-dark); --s: #D6D0FA; }
.epc-btn--ghost { --b: transparent; --t: var(--epc-ink-soft); --s: transparent; box-shadow: inset 0 0 0 2px var(--epc-line); }
.epc-btn--ghost:active { box-shadow: inset 0 0 0 2px var(--epc-line); }
.epc-btn--lg { min-height: 58px; font-size: 19px; padding: 14px 28px; }
.epc-btn--xl { min-height: 66px; font-size: 21px; padding: 16px 32px; border-radius: 22px; }
.epc-btn--block { display: flex; width: 100%; }
.epc-btn.is-done { --b: var(--epc-success-soft); --t: var(--epc-success-dark); --s: #BFEBDD; opacity: 1; }

.epc-icon-btn {
	display: inline-grid; place-items: center; flex: none;
	width: 52px; height: 52px; border-radius: 50%;
	background: #fff; color: var(--epc-ink) !important; text-decoration: none;
	font-size: 24px; font-weight: 800; box-shadow: var(--epc-shadow-sm);
}

/* ---------------- Įspėjimai ---------------- */

.epc-alert { padding: 14px 18px; border-radius: var(--epc-radius-sm); margin: 0 0 16px; font-weight: 600; }
.epc-alert--info { background: var(--epc-primary-soft); color: var(--epc-primary-dark); }
.epc-alert--success { background: var(--epc-success-soft); color: var(--epc-success-dark); }
.epc-alert--error { background: var(--epc-danger-soft); color: #9B2F1B; }
.epc-alert a { font-weight: 800; }

/* ---------------- Progresas ---------------- */

.epc-progress { display: block; position: relative; height: 14px; background: #EEE9F8; border-radius: 999px; overflow: hidden; }
.epc-progress__bar {
	display: block; height: 100%; border-radius: inherit;
	background: linear-gradient(90deg, var(--epc-color), color-mix(in srgb, var(--epc-color) 70%, #fff));
	background-color: var(--epc-color);
	transition: width .6s cubic-bezier(.2, .8, .2, 1);
}

/* ---------------- Hero ---------------- */

.epc-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.epc-hero__title { font-size: clamp(32px, 5vw, 48px); }
.epc-hero__lead { font-size: 21px; color: var(--epc-ink-soft); }
.epc-wave { display: inline-block; transform-origin: 70% 70%; animation: epc-wave 2.2s ease-in-out 1; }
.epc-hero__mascot .epc-mascot { animation: epc-float 4s ease-in-out infinite; }
.epc-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.epc-stat { background: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 700; box-shadow: var(--epc-shadow-sm); font-size: 16px; }

/* ---------------- Tęsti mokymąsi ---------------- */

.epc-continue {
	position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
	padding: 28px; border-radius: 32px; background: #fff; box-shadow: var(--epc-shadow);
	border: 3px solid color-mix(in srgb, var(--epc-color) 25%, transparent);
	overflow: hidden;
}
.epc-continue::before {
	content: ""; position: absolute; inset: 0 auto 0 0; width: 10px; background: var(--epc-color);
}
.epc-continue__icon {
	display: grid; place-items: center; width: 104px; height: 104px; border-radius: 28px;
	background: color-mix(in srgb, var(--epc-color) 15%, #fff); font-size: 56px;
}
.epc-continue__title { font-size: clamp(24px, 3.4vw, 32px); margin: 0 0 2px; }
.epc-continue__meta { color: var(--epc-ink-soft); margin: 0 0 12px !important; }
.epc-continue__progress { display: flex; align-items: center; gap: 12px; max-width: 420px; }
.epc-continue__progress .epc-progress { flex: 1; }
.epc-continue__count { font-weight: 800; white-space: nowrap; }
.epc-continue--done { grid-template-columns: auto 1fr; background: linear-gradient(135deg, #FFF3D6, #FFFFFF); }

/* ---------------- Pamokų kortelės ---------------- */

.epc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.epc-lesson-card {
	position: relative; display: flex; flex-direction: column; gap: 14px;
	padding: 20px; min-height: 210px; border-radius: var(--epc-radius);
	background: #fff; color: var(--epc-ink) !important; text-decoration: none;
	box-shadow: var(--epc-shadow-sm); border: 2px solid transparent;
	transition: transform .15s, box-shadow .15s, border-color .15s;
}
.epc-lesson-card:hover { transform: translateY(-4px); box-shadow: var(--epc-shadow); border-color: color-mix(in srgb, var(--epc-color) 35%, transparent); }
.epc-lesson-card__icon {
	display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px;
	background: color-mix(in srgb, var(--epc-color) 16%, #fff); font-size: 36px;
}
.epc-lesson-card__body { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.epc-lesson-card__title { font-size: 20px; font-weight: 800; line-height: 1.25; }
.epc-lesson-card__meta { font-size: 15px; color: var(--epc-ink-soft); }
.epc-lesson-card .epc-progress { margin-top: auto; }
.epc-lesson-card.is-done .epc-progress__bar { background: var(--epc-success); }
.epc-lesson-card.is-locked { opacity: .75; }
.epc-lesson-card.is-locked .epc-lesson-card__icon { filter: grayscale(.8); }

.epc-pill {
	position: absolute; top: 16px; right: 16px;
	padding: 4px 12px; border-radius: 999px; font-size: 14px; font-weight: 800;
}
.epc-pill--done { background: var(--epc-success-soft); color: var(--epc-success-dark); }
.epc-pill--progress { background: var(--epc-primary-soft); color: var(--epc-primary-dark); }
.epc-pill--new { background: var(--epc-warn-soft); color: var(--epc-warn); }
.epc-pill--locked { background: #EFEFF4; color: #5B5F73; }

/* ---------------- Pamokų „takas“ ---------------- */

.epc-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; }
.epc-chip {
	display: inline-flex; align-items: center; min-height: 48px; padding: 8px 20px; border-radius: 999px;
	background: #fff; color: var(--epc-ink) !important; text-decoration: none; font-weight: 800;
	box-shadow: var(--epc-shadow-sm); border: 2px solid transparent;
}
.epc-chip:hover { border-color: var(--epc-primary); }
.epc-chip.is-active { background: var(--epc-primary); color: #fff !important; }
.epc-chips--soft .epc-chip.is-active { background: var(--epc-ink); }

.epc-path__title { font-size: 24px; }
.epc-path { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; position: relative; }
.epc-path__link {
	display: grid; grid-template-columns: auto auto 1fr auto auto; align-items: center; gap: 16px;
	padding: 14px 18px; border-radius: 22px; background: #fff; box-shadow: var(--epc-shadow-sm);
	color: var(--epc-ink) !important; text-decoration: none; min-height: 80px;
	transition: transform .15s, box-shadow .15s;
}
.epc-path__link:hover { transform: translateX(4px); box-shadow: var(--epc-shadow); }
.epc-path__num {
	display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
	background: var(--epc-primary-soft); color: var(--epc-primary-dark); font-weight: 900;
}
.epc-path__item.is-completed .epc-path__num { background: var(--epc-success); color: #fff; }
.epc-path__item.is-in_progress .epc-path__num { background: var(--epc-color); color: #fff; }
.epc-path__icon { font-size: 34px; }
.epc-path__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.epc-path__name { font-weight: 800; font-size: 19px; }
.epc-path__pct { font-weight: 800; color: var(--epc-ink-soft); white-space: nowrap; }
.epc-path__arrow { font-size: 30px; color: #B9B3CF; }
.epc-path__item.is-locked .epc-path__link { opacity: .7; }

/* ---------------- Ženkliukai ---------------- */

.epc-badge {
	display: inline-grid; place-items: center; flex: none; position: relative;
	width: 72px; height: 72px; border-radius: 50%;
	background: radial-gradient(circle at 30% 25%, #fff 0, color-mix(in srgb, var(--epc-color) 55%, #fff) 45%, var(--epc-color) 100%);
	background-color: var(--epc-color);
	box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .12), 0 6px 16px color-mix(in srgb, var(--epc-color) 40%, transparent);
	font-size: 38px; line-height: 1;
	border: 4px solid #fff;
}
.epc-badge img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.epc-badge--md { width: 72px; height: 72px; font-size: 38px; }
.epc-badge--lg { width: 104px; height: 104px; font-size: 54px; }
.epc-badge--xl { width: 150px; height: 150px; font-size: 80px; border-width: 6px; }
.epc-badge.is-locked { background: #E9E7F0; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .06); font-size: 34px; filter: grayscale(1); }

.epc-badge-row { display: flex; flex-wrap: wrap; gap: 18px; }
.epc-badge-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 120px; text-align: center; }
.epc-badge-tile__name { font-weight: 800; font-size: 15px; line-height: 1.25; }

.epc-badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; }
.epc-badge-card {
	display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 14px;
	background: #fff; border: 0; border-radius: var(--epc-radius); box-shadow: var(--epc-shadow-sm);
	color: var(--epc-ink) !important; text-decoration: none; cursor: pointer; font: inherit; text-align: center;
	transition: transform .15s;
}
.epc-badge-card:hover { transform: translateY(-4px) rotate(-1deg); }
.epc-badge-card__name { font-weight: 800; font-size: 17px; line-height: 1.25; }
.epc-badge-card__date { font-size: 14px; color: var(--epc-ink-soft); }
.epc-badge-card.is-locked { background: rgba(255, 255, 255, .6); box-shadow: none; border: 2px dashed #D9D3EA; }

.epc-dialog {
	border: 0; border-radius: 32px; padding: 32px; max-width: 420px; width: calc(100% - 32px);
	text-align: center; box-shadow: var(--epc-shadow);
}
.epc-dialog::backdrop { background: rgba(35, 38, 59, .45); }
.epc-dialog__badge .epc-badge { width: 140px; height: 140px; font-size: 76px; margin-bottom: 12px; animation: epc-pop .5s cubic-bezier(.2, 1.6, .4, 1); }
.epc-dialog__date { color: var(--epc-ink-soft); }

/* ---------------- Tuščios būsenos ---------------- */

.epc-empty {
	display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
	padding: 36px 20px; background: rgba(255, 255, 255, .7); border-radius: var(--epc-radius); border: 2px dashed #E1DAF2;
}
.epc-empty > span { font-size: 48px; }
.epc-empty--small { padding: 22px; flex-direction: row; justify-content: center; }
.epc-empty--small > span { font-size: 32px; }
.epc-empty--small p { margin: 0; }
.epc-empty--page { margin-top: 40px; }

/* ---------------- Prisijungimas ---------------- */

.epc-login { display: grid; place-items: center; min-height: calc(100vh - 60px); padding: 12px 0; }
.epc-login__card {
	width: 100%; max-width: 460px; padding: 32px 28px; text-align: center;
	background: #fff; border-radius: 36px; box-shadow: var(--epc-shadow);
}
.epc-login__mascot { margin-top: -8px; }
.epc-login__mascot .epc-mascot { animation: epc-float 4s ease-in-out infinite; }
.epc-login__title { font-size: 32px; margin-top: 4px; }
.epc-login__lead { color: var(--epc-ink-soft); font-weight: 700; }
.epc-login__form { display: flex; flex-direction: column; gap: 16px; text-align: left; margin-top: 8px; }
.epc-login__form.is-shake { animation: epc-shake .45s; }
.epc-login__form.is-sending { opacity: .7; pointer-events: none; }
.epc-login__help { margin-top: 20px; font-size: 16px; color: var(--epc-ink-soft); }
.epc-login__parents { font-size: 16px; margin: 0; }
.epc-login__parents a { font-weight: 800; }

.epc-field { display: flex; flex-direction: column; gap: 6px; position: relative; }
.epc-field__label { font-weight: 800; }
input.epc-input {
	width: 100%; min-height: 56px; padding: 12px 16px;
	border: 3px solid var(--epc-line); border-radius: 18px; background: #FCFBFF;
	font: inherit; font-size: 20px; color: var(--epc-ink);
	transition: border-color .15s, background .15s;
}
.epc-input:focus { outline: none; border-color: var(--epc-primary); background: #fff; box-shadow: 0 0 0 4px var(--epc-primary-soft); }
input.epc-input--xl { font-size: 22px; font-weight: 700; }
input.epc-input--pin { letter-spacing: .9em; font-size: 26px; text-align: center; color: transparent; caret-color: var(--epc-ink); }
.epc-pin-dots { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; gap: 14px; pointer-events: none; }
.epc-pin-dots i { width: 18px; height: 18px; border-radius: 50%; background: #E3DDF3; transition: transform .15s, background .15s; }
.epc-pin-dots i.is-filled { background: var(--epc-primary); transform: scale(1.15); }

.epc-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.epc-key {
	min-height: 64px; border: 0; border-radius: 20px; background: var(--epc-bg-2);
	font-size: 28px; font-weight: 800; color: var(--epc-ink); cursor: pointer;
	box-shadow: 0 4px 0 #DCD3F5; transition: transform .06s, box-shadow .06s;
	-webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.epc-key:active { transform: translateY(3px); box-shadow: 0 1px 0 #DCD3F5; }
.epc-key--muted { background: #F4F3F8; color: var(--epc-ink-soft); box-shadow: 0 4px 0 #E2E0EA; }
.epc-key--go { background: var(--epc-success); color: #fff; box-shadow: 0 4px 0 var(--epc-success-dark); }

.epc-check { display: flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; }
.epc-check input { width: 26px; height: 26px; accent-color: var(--epc-primary); }

/* ---------------- Pamoka ---------------- */

.epc-lesson__top {
	display: grid; grid-template-columns: auto auto 1fr minmax(180px, 280px); align-items: center; gap: 16px;
	padding: 14px 18px; margin-bottom: 18px; background: #fff; border-radius: var(--epc-radius); box-shadow: var(--epc-shadow-sm);
}
.epc-lesson__icon {
	display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px;
	background: color-mix(in srgb, var(--epc-color) 16%, #fff); font-size: 32px;
}
.epc-lesson__title { font-size: clamp(22px, 3vw, 30px); margin: 0 !important; }
.epc-lesson__progress { display: flex; align-items: center; gap: 12px; }
.epc-lesson__progress .epc-progress { flex: 1; height: 16px; }
.epc-lesson__count { font-weight: 800; white-space: nowrap; }

.epc-lesson__body { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 22px; align-items: start; }

.epc-steps { position: sticky; top: 18px; min-width: 0; }
.epc-steps__list { list-style: none; margin: 0; padding: 12px; display: flex; flex-direction: column; gap: 6px; background: #fff; border-radius: var(--epc-radius); box-shadow: var(--epc-shadow-sm); }
.epc-step-tab {
	display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 12px;
	border: 2px solid transparent; border-radius: 18px; background: none; cursor: pointer;
	font: inherit; font-weight: 700; font-size: 17px; color: var(--epc-ink); text-align: left;
	transition: background .15s, border-color .15s;
}
.epc-step-tab:hover { background: var(--epc-bg); }
.epc-step-tab.is-active { background: color-mix(in srgb, var(--epc-color) 12%, #fff); border-color: var(--epc-color); }
.epc-step-tab__num {
	position: relative; display: grid; place-items: center; flex: none;
	width: 36px; height: 36px; border-radius: 50%; background: #EFEBFA; color: var(--epc-ink-soft); font-weight: 900; font-size: 16px;
}
.epc-step-tab__check { display: none; }
.epc-step-tab.is-done .epc-step-tab__num { background: var(--epc-success); color: #fff; }
.epc-step-tab.is-done .epc-step-tab__n { display: none; }
.epc-step-tab.is-done .epc-step-tab__check { display: inline; animation: epc-pop .4s cubic-bezier(.2, 1.6, .4, 1); }
.epc-step-tab.is-active:not(.is-done) .epc-step-tab__num { background: var(--epc-color); color: #fff; }
.epc-step-tab__icon { font-size: 24px; }
.epc-step-tab__label { display: flex; flex-direction: column; line-height: 1.2; }
.epc-step-tab__label small { font-weight: 600; color: var(--epc-ink-soft); font-size: 13px; }

.epc-stage { min-width: 0; scroll-margin-top: 16px; }
.epc-panel {
	background: #fff; border-radius: 28px; box-shadow: var(--epc-shadow); padding: 28px;
	animation: epc-in .35s ease;
}
.epc-panel[hidden] { display: none; }
.epc-panel__head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.epc-panel__icon { font-size: 34px; }
.epc-panel__title { font-size: clamp(24px, 3vw, 32px); margin: 0 !important; flex: 1; outline: none; }
.epc-panel__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.epc-panel__status {
	margin-top: 20px; padding: 12px 18px; border-radius: 16px; font-weight: 800;
	background: var(--epc-success-soft); color: var(--epc-success-dark); animation: epc-pop .4s ease;
}
.epc-panel__status[hidden] { display: none; }

.epc-tts {
	display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 16px;
	border: 0; border-radius: 999px; background: var(--epc-warn-soft); color: #7A4A00; font-weight: 800; font-size: 16px; cursor: pointer;
}
.epc-tts.is-speaking { background: var(--epc-sun); color: #3D2600; animation: epc-pulse 1.2s infinite; }
.epc-tts[hidden] { display: none; }

.epc-stage__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }

.epc-prose { font-size: 20px; line-height: 1.7; }
.epc-prose h2, .epc-prose h3 { margin-top: 1em; }
.epc-prose ul, .epc-prose ol { padding-left: 1.3em; }
.epc-prose strong { color: var(--epc-primary-dark); }
.epc-prose mark { background: #FFE9A8; padding: 0 .2em; border-radius: 4px; }

.epc-figure { margin: 0 0 20px; }
.epc-figure__img { display: block; width: auto; max-width: 100%; max-height: 360px; height: auto; margin: 0 auto; object-fit: contain; border-radius: 22px; }
.epc-figure--small { max-width: 420px; margin-inline: auto; }

.epc-instructions { font-size: 19px; font-weight: 600; background: var(--epc-bg); padding: 14px 18px; border-radius: 16px; }
.epc-goal { font-weight: 800; color: var(--epc-primary-dark); }
.epc-score { font-weight: 800; margin-top: 14px; }

/* Video */
.epc-video {
	position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: 22px; overflow: hidden;
	background: linear-gradient(135deg, var(--epc-color), color-mix(in srgb, var(--epc-color) 55%, #23263B));
	background-color: var(--epc-color);
}
.epc-video__el, .epc-video__frame, .epc-video__frame > *, .epc-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.epc-video__el { background: #000; }
.epc-video__poster {
	position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
	width: 100%; border: 0; background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .18), transparent 60%);
	color: #fff; cursor: pointer; font: inherit;
}
.epc-video__poster[hidden] { display: none; }
.epc-video__play {
	display: grid; place-items: center; width: 104px; height: 104px; border-radius: 50%;
	background: #fff; color: var(--epc-color); font-size: 42px; padding-left: 8px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .25); transition: transform .2s;
	animation: epc-pulse-ring 2s infinite;
}
.epc-video__poster:hover .epc-video__play { transform: scale(1.08); }
.epc-video__label { font-size: 22px; font-weight: 800; text-shadow: 0 2px 8px rgba(0, 0, 0, .25); }

.epc-watch { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.epc-watch__ring {
	--p: 0;
	display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
	background: conic-gradient(var(--epc-success) calc(var(--p) * 1%), #ECE8F6 0);
	position: relative; flex: none;
}
.epc-watch__ring::before { content: ""; position: absolute; inset: 7px; background: #fff; border-radius: 50%; }
.epc-watch__ring > span { position: relative; font-weight: 900; font-size: 15px; }
.epc-watch__ring.is-done { background: var(--epc-success); }
.epc-watch__text { color: var(--epc-ink-soft); font-weight: 700; flex: 1; min-width: 180px; }

.epc-details { margin-top: 18px; background: var(--epc-bg); border-radius: 16px; padding: 4px 18px; }
.epc-details summary { cursor: pointer; font-weight: 800; padding: 12px 0; min-height: 48px; }

/* H5P */
.epc-h5p { border-radius: 20px; overflow: hidden; }
.epc-h5p iframe { border-radius: 16px; }

/* Diktantas */
.epc-howto { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; counter-reset: s; }
.epc-howto li {
	counter-increment: s; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
	padding: 14px 8px; background: var(--epc-bg); border-radius: 18px; font-weight: 800; font-size: 17px;
}
.epc-howto li span { font-size: 32px; }
.epc-listen { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; margin: 8px 0; }
.epc-listen__left { font-weight: 800; color: var(--epc-ink-soft); }
[data-epc-play].is-playing { animation: epc-pulse 1.2s infinite; }
.epc-reveal {
	margin-top: 22px; padding: 22px; border-radius: 22px; background: #FFFBEF; border: 3px dashed #F4D483;
	animation: epc-in .35s ease;
}
.epc-reveal[hidden] { display: none; }
.epc-reveal__label { font-weight: 800; color: var(--epc-warn); margin-bottom: 6px !important; }
.epc-reveal__text { font-size: 24px; line-height: 1.8; font-weight: 700; white-space: pre-wrap; margin-bottom: 10px !important; }
.epc-reveal__hint { margin: 0 !important; color: var(--epc-ink-soft); }

/* Įsivertinimas */
.epc-question { font-size: 22px; font-weight: 800; }
.epc-feel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.epc-feel__btn {
	display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 10px; min-height: 140px;
	border: 3px solid var(--epc-line); border-radius: 24px; background: #fff; cursor: pointer;
	font: inherit; font-weight: 800; font-size: 18px; color: var(--epc-ink);
	transition: transform .15s, border-color .15s, background .15s;
}
.epc-feel__btn span { font-size: 54px; line-height: 1; transition: transform .2s; }
.epc-feel__btn:hover { transform: translateY(-3px); border-color: var(--epc-primary); }
.epc-feel__btn:hover span { transform: scale(1.12); }
.epc-feel__btn.is-selected { border-color: var(--epc-primary); background: var(--epc-primary-soft); }
.epc-feel__thanks { margin-top: 16px; font-weight: 800; color: var(--epc-primary-dark); }
.epc-feel__thanks[hidden] { display: none; }

.epc-resources { list-style: none; padding: 0; display: grid; gap: 10px; }
.epc-resources a {
	display: flex; align-items: center; gap: 10px; padding: 14px 18px; min-height: 56px; border-radius: 16px;
	background: var(--epc-bg); text-decoration: none; font-weight: 800;
}

/* Šventė */
.epc-celebrate {
	position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px;
	background: rgba(35, 38, 59, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
	animation: epc-fade .25s ease;
}
.epc-celebrate[hidden] { display: none; }
.epc-celebrate__card {
	width: 100%; max-width: 480px; padding: 36px 28px 28px; text-align: center;
	background: #fff; border-radius: 36px; box-shadow: 0 30px 80px rgba(0, 0, 0, .25);
	animation: epc-pop .5s cubic-bezier(.2, 1.4, .4, 1);
}
.epc-celebrate__badge { margin: -100px auto 10px; }
.epc-celebrate__badge .epc-badge { animation: epc-spin-in .9s cubic-bezier(.2, 1.4, .4, 1); }
.epc-celebrate__title { font-size: 30px; }
.epc-celebrate__text { font-size: 19px; color: var(--epc-ink-soft); }
.epc-celebrate__actions { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }

.epc-locked { text-align: center; max-width: 560px; margin: 40px auto; background: #fff; padding: 40px 28px; border-radius: 32px; box-shadow: var(--epc-shadow); }
.epc-locked__icon { position: relative; display: inline-grid; place-items: center; width: 120px; height: 120px; border-radius: 34px; background: color-mix(in srgb, var(--epc-color) 15%, #fff); font-size: 64px; margin-bottom: 16px; }
.epc-locked__icon span { position: absolute; right: -10px; bottom: -10px; font-size: 40px; }
.epc-locked__text { font-size: 19px; color: var(--epc-ink-soft); }

.epc-switch-form { margin: 0 0 12px; }

/* Pranešimai */
.epc-toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 10px; width: min(92vw, 460px); pointer-events: none; }
.epc-toast {
	padding: 14px 20px; border-radius: 18px; font-weight: 800; font-size: 18px; text-align: center;
	background: var(--epc-ink); color: #fff; box-shadow: var(--epc-shadow);
	animation: epc-toast-in .35s cubic-bezier(.2, 1.4, .4, 1);
	transition: opacity .4s, transform .4s;
}
.epc-toast--success { background: var(--epc-success-dark); }
.epc-toast--warn { background: #8A5300; }
.epc-toast--error { background: #A3341F; }
.epc-toast.is-out { opacity: 0; transform: translateY(10px); }

.epc-confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 250; display: none; }

/* Senesnėms naršyklėms be color-mix() */
@supports not (color: color-mix(in srgb, red 50%, white)) {
	.epc-continue__icon, .epc-lesson-card__icon, .epc-lesson__icon, .epc-locked__icon { background: var(--epc-bg-2); }
	.epc-step-tab.is-active { background: var(--epc-primary-soft); }
	.epc-progress__bar { background: var(--epc-color); }
	.epc-badge { background: var(--epc-color); }
	.epc-continue { border-color: var(--epc-line); }
}

/* ---------------- Animacijos ---------------- */

@keyframes epc-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes epc-wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(16deg); } 20%, 40% { transform: rotate(-8deg); } }
@keyframes epc-pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes epc-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes epc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes epc-shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
@keyframes epc-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes epc-pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .6), 0 10px 30px rgba(0, 0, 0, .25); } 100% { box-shadow: 0 0 0 26px rgba(255, 255, 255, 0), 0 10px 30px rgba(0, 0, 0, .25); } }
@keyframes epc-spin-in { 0% { transform: scale(.2) rotate(-200deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes epc-toast-in { from { opacity: 0; transform: translateY(20px) scale(.95); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
	.epc-app *, .epc-app *::before, .epc-app *::after { animation: none !important; transition: none !important; }
}

/* ---------------- Planšetė ---------------- */

@media (max-width: 1024px) {
	.epc-lesson__body { grid-template-columns: 240px minmax(0, 1fr); }
	.epc-lesson__top { grid-template-columns: auto auto 1fr; }
	.epc-lesson__progress { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
	.epc-lesson__body { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.epc-steps { position: sticky; top: 0; z-index: 20; margin: 0 -20px; padding: 8px 20px; background: linear-gradient(var(--epc-bg) 80%, transparent); }
	.epc-steps__list { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
	.epc-steps__list::-webkit-scrollbar { display: none; }
	.epc-steps__list li { flex: none; scroll-snap-align: center; }
	.epc-step-tab { min-height: 56px; padding: 8px 14px; white-space: nowrap; }
	.epc-step-tab__label small { display: none; }
	.epc-continue { grid-template-columns: auto 1fr; }
	.epc-continue__cta { grid-column: 1 / -1; width: 100%; }
}

/* ---------------- Telefonas ---------------- */

@media (max-width: 720px) {
	body.epc-app { font-size: 17px; }
	.epc-main { padding: 18px 16px 120px; }
	/* backdrop-filter sukuria „containing block“ fiksuotiems vaikams – apatinis meniu tada neprisitvirtintų prie ekrano apačios. */
	.epc-topbar { border-radius: 0; padding: 10px 16px; backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
	.epc-logo__text { display: none; }
	.epc-nav {
		position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 60;
		justify-content: space-around; padding: 8px; margin: 0;
		background: #fff; border-radius: 26px; box-shadow: 0 10px 40px rgba(35, 38, 59, .18);
	}
	.epc-nav__link { flex-direction: column; gap: 2px; padding: 6px 14px; font-size: 13px; min-height: 58px; flex: 1; justify-content: center; border-radius: 20px; }
	.epc-nav__icon { font-size: 26px; }
	.epc-user { margin-left: auto; }
	.epc-user__name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.epc-user__menu { width: min(300px, calc(100vw - 32px)); }
	.epc-hero__mascot { display: none; }
	.epc-continue { padding: 20px; gap: 16px; border-radius: 26px; }
	.epc-continue__icon { width: 72px; height: 72px; font-size: 40px; border-radius: 22px; }
	.epc-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
	.epc-lesson-card { min-height: 190px; padding: 16px; }
	.epc-lesson-card__title { font-size: 17px; }
	.epc-pill { position: static; align-self: flex-start; font-size: 13px; }
	.epc-path__link { grid-template-columns: auto 1fr auto; gap: 12px; padding: 12px 14px; }
	.epc-path__icon, .epc-path__arrow { display: none; }
	.epc-lesson__top { grid-template-columns: auto 1fr; padding: 12px; gap: 12px; }
	.epc-lesson__icon { display: none; }
	.epc-panel { padding: 20px 16px; border-radius: 24px; }
	.epc-prose { font-size: 18px; }
	.epc-feel { grid-template-columns: 1fr; }
	.epc-feel__btn { flex-direction: row; min-height: 72px; justify-content: flex-start; padding: 14px 18px; }
	.epc-feel__btn span { font-size: 40px; }
	.epc-howto { grid-template-columns: 1fr 1fr 1fr; }
	.epc-howto li { font-size: 14px; }
	.epc-stage__nav .epc-btn { flex: 1; }
	.epc-celebrate__badge .epc-badge--xl { width: 120px; height: 120px; font-size: 64px; }
	.epc-celebrate__badge { margin-top: -80px; }
	.epc-toasts { bottom: 100px; }
}

@media (max-width: 380px) {
	.epc-grid { grid-template-columns: 1fr; }
	.epc-key { min-height: 58px; }
}

/* =========================================================
   Užduotys (savas variklis)
   ========================================================= */

.epc-ex { margin-top: 4px; }
.epc-ex-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.epc-ex-count { font-weight: 900; color: var(--epc-ink-soft); }
.epc-ex-dots { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.epc-ex-dot { width: 16px; height: 16px; border-radius: 50%; background: #E7E2F3; transition: transform .2s; }
.epc-ex-dot.is-current { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--epc-primary); transform: scale(1.1); }
.epc-ex-dot.is-good { background: var(--epc-success); }
.epc-ex-dot.is-half { background: var(--epc-sun); }
.epc-ex-dot.is-bad { background: #F09A85; }

.epc-ex-card { background: var(--epc-bg); border-radius: 24px; padding: 22px; animation: epc-in .3s ease; }
.epc-ex-card.is-shake { animation: epc-shake .45s; }
.epc-ex-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.epc-ex-title { flex: 1; font-size: clamp(19px, 2.4vw, 23px); line-height: 1.4; margin: 0 !important; outline: none; }
.epc-tts--small { min-height: 44px; padding: 6px 12px; font-size: 20px; }
.epc-ex-img { display: block; max-width: min(100%, 420px); max-height: 300px; object-fit: contain; margin: 0 auto 16px; border-radius: 18px; background: #fff; }

.epc-ex-text { font-size: clamp(20px, 2.6vw, 26px); line-height: 2.3; margin: 0 !important; }
input.epc-gap {
	--len: 4;
	display: inline-block; vertical-align: baseline; width: calc(var(--len) * 1.05em + 1.2em); min-width: 3em; max-width: 100%;
	height: 1.7em; margin: 0 .15em; padding: 0 .4em;
	font: inherit; font-weight: 800; color: var(--epc-primary-dark); text-align: center;
	background: #fff; border: 0; border-bottom: 4px solid #CFC6EE; border-radius: 10px 10px 4px 4px;
	box-shadow: inset 0 0 0 2px #ECE6F7; transition: border-color .15s, background .15s;
}
/* Raidžių langeliai: lygiaplotis šriftas – kiekviena raidė tiksliai savo langelyje. */
input.epc-gap--boxes {
	--pitch: calc(1ch + .7em);
	min-width: 0; width: calc(var(--len) * var(--pitch) + 2px); padding: 0 0 0 .35em; text-align: left;
	font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, "Courier New", monospace; letter-spacing: .7em;
	background-image: repeating-linear-gradient(90deg, transparent 0 calc(var(--pitch) - 2px), #D9D1F2 calc(var(--pitch) - 2px) var(--pitch));
	background-size: calc(var(--len) * var(--pitch)) 100%; background-repeat: no-repeat; background-position: 0 0;
}
input.epc-gap--wide { width: 100%; font-size: 22px; text-align: left; height: 54px; }
.epc-gap:focus { outline: none; border-bottom-color: var(--epc-primary); box-shadow: inset 0 0 0 2px var(--epc-primary), 0 0 0 4px var(--epc-primary-soft); }
.epc-gap.is-ok { color: var(--epc-success-dark); border-bottom-color: var(--epc-success); background-color: var(--epc-success-soft); box-shadow: none; }
.epc-gap.is-bad { color: #9B2F1B; border-bottom-color: var(--epc-danger); background-color: var(--epc-danger-soft); box-shadow: none; }
.epc-gap.is-shown { color: #1E5FA8; border-bottom-color: #4A90D9; background-color: #E3F0FD; box-shadow: none; }

.epc-ltkeys { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; justify-content: center; }
.epc-ltkey {
	min-width: 48px; min-height: 48px; border: 0; border-radius: 14px; background: #fff; cursor: pointer;
	font: inherit; font-size: 22px; font-weight: 800; color: var(--epc-ink); box-shadow: 0 3px 0 #DCD3F5;
	touch-action: manipulation;
}
.epc-ltkey:active { transform: translateY(2px); box-shadow: 0 1px 0 #DCD3F5; }

.epc-ex-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.epc-ex-wcard { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: #fff; border-radius: 20px; box-shadow: var(--epc-shadow-sm); }
.epc-ex-wcard__img { width: 100%; height: 140px; object-fit: contain; border-radius: 12px; }
.epc-ex-wcard__prompt { font-weight: 800; font-size: 19px; }

/* Pasirinkimas tekste */
.epc-choice { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 2px #ECE6F7; white-space: nowrap; }
.epc-choice__sep { color: #B6AFCB; padding: 0 2px; }
.epc-choice__opt {
	min-height: 46px; padding: 2px 12px; border: 0; border-radius: 10px; background: transparent; cursor: pointer;
	font: inherit; font-weight: 800; color: var(--epc-ink); line-height: 1.3;
}
.epc-choice__opt:hover { background: var(--epc-primary-soft); }
.epc-choice__opt.is-on { background: var(--epc-primary); color: #fff; }
.is-strike .epc-choice__opt.is-struck { text-decoration: line-through; text-decoration-thickness: 4px; text-decoration-color: var(--epc-danger); color: #9C97AE; }
.is-strike .epc-choice__opt.is-on { background: transparent; color: var(--epc-ink); box-shadow: inset 0 -4px 0 var(--epc-primary); }
.is-strike .epc-choice.is-ok .epc-choice__opt.is-on { background: transparent; color: var(--epc-success-dark); box-shadow: inset 0 -4px 0 var(--epc-success); }
.is-strike .epc-choice.is-shown .epc-choice__opt.is-on { background: transparent; color: #1E5FA8; box-shadow: inset 0 -4px 0 #4A90D9; }
.epc-choice.is-ok { box-shadow: inset 0 0 0 3px var(--epc-success); }
.epc-choice.is-ok .epc-choice__opt.is-on { background: var(--epc-success); color: #fff; }
.epc-choice.is-bad { box-shadow: inset 0 0 0 3px var(--epc-danger); }
.epc-choice.is-shown { box-shadow: inset 0 0 0 3px #4A90D9; }
.epc-choice.is-shown .epc-choice__opt.is-on { background: #4A90D9; color: #fff; }
.epc-choice.is-locked .epc-choice__opt { cursor: default; }

/* Poros */
.epc-match__hint { color: var(--epc-ink-soft); font-weight: 700; margin-bottom: 12px !important; transition: color .2s; }
.epc-match__hint.is-attention { color: var(--epc-primary-dark); animation: epc-shake .45s; }
.epc-match { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
.epc-match__col { display: flex; flex-direction: column; gap: 10px; }
.epc-match__col--right { position: sticky; top: 90px; flex-direction: row; flex-wrap: wrap; align-content: flex-start; }
.epc-match__left {
	display: flex; align-items: center; gap: 0; min-height: 60px; padding: 8px 14px; border: 3px solid transparent; border-radius: 18px;
	background: #fff; cursor: pointer; font: inherit; font-size: 22px; font-weight: 800; color: var(--epc-ink); text-align: left;
	box-shadow: var(--epc-shadow-sm); transition: border-color .15s, transform .15s;
}
.epc-match__left.is-current { border-color: var(--epc-primary); transform: translateX(4px); }
.epc-match__img { width: 48px; height: 48px; object-fit: cover; border-radius: 10px; margin-right: 10px; }
.epc-match__slot {
	display: inline-block; min-width: 2.6em; margin-left: 1px; padding: 0 .25em; text-align: center;
	color: #B6AFCB; border-bottom: 3px dashed #CFC6EE;
}
.epc-match__left.is-filled .epc-match__slot { color: var(--epc-primary-dark); border-bottom-style: solid; border-bottom-color: var(--epc-primary); }
.epc-match__left.is-ok { border-color: var(--epc-success); background: var(--epc-success-soft); }
.epc-match__left.is-ok .epc-match__slot { color: var(--epc-success-dark); border-color: var(--epc-success); }
.epc-match__left.is-bad { border-color: var(--epc-danger); background: var(--epc-danger-soft); }
.epc-match__left.is-shown { border-color: #4A90D9; background: #E3F0FD; }
.epc-match__left.is-locked { cursor: default; }
.epc-match__right {
	min-width: 76px; min-height: 60px; padding: 8px 18px; border: 0; border-radius: 18px; cursor: pointer;
	background: var(--epc-primary); color: #fff; font: inherit; font-size: 22px; font-weight: 900;
	box-shadow: 0 5px 0 var(--epc-primary-dark); touch-action: manipulation;
}
.epc-match__right:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--epc-primary-dark); }

/* Variantai */
.epc-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.epc-opts--images { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.epc-opt {
	position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
	min-height: 64px; padding: 12px 14px; border: 3px solid transparent; border-radius: 18px; cursor: pointer;
	background: #fff; font: inherit; font-size: 21px; font-weight: 800; color: var(--epc-ink); box-shadow: var(--epc-shadow-sm);
	transition: border-color .15s, transform .15s, background .15s;
}
.epc-opt:hover { transform: translateY(-2px); }
.epc-opt__img { width: 100%; max-height: 140px; object-fit: contain; border-radius: 12px; }
.epc-opt__mark {
	position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
	border: 2px solid #D6CFEA; font-size: 15px; color: transparent;
}
.epc-opt.is-on { border-color: var(--epc-primary); background: var(--epc-primary-soft); }
.epc-opt.is-on .epc-opt__mark { background: var(--epc-primary); border-color: var(--epc-primary); color: #fff; }
.epc-opt.is-ok { border-color: var(--epc-success); background: var(--epc-success-soft); }
.epc-opt.is-ok .epc-opt__mark { background: var(--epc-success); border-color: var(--epc-success); }
.epc-opt.is-bad { border-color: var(--epc-danger); background: var(--epc-danger-soft); }
.epc-opt.is-missed { border-style: dashed; border-color: var(--epc-sun); }
.epc-opt.is-shown { border-color: #4A90D9; background: #E3F0FD; }
.is-locked .epc-opt, .epc-opt.is-locked { cursor: default; transform: none; }

/* Eilės tvarka */
.epc-order__line {
	display: flex; flex-wrap: wrap; gap: 10px; align-items: center; min-height: 82px; padding: 12px; margin-bottom: 16px;
	border-radius: 20px; background: #fff; border: 3px dashed #D6CFEA;
}
.epc-order__line.is-vertical { flex-direction: column; align-items: stretch; }
.epc-order__ph { color: #A7A1BC; font-weight: 700; }
.epc-order__pool { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; min-height: 60px; }
.epc-token {
	min-height: 54px; padding: 8px 18px; border: 0; border-radius: 16px; cursor: pointer;
	background: var(--epc-sun); color: #3D2600; font: inherit; font-size: 21px; font-weight: 800;
	box-shadow: 0 4px 0 #D99A00; touch-action: manipulation;
}
.epc-order__line .epc-token { background: var(--epc-primary-soft); color: var(--epc-primary-dark); box-shadow: 0 4px 0 #D6D0FA; }
.epc-order__line .epc-token.is-ok { background: var(--epc-success); color: #fff; box-shadow: 0 4px 0 var(--epc-success-dark); }
.epc-order__line .epc-token.is-bad { background: var(--epc-danger-soft); color: #9B2F1B; box-shadow: 0 4px 0 #F2B8A8; }
.epc-order__line .epc-token.is-shown { background: #E3F0FD; color: #1E5FA8; box-shadow: 0 4px 0 #B9D7F5; }

.epc-ex-feedback { margin-top: 16px; font-weight: 800; font-size: 19px; border-radius: 14px; }
.epc-ex-feedback.is-good, .epc-ex-feedback.is-bad, .epc-ex-feedback.is-info { padding: 12px 16px; animation: epc-pop .3s ease; }
.epc-ex-feedback.is-good { background: var(--epc-success-soft); color: var(--epc-success-dark); }
.epc-ex-feedback.is-bad { background: var(--epc-warn-soft); color: #7A4A00; }
.epc-ex-feedback.is-info { background: #E3F0FD; color: #1E5FA8; }
.epc-ex-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; margin-top: 18px; }
.epc-ex-actions [hidden] { display: none; }

.epc-ex-done { text-align: center; padding: 28px 16px; background: var(--epc-bg); border-radius: 24px; animation: epc-pop .4s ease; }
.epc-ex-done__stars { font-size: 52px; letter-spacing: 6px; color: #D9D3EA; }
.epc-ex-done__title { font-size: 28px; font-weight: 900; margin: 8px 0 !important; }
.epc-ex-done__text { font-size: 19px; color: var(--epc-ink-soft); }
.epc-ex-done__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 16px; }

.epc-dict-parent { background: var(--epc-bg); padding: 14px 18px; border-radius: 16px; font-weight: 600; }
.epc-dict-parent[hidden] { display: none; }

@media (max-width: 720px) {
	.epc-ex-card { padding: 16px 12px; border-radius: 20px; }
	.epc-match { grid-template-columns: minmax(0, 1fr); }
	.epc-match__col--right { position: sticky; bottom: 12px; top: auto; z-index: 5; justify-content: center; background: rgba(255, 247, 236, .94); padding: 8px; border-radius: 18px; }
	.epc-ex-actions .epc-btn { flex: 1; }
	.epc-opts { grid-template-columns: 1fr 1fr; }
}
