@font-face {
	font-family: "THSarabunPali";
	src: url("/assets/fonts/thsarabun/THSarabunPali.ttf") format("truetype");
	font-display: swap;
}

:root {
	--ttp-ink: #172033;
	--ttp-muted: #667085;
	--ttp-line: #e4e7ec;
	--ttp-paper: #fffdf8;
	--ttp-navy: #25326b;
	--ttp-indigo: #4f46e5;
	--ttp-gold: #f4b740;
	--ttp-green: #14866d;
	--ttp-reading: var(--reading-scale, 1);
}

* { box-sizing: border-box; }
[v-cloak] { display: none !important; }
.ttp-body {
	margin: 0;
	color: var(--ttp-ink);
	background:
		radial-gradient(circle at 8% 5%, rgba(244, 183, 64, .12), transparent 24rem),
		radial-gradient(circle at 92% 20%, rgba(79, 70, 229, .1), transparent 28rem),
		#f6f7fb;
	font-family: "Sarabun", sans-serif;
}

/* เมนูร่วมมีข้อความ 9–13px ในหน้าเดิม หน้าหลักสูตรนี้ยกขึ้นตามเกณฑ์การอ่าน */
.ttp-body [data-pt-topnav] .text-\[9px\],
.ttp-body [data-pt-topnav] .text-\[10px\],
.ttp-body [data-pt-topnav] .text-\[11px\],
.ttp-body [data-pt-topnav] .text-\[13px\],
.ttp-body [data-pt-topnav] .text-xs,
.ttp-body [data-pt-topnav] .text-sm { font-size: max(14px, calc(14px * var(--ttp-reading))); }

.ttp-app { min-height: 100vh; }
.ttp-app button, .ttp-app input, .ttp-app textarea { font: inherit; }
.ttp-app button { cursor: pointer; }
.ttp-app button:focus-visible, .ttp-app input:focus-visible, .ttp-app textarea:focus-visible, .ttp-app a:focus-visible, .ttp-app summary:focus-visible {
	outline: 3px solid rgba(79, 70, 229, .35);
	outline-offset: 3px;
}

.ttp-topbar {
	position: relative;
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 68px;
	padding: .75rem max(1rem, calc((100vw - 1180px) / 2));
	background: rgba(255, 255, 255, .9);
	border-bottom: 1px solid rgba(228, 231, 236, .9);
	backdrop-filter: blur(16px);
}
.ttp-brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ttp-ink); text-decoration: none; font-size: max(16px, calc(18px * var(--ttp-reading))); }
.ttp-brand > span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; color: white; background: linear-gradient(145deg, var(--ttp-indigo), #302a80); box-shadow: 0 8px 22px rgba(79, 70, 229, .22); }
.ttp-top-actions { display: flex; align-items: center; gap: .7rem; }
.ttp-save-state { display: inline-flex; align-items: center; gap: .45rem; color: var(--ttp-muted); font-size: max(14px, calc(14px * var(--ttp-reading))); }
.ttp-save-state.is-warn { color: #b54708; }
.ttp-icon-btn { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 1px solid var(--ttp-line); border-radius: 14px; color: #344054; background: #fff; font-size: max(16px, calc(16px * var(--ttp-reading))); }

.ttp-preview {
	display: flex;
	align-items: center;
	gap: .75rem;
	max-width: 1180px;
	margin: 1rem auto 0;
	padding: .8rem 1rem;
	border: 1px solid #f8d78d;
	border-radius: 16px;
	color: #7a4b08;
	background: #fff8e7;
	font-size: max(14px, calc(14px * var(--ttp-reading)));
	line-height: 1.65;
}
.ttp-preview > i { font-size: max(18px, calc(18px * var(--ttp-reading))); }
.ttp-preview div { display: flex; flex-wrap: wrap; gap: .25rem .6rem; }

.ttp-home, .ttp-library, .ttp-study { width: min(1180px, calc(100% - 2rem)); margin: 1.25rem auto 5rem; }
.ttp-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
	gap: 1.25rem;
	padding: clamp(1.5rem, 4vw, 3.5rem);
	border-radius: 32px;
	color: white;
	background:
		linear-gradient(112deg, rgba(23, 32, 77, .98), rgba(45, 46, 117, .94)),
		linear-gradient(45deg, #25326b, #4f46e5);
	box-shadow: 0 22px 65px rgba(37, 50, 107, .22);
	position: relative;
	overflow: hidden;
}
.ttp-hero::before, .ttp-hero::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; }
.ttp-hero::before { width: 420px; height: 420px; top: -260px; left: 32%; }
.ttp-hero::after { width: 300px; height: 300px; right: -140px; bottom: -180px; }
.ttp-hero-copy, .ttp-daily-card { position: relative; z-index: 1; }
.ttp-kicker { margin: 0 0 .6rem; color: #6750d6; font-size: max(14px, calc(14px * var(--ttp-reading))); font-weight: 800; letter-spacing: .025em; }
.ttp-hero .ttp-kicker { color: #f9d788; margin-bottom: max(.9rem, calc(1.05rem * var(--ttp-reading))); }
.ttp-hero h1 { margin: 0; max-width: 650px; font-size: max(38px, calc(clamp(38px, 5.4vw, 68px) * var(--ttp-reading))); line-height: 1.08; letter-spacing: -.035em; }
.ttp-hero h1 em { color: #f7c95c; font-style: normal; }
.ttp-hero-copy > p:not(.ttp-kicker) { max-width: 650px; margin: 1.15rem 0 0; color: #e2e5f5; font-size: max(16px, calc(18px * var(--ttp-reading))); line-height: 1.75; }
.ttp-loop { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.ttp-loop span { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .65rem; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; background: rgba(255,255,255,.08); font-size: max(14px, calc(14px * var(--ttp-reading))); }
.ttp-loop b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #28306d; background: #f9d788; }
.ttp-loop > i { color: rgba(255,255,255,.45); }

.ttp-daily-card { align-self: center; padding: 1.45rem; border: 1px solid rgba(255,255,255,.22); border-radius: 24px; color: var(--ttp-ink); background: rgba(255,255,255,.96); box-shadow: 0 16px 35px rgba(13, 19, 55, .18); }
.ttp-daily-icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: .8rem; border-radius: 17px; color: #704d00; background: #f9d788; font-size: max(22px, calc(22px * var(--ttp-reading))); }
.ttp-daily-card > p:first-of-type { margin: 0; color: var(--ttp-indigo); font-size: max(14px, calc(14px * var(--ttp-reading))); font-weight: 800; }
.ttp-daily-card h2 { margin: .2rem 0 .5rem; font-size: max(22px, calc(24px * var(--ttp-reading))); line-height: 1.35; }
.ttp-daily-note { margin: 0 0 1rem; color: var(--ttp-muted); font-size: max(16px, calc(16px * var(--ttp-reading))); line-height: 1.65; }

.ttp-btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 46px; padding: .7rem 1rem; border: 1px solid transparent; border-radius: 14px; font-size: max(16px, calc(16px * var(--ttp-reading))); font-weight: 800; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.ttp-btn:hover:not(:disabled) { transform: translateY(-1px); }
.ttp-btn:disabled { cursor: not-allowed; opacity: .45; }
.ttp-btn--primary { color: white; background: linear-gradient(135deg, #5c55ea, #3d35b3); box-shadow: 0 8px 18px rgba(79,70,229,.2); }
.ttp-btn--ghost { color: #344054; border-color: var(--ttp-line); background: #fff; }
.ttp-btn--wide { width: 100%; }
.ttp-text-btn { padding: .55rem; border: 0; color: var(--ttp-indigo); background: transparent; font-size: max(14px, calc(15px * var(--ttp-reading))); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.ttp-daily-card .ttp-text-btn { display: block; margin: .35rem auto -.35rem; }

.ttp-dashboard { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-top: 1rem; }
.ttp-dashboard > div { display: flex; align-items: center; gap: .75rem; padding: 1rem; border: 1px solid var(--ttp-line); border-radius: 18px; background: rgba(255,255,255,.88); }
.ttp-dashboard i { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 13px; color: var(--ttp-indigo); background: #eeedff; font-size: max(17px, calc(17px * var(--ttp-reading))); }
.ttp-dashboard span { display: flex; flex-direction: column; }
.ttp-dashboard small { color: var(--ttp-muted); font-size: max(14px, calc(14px * var(--ttp-reading))); }
.ttp-dashboard b { font-size: max(20px, calc(21px * var(--ttp-reading))); }

.ttp-tools { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; margin-top: 1rem; }
.ttp-tools button { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.15rem; text-align: left; border: 1px solid var(--ttp-line); border-radius: 18px; color: var(--ttp-ink); background: #fff; }
.ttp-tools button > i { color: #8b6b12; font-size: max(22px, calc(22px * var(--ttp-reading))); }
.ttp-tools span { display: flex; flex-direction: column; }
.ttp-tools strong { font-size: max(16px, calc(17px * var(--ttp-reading))); }
.ttp-tools small { color: var(--ttp-muted); font-size: max(14px, calc(14px * var(--ttp-reading))); line-height: 1.6; }

.ttp-curriculum { margin-top: 2.5rem; }
.ttp-section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.ttp-section-head h2 { margin: 0; font-size: max(24px, calc(29px * var(--ttp-reading))); line-height: 1.35; }
.ttp-section-head > span { flex: none; padding: .5rem .75rem; border-radius: 999px; color: #475467; background: #e9ebf2; font-size: max(14px, calc(14px * var(--ttp-reading))); font-weight: 800; }
.ttp-module-tabs { display: flex; gap: .6rem; margin: 0 0 1rem; padding: .15rem 0 .65rem; overflow-x: auto; scrollbar-width: thin; }
.ttp-module-tabs button { display: inline-flex; align-items: center; gap: .45rem; min-height: 47px; flex: none; padding: .55rem .75rem; white-space: nowrap; border: 1px solid var(--ttp-line); border-radius: 14px; color: #475467; background: #fff; font-size: max(14px, calc(15px * var(--ttp-reading))); font-weight: 700; }
.ttp-module-tabs button > span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; color: #4f46e5; background: #eeedff; }
.ttp-module-tabs button small { min-width: 24px; padding: .1rem .35rem; border-radius: 999px; color: #667085; background: #f2f4f7; font-size: max(14px, calc(14px * var(--ttp-reading))); }
.ttp-module-tabs button.is-active { border-color: #5c55ea; color: #3730a3; background: #f2f1ff; box-shadow: 0 0 0 2px rgba(79,70,229,.1); }
.ttp-module-head { display: flex; align-items: center; gap: 1rem; margin-bottom: .85rem; padding: 1rem; border: 1px solid var(--ttp-line); border-radius: 20px; background: rgba(255,255,255,.75); }
.ttp-module-head > div { min-width: 0; }
.ttp-module-head small { color: #667085; font-size: max(14px, calc(14px * var(--ttp-reading))); }
.ttp-module-head h3 { margin: .1rem 0; font-size: max(21px, calc(24px * var(--ttp-reading))); line-height: 1.4; }
.ttp-module-head p { margin: 0; color: var(--ttp-muted); font-size: max(16px, calc(16px * var(--ttp-reading))); line-height: 1.65; }
.ttp-module-head[data-color="amber"] .ttp-lesson-icon { color: #9a6700; background: #fff1c2; }
.ttp-module-head[data-color="emerald"] .ttp-lesson-icon { color: #08745d; background: #d9f5ec; }
.ttp-module-head[data-color="rose"] .ttp-lesson-icon { color: #b4235d; background: #ffe4ed; }
.ttp-course-search { margin-bottom: .9rem; }
.ttp-lesson-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.ttp-lesson-card { display: grid; grid-template-columns: auto auto minmax(0,1fr) auto auto; align-items: center; gap: .8rem; min-height: 142px; padding: 1.15rem; text-align: left; border: 1px solid var(--ttp-line); border-radius: 22px; color: var(--ttp-ink); background: #fff; box-shadow: 0 8px 24px rgba(16,24,40,.045); transition: transform .16s ease, box-shadow .16s ease; }
.ttp-lesson-card:hover { transform: translateY(-2px); box-shadow: 0 13px 30px rgba(16,24,40,.08); }
.ttp-lesson-no { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; color: #667085; background: #f2f4f7; font-size: max(14px, calc(14px * var(--ttp-reading))); font-weight: 800; }
.ttp-lesson-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 17px; color: #4f46e5; background: #eeedff; font-size: max(21px, calc(21px * var(--ttp-reading))); }
.ttp-lesson-card[data-color="amber"] .ttp-lesson-icon { color: #9a6700; background: #fff1c2; }
.ttp-lesson-card[data-color="emerald"] .ttp-lesson-icon { color: #08745d; background: #d9f5ec; }
.ttp-lesson-card[data-color="rose"] .ttp-lesson-icon { color: #b4235d; background: #ffe4ed; }
.ttp-lesson-copy { display: flex; flex-direction: column; min-width: 0; }
.ttp-lesson-copy small { color: #667085; font-size: max(14px, calc(14px * var(--ttp-reading))); }
.ttp-lesson-copy strong { margin-top: .1rem; font-size: max(19px, calc(21px * var(--ttp-reading))); line-height: 1.4; }
.ttp-lesson-copy em { margin-top: .2rem; color: var(--ttp-muted); font-size: max(14px, calc(15px * var(--ttp-reading))); font-style: normal; line-height: 1.65; }
.ttp-lesson-progress { min-width: 76px; }
.ttp-lesson-progress > span { display: block; width: 76px; height: 7px; overflow: hidden; border-radius: 999px; background: #eaecf0; }
.ttp-lesson-progress i { display: block; height: 100%; border-radius: inherit; background: var(--ttp-indigo); }
.ttp-lesson-progress small { display: block; margin-top: .3rem; color: #667085; text-align: right; font-size: max(14px, calc(14px * var(--ttp-reading))); }
.ttp-lesson-arrow { color: #98a2b3; }

.ttp-study { max-width: 820px; }
.ttp-study-head { display: flex; align-items: center; gap: .8rem; padding: .8rem 0; }
.ttp-study-head > div { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ttp-study-head small { color: var(--ttp-muted); font-size: max(14px, calc(14px * var(--ttp-reading))); }
.ttp-study-head strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: max(17px, calc(18px * var(--ttp-reading))); }
.ttp-study-head > span { flex: none; color: #667085; font-size: max(14px, calc(14px * var(--ttp-reading))); font-weight: 800; }
.ttp-progress { width: 100%; height: 9px; margin-bottom: 1rem; overflow: hidden; border-radius: 999px; background: #e5e7eb; }
.ttp-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f4b740, #4f46e5); transition: width .3s ease; }
.ttp-sheet { padding: clamp(1.25rem, 4vw, 2.5rem); border: 1px solid var(--ttp-line); border-radius: 28px; background: var(--ttp-paper); box-shadow: 0 16px 46px rgba(16,24,40,.08); }
.ttp-intro-sheet { text-align: center; }
.ttp-big-icon { display: grid; place-items: center; width: 78px; height: 78px; margin: 0 auto 1rem; border-radius: 24px; color: #fff; background: linear-gradient(145deg, #625af0, #3b348e); font-size: max(30px, calc(30px * var(--ttp-reading))); box-shadow: 0 14px 26px rgba(79,70,229,.2); }
.ttp-big-icon[data-color="amber"] { background: linear-gradient(145deg, #f5c75a, #bd7903); }
.ttp-big-icon[data-color="emerald"] { background: linear-gradient(145deg, #34b998, #08745d); }
.ttp-big-icon[data-color="rose"] { background: linear-gradient(145deg, #ef6f9e, #a51d52); }
.ttp-sheet h1 { margin: .25rem 0 1rem; font-size: max(29px, calc(36px * var(--ttp-reading))); line-height: 1.28; }
.ttp-rule { max-width: 650px; margin: 0 auto; font-size: max(16px, calc(18px * var(--ttp-reading))); line-height: 1.8; }
.ttp-memory { display: flex; align-items: flex-start; gap: .8rem; max-width: 650px; margin: 1.35rem auto; padding: 1rem; text-align: left; border: 1px solid #f0d18e; border-radius: 17px; color: #6d4700; background: #fff7df; }
.ttp-memory > i { margin-top: .25rem; }
.ttp-memory div { display: flex; flex-direction: column; }
.ttp-memory strong { font-size: max(16px, calc(16px * var(--ttp-reading))); }
.ttp-memory span { font-size: max(16px, calc(17px * var(--ttp-reading))); line-height: 1.7; }
.ttp-exercise-meta { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.ttp-exercise-meta > span { padding: .35rem .65rem; border-radius: 999px; color: #4338ca; background: #eeedff; font-size: max(14px, calc(14px * var(--ttp-reading))); font-weight: 800; }
.ttp-exercise-meta small { color: var(--ttp-muted); font-size: max(14px, calc(14px * var(--ttp-reading))); }
.ttp-thai-prompt { margin: 1.4rem 0; padding-left: 1rem; border-left: 4px solid #f4b740; font-size: max(20px, calc(24px * var(--ttp-reading))); font-weight: 700; line-height: 1.7; }
.ttp-pali-prompt { margin: 1.4rem 0; padding: 1rem; text-align: center; border-radius: 17px; color: #272165; background: #f0f1fa; font-size: max(27px, calc(32px * var(--ttp-reading))); font-weight: 700; line-height: 1.7; }
/* คาถาแบ่งบาทตามหนังสือ ไม่ปล่อยให้ไหลรวมเป็นร้อยแก้ว */
.ttp-pali-verse span { display: block; }
.ttp-activity { min-height: 225px; }
.ttp-read-pair { display: grid; gap: .8rem; min-height: 0; margin-top: 1.2rem; }
.ttp-read-pair > div { padding: 1rem; border: 1px solid #d9dce5; border-radius: 16px; background: #fff; }
.ttp-read-pair > div:first-child { color: #272165; background: #f0f1fa; }
.ttp-read-pair small { display: block; margin-bottom: .35rem; color: #667085; font-size: max(14px, calc(14px * var(--ttp-reading))); font-weight: 800; }
.ttp-read-pair p { margin: 0; font-size: max(18px, calc(20px * var(--ttp-reading))); line-height: 1.75; }
.ttp-read-pair .ttp-pali-inline { font-size: max(25px, calc(29px * var(--ttp-reading))); }
.ttp-question { margin: 0 0 1rem; color: #344054; font-size: max(16px, calc(18px * var(--ttp-reading))); line-height: 1.7; }
.ttp-pali-inline, .ttp-pali-input { font-family: "THSarabunPali", "Sarabun", sans-serif; }
.ttp-question .ttp-pali-inline { margin-right: .35rem; color: #312e81; font-size: max(24px, calc(28px * var(--ttp-reading))); }
.ttp-choice-list { display: grid; gap: .65rem; }
.ttp-choice-list button { min-height: 52px; padding: .7rem 1rem; text-align: left; border: 1px solid #d0d5dd; border-radius: 14px; color: #344054; background: #fff; font-size: max(16px, calc(17px * var(--ttp-reading))); }
.ttp-choice-list button.is-picked { border-color: var(--ttp-indigo); color: #3730a3; background: #eeedff; box-shadow: 0 0 0 2px rgba(79,70,229,.12); }
.ttp-choice-list button.is-wrong { border-color: #e5484d; color: #9f1c22; background: #ffeded; box-shadow: 0 0 0 2px rgba(229,72,77,.13); }
.ttp-choice-list button.is-correct { border-color: #159570; color: #075e49; background: #e4f8f0; box-shadow: 0 0 0 2px rgba(21,149,112,.13); }
.ttp-choice-list button:disabled { cursor: default; opacity: 1; }
.ttp-order-answer { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; min-height: 82px; padding: .8rem; border: 2px dashed #c7cbd4; border-radius: 16px; background: #fff; }
.ttp-order-answer.is-wrong { border-color: #e5484d; background: #fff4f4; }
.ttp-order-answer > span { color: #98a2b3; font-size: max(16px, calc(17px * var(--ttp-reading))); }
.ttp-order-answer button, .ttp-token-bank button { padding: .55rem .75rem; border: 1px solid #bbb7ef; border-radius: 11px; color: #312e81; background: #f3f2ff; font-family: "THSarabunPali", "Sarabun", sans-serif; font-size: max(22px, calc(25px * var(--ttp-reading))); }
.ttp-token-bank { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .9rem; }
.ttp-token-bank button:disabled { opacity: .2; cursor: default; }
.ttp-cloze { margin: 1rem 0; padding: 1.1rem; text-align: center; border-radius: 16px; color: #25326b; background: #f0f1fa; font-size: max(25px, calc(30px * var(--ttp-reading))); line-height: 1.7; }
.ttp-cloze span { display: inline-grid; place-items: center; min-width: 68px; border-bottom: 3px solid #655ee8; color: #655ee8; }
.ttp-input { width: 100%; min-height: 54px; padding: .75rem 1rem; resize: vertical; border: 2px solid #c7cbd4; border-radius: 15px; color: #172033; background: #fff; font-size: max(24px, calc(28px * var(--ttp-reading))); line-height: 1.65; }
.ttp-input:focus { border-color: var(--ttp-indigo); }
.ttp-input.is-wrong { border-color: #e5484d; color: #8f2024; background: #fff4f4; }
.ttp-mark-keys { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.ttp-mark-keys button { min-height: 42px; padding: .45rem .75rem; border: 1px solid #d0d5dd; border-radius: 11px; color: #475467; background: #fff; font-size: max(14px, calc(15px * var(--ttp-reading))); }
.ttp-exercise-actions { display: flex; align-items: center; justify-content: flex-end; gap: .75rem; margin-top: 1.15rem; padding-top: 1rem; border-top: 1px solid var(--ttp-line); }
.ttp-exercise-actions .ttp-text-btn { margin-right: auto; }
.ttp-hint { margin: .8rem 0 0; padding: .8rem; border-radius: 13px; color: #7a4b08; background: #fff4d4; font-size: max(16px, calc(16px * var(--ttp-reading))); line-height: 1.7; }
.ttp-feedback { display: flex; align-items: flex-start; gap: .8rem; margin-top: 1rem; padding: 1rem; border: 1px solid #abd9cc; border-radius: 16px; color: #05604e; background: #e7f8f2; }
.ttp-feedback:not(.is-exact) { border-color: #ed999c; color: #8f2024; background: #fff0f0; }
.ttp-feedback > i { margin-top: .25rem; font-size: max(20px, calc(20px * var(--ttp-reading))); }
.ttp-feedback strong { font-size: max(17px, calc(18px * var(--ttp-reading))); }
.ttp-feedback p { margin: .2rem 0 0; font-size: max(16px, calc(16px * var(--ttp-reading))); line-height: 1.7; }
.ttp-feedback .ttp-difference { margin-top: .65rem; padding: .55rem .7rem; border-radius: 10px; color: #7d181d; background: #ffdfe0; font-weight: 700; white-space: pre-line; }
.ttp-difference i { margin-right: .3rem; }
.ttp-expected { display: flex; flex-direction: column; gap: .1rem; margin-top: .7rem; padding: .7rem .85rem; border: 1px solid #8bd3bc; border-radius: 12px; color: #075e49; background: #e4f8f0; }
.ttp-expected small { font-size: max(14px, calc(14px * var(--ttp-reading))); font-weight: 700; }
.ttp-expected b { font-size: max(18px, calc(20px * var(--ttp-reading))); line-height: 1.65; }
.ttp-expected b.ttp-pali-inline { font-size: max(24px, calc(27px * var(--ttp-reading))); }
.ttp-source-detail { margin-top: 1rem; color: var(--ttp-muted); font-size: max(14px, calc(14px * var(--ttp-reading))); line-height: 1.65; }
.ttp-source-detail summary { cursor: pointer; font-weight: 700; }
.ttp-source-detail > div { margin-top: .65rem; padding: .85rem 1rem; border-radius: 13px; color: #344054; background: #f2f4f7; }
.ttp-source-detail p { margin: 0 0 .45rem; font-size: max(16px, calc(16px * var(--ttp-reading))); line-height: 1.7; }
.ttp-source-detail small { display: flex; align-items: flex-start; gap: .4rem; color: #667085; font-size: max(14px, calc(14px * var(--ttp-reading))); line-height: 1.65; }
.ttp-source-detail small i { margin-top: .25rem; }

.ttp-complete { text-align: center; }
.ttp-complete-mark { display: grid; place-items: center; width: 82px; height: 82px; margin: 0 auto 1rem; border-radius: 50%; color: white; background: var(--ttp-green); box-shadow: 0 15px 28px rgba(20,134,109,.2); font-size: max(30px, calc(30px * var(--ttp-reading))); }
.ttp-complete > p:not(.ttp-kicker) { font-size: max(16px, calc(18px * var(--ttp-reading))); line-height: 1.7; }
.ttp-complete .ttp-btn + .ttp-btn { margin-top: .65rem; }
.ttp-complete-stats { display: grid; grid-template-columns: repeat(2,1fr); gap: .7rem; max-width: 420px; margin: 1.2rem auto; }
.ttp-complete-stats span { display: flex; flex-direction: column; padding: .9rem; border-radius: 14px; color: #667085; background: #f2f4f7; font-size: max(14px, calc(14px * var(--ttp-reading))); }
.ttp-complete-stats b { color: var(--ttp-ink); font-size: max(24px, calc(26px * var(--ttp-reading))); }

.ttp-library { max-width: 960px; }
.ttp-library-head { display: flex; align-items: flex-start; gap: 1rem; margin: 1.8rem 0; }
.ttp-library-head h1 { margin: 0; font-size: max(31px, calc(40px * var(--ttp-reading))); line-height: 1.25; }
.ttp-library-head p:not(.ttp-kicker) { margin: .35rem 0 0; color: var(--ttp-muted); font-size: max(16px, calc(17px * var(--ttp-reading))); line-height: 1.7; }
.ttp-error-list, .ttp-phrase-list { display: grid; gap: .75rem; }
.ttp-error-list article { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .9rem; padding: 1rem; border: 1px solid var(--ttp-line); border-radius: 18px; background: #fff; }
.ttp-error-list article > span { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 13px; color: #a15c00; background: #fff1c2; }
.ttp-error-list article > div { display: flex; flex-direction: column; min-width: 0; }
.ttp-error-list small { color: #b54708; font-size: max(14px, calc(14px * var(--ttp-reading))); }
.ttp-error-list strong { font-size: max(22px, calc(25px * var(--ttp-reading))); line-height: 1.55; }
.ttp-error-list p { margin: .15rem 0 0; color: var(--ttp-muted); font-size: max(16px, calc(16px * var(--ttp-reading))); line-height: 1.65; }
.ttp-empty { padding: 3rem 1rem; text-align: center; border: 1px dashed #b8c2ca; border-radius: 22px; color: #475467; background: rgba(255,255,255,.6); }
.ttp-empty i { color: var(--ttp-green); font-size: max(38px, calc(38px * var(--ttp-reading))); }
.ttp-empty h2 { margin: .7rem 0 .2rem; font-size: max(23px, calc(25px * var(--ttp-reading))); }
.ttp-empty p { margin: 0; font-size: max(16px, calc(16px * var(--ttp-reading))); line-height: 1.7; }
.ttp-empty--compact { margin-top: .8rem; padding: 2rem 1rem; }
.ttp-search { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; padding: 0 1rem; border: 1px solid #d0d5dd; border-radius: 15px; background: #fff; }
.ttp-search i { color: #667085; }
.ttp-search input { width: 100%; min-height: 52px; border: 0; outline: 0; color: var(--ttp-ink); background: transparent; font-size: max(16px, calc(16px * var(--ttp-reading))); }
.ttp-phrase-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ttp-phrase-list article { padding: 1.1rem; border: 1px solid var(--ttp-line); border-radius: 18px; background: #fff; }
.ttp-phrase-list small { color: #667085; font-size: max(14px, calc(14px * var(--ttp-reading))); line-height: 1.6; }
.ttp-phrase-list h2 { margin: .5rem 0 .25rem; color: #272165; font-size: max(24px, calc(27px * var(--ttp-reading))); line-height: 1.6; }
.ttp-phrase-list p { margin: 0; font-size: max(16px, calc(16px * var(--ttp-reading))); line-height: 1.7; }
.ttp-result-count { margin: -.3rem 0 .8rem; color: var(--ttp-muted); font-size: max(14px, calc(14px * var(--ttp-reading))); }
.ttp-load-more { display: flex; margin: 1rem auto 0; }

.ttp-state { display: flex; min-height: 55vh; align-items: center; justify-content: center; flex-direction: column; gap: .7rem; padding: 2rem; text-align: center; color: #475467; }
.ttp-state > i { color: var(--ttp-indigo); font-size: max(38px, calc(38px * var(--ttp-reading))); }
.ttp-state strong, .ttp-state h1 { font-size: max(20px, calc(23px * var(--ttp-reading))); }
.ttp-state p { font-size: max(16px, calc(16px * var(--ttp-reading))); line-height: 1.7; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 820px) {
	.ttp-hero { grid-template-columns: 1fr; }
	.ttp-dashboard { grid-template-columns: repeat(2, 1fr); }
	.ttp-lesson-grid, .ttp-phrase-list { grid-template-columns: 1fr; }
	.ttp-preview { width: calc(100% - 2rem); }
}

@media (min-width: 1024px) and (max-width: 1500px) {
	.ttp-body [data-pt-topnav] nav.hidden.lg\:flex > a { gap: .3rem; padding-left: .45rem; padding-right: .45rem; }
	.ttp-body [data-pt-topnav] nav.hidden.lg\:flex > a > i { display: none; }
	.ttp-body [data-pt-topnav] .pt-nav-more summary { padding-left: .55rem; padding-right: .55rem; }
}

@media (max-width: 560px) {
	.ttp-body [data-pt-topnav] > div { padding-left: .55rem; padding-right: .55rem; gap: .35rem; }
	.ttp-body [data-pt-topnav] > div > div:last-child { gap: .35rem; }
	.ttp-body [data-pt-topnav] [data-pt-account] button { padding-left: .7rem; padding-right: .7rem; }
	.ttp-topbar { min-height: 62px; }
	.ttp-brand strong { display: none; }
	.ttp-save-state { max-width: 165px; line-height: 1.35; }
	.ttp-home, .ttp-library, .ttp-study { width: min(100% - 1rem, 1180px); margin-top: .7rem; }
	.ttp-hero { padding: 1.2rem; border-radius: 24px; }
	.ttp-hero h1 { font-size: max(34px, calc(40px * var(--ttp-reading))); }
	.ttp-loop > i { display: none; }
	.ttp-dashboard { gap: .5rem; }
	.ttp-dashboard > div { padding: .75rem; }
	.ttp-tools { grid-template-columns: 1fr; }
	.ttp-section-head { align-items: flex-start; flex-direction: column; }
	.ttp-lesson-card { grid-template-columns: auto auto minmax(0,1fr) auto; min-height: 132px; padding: .85rem; }
	.ttp-lesson-no { display: none; }
	.ttp-lesson-progress { grid-column: 2 / 4; width: 100%; }
	.ttp-lesson-progress > span { width: 100%; }
	.ttp-lesson-progress small { text-align: left; }
	.ttp-lesson-arrow { grid-column: 4; grid-row: 1; }
	.ttp-sheet { border-radius: 21px; padding: 1.1rem; }
	.ttp-exercise-actions { align-items: stretch; flex-direction: column-reverse; }
	.ttp-exercise-actions .ttp-btn { width: 100%; }
	.ttp-error-list article { grid-template-columns: auto minmax(0,1fr); }
	.ttp-error-list article .ttp-btn { grid-column: 1 / -1; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.ttp-app *, .ttp-app *::before, .ttp-app *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
