/* LMS sketch styles. Plain, big, friendly. */
:root {
	--blue: #1b5e9b;
	--blue-dark: #134670;
	--blue-soft: #e6f0fa;
	--sun: #f5a524;
	--sun-soft: #fff4de;
	--green: #1a9250;
	--green-soft: #e3f6ec;
	--red: #d92d20;
	--red-soft: #fdeceb;
	--ink: #14202e;
	--muted: #5b6b7c;
	--line: #d9e1ea;
	--bg: #f4f7fb;
	--card: #ffffff;
	--radius: 16px;
	--shadow: 0 2px 10px rgba(20, 32, 46, .08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 17px;
	line-height: 1.45;
	color: var(--ink);
	background: var(--bg);
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 .8em; }
a { color: var(--blue); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 16px; }
.narrow { max-width: 520px; margin: 0 auto; padding: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* demo strip and top bar */
.demo-strip {
	background: #222;
	color: #ffd479;
	font-size: .78rem;
	text-align: center;
	padding: 4px 8px;
}
.demo-strip a { color: #fff; }
.topbar {
	background: var(--blue);
	color: #fff;
	padding: 10px 16px;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}
.topbar .brand { font-weight: 700; font-size: 1.05rem; flex: 1; min-width: 160px; }
.topbar .brand small { display: block; font-weight: 400; opacity: .85; font-size: .75rem; }
.topbar a, .topbar button.link { color: #fff; }
.navtabs {
	background: #fff;
	border-bottom: 1px solid var(--line);
	display: flex;
	overflow-x: auto;
	gap: 4px;
	padding: 0 10px;
	white-space: nowrap;
}
.navtabs a {
	padding: 12px 14px;
	text-decoration: none;
	color: var(--muted);
	font-weight: 600;
	border-bottom: 3px solid transparent;
}
.navtabs a.on { color: var(--blue); border-bottom-color: var(--blue); }
.navtabs a:hover { color: var(--blue-dark); }

/* cards */
.card {
	background: var(--card);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 16px;
}
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card.good { background: var(--green-soft); }
.card.warn { background: var(--sun-soft); }
.card.bad { background: var(--red-soft); border: 2px solid var(--red); }
.stat { text-align: center; }
.stat b { display: block; font-size: 2rem; line-height: 1.1; color: var(--blue); }
.stat span { color: var(--muted); font-size: .9rem; }

/* buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font: inherit;
	font-weight: 700;
	border: 2px solid var(--blue);
	background: #fff;
	color: var(--blue);
	border-radius: 12px;
	padding: 10px 18px;
	min-height: 46px;
	cursor: pointer;
	text-decoration: none;
}
.btn:hover { background: var(--blue-soft); }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-dark); }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { border-color: var(--line); color: var(--ink); }
.btn.small { min-height: 34px; padding: 4px 12px; font-size: .88rem; border-radius: 9px; }
.btn.big { min-height: 58px; font-size: 1.2rem; width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
button.link { background: none; border: 0; font: inherit; cursor: pointer; text-decoration: underline; padding: 0; color: var(--blue); }

/* forms */
label.field { display: block; font-weight: 700; }
label.field > span { display: block; margin-bottom: 4px; }
.input, select.input, textarea.input {
	width: 100%;
	font: inherit;
	padding: 12px 14px;
	border: 2px solid var(--line);
	border-radius: 12px;
	background: #fff;
	color: var(--ink);
}
.input:focus { outline: 3px solid #9cc4ea; border-color: var(--blue); }
.input.code { font-size: 1.6rem; letter-spacing: .25em; text-align: center; text-transform: uppercase; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--blue); }
.help { font-size: .85rem; color: var(--muted); font-weight: 400; }

/* alerts */
.alert { border-radius: 12px; padding: 12px 14px; border: 1px solid var(--line); background: #fff; }
.alert.red { background: var(--red-soft); border-color: var(--red); color: #7a1610; }
.alert.green { background: var(--green-soft); border-color: var(--green); }
.alert.sun { background: var(--sun-soft); border-color: var(--sun); }
.alert.blue { background: var(--blue-soft); border-color: #9cc4ea; }
.alert-rb {
	background: #000;
	color: #fff;
	border: 4px solid var(--red);
	border-radius: 14px;
	padding: 14px 16px;
	font-weight: 900;
	font-size: 1.15rem;
}
.alert-rb b { color: #ff5a4d; }

/* tags */
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--blue-soft); color: var(--blue-dark); }
.tag.green { background: var(--green-soft); color: #0f6a38; }
.tag.red { background: var(--red-soft); color: #9d1c12; }
.tag.sun { background: var(--sun-soft); color: #8a5a00; }
.tag.grey { background: #eceff3; color: var(--muted); }

/* tables */
.tablewrap { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { background: #f0f4f9; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
tr.blocked td { background: var(--red-soft); }

/* progress */
.bar { height: 14px; background: #e7edf4; border-radius: 99px; overflow: hidden; position: relative; }
.bar > i { display: block; height: 100%; background: var(--green); border-radius: 99px; transition: width .3s; }
.bar.blue > i { background: var(--blue); }

/* modal and toast */
.overlay {
	position: fixed; inset: 0; background: rgba(10, 20, 30, .6);
	display: flex; align-items: center; justify-content: center;
	padding: 16px; z-index: 1000;
}
.modal { background: #fff; border-radius: 20px; max-width: 560px; width: 100%; max-height: 92vh; overflow: auto; padding: 22px; }
.modal h2 { margin-top: 0; }
.modal .actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-top: 16px; }
.toast {
	position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
	background: #222; color: #fff; padding: 12px 20px; border-radius: 12px;
	z-index: 2000; font-weight: 600; max-width: 90vw; text-align: center;
}
.toast.good { background: var(--green); }
.toast.bad { background: var(--red); }

/* language switch */
.lang { display: inline-flex; border: 2px solid rgba(255,255,255,.7); border-radius: 99px; overflow: hidden; }
.lang button { background: transparent; color: #fff; border: 0; padding: 4px 12px; font: inherit; font-weight: 700; cursor: pointer; }
.lang button.on { background: #fff; color: var(--blue); }
.lang.dark { border-color: var(--line); }
.lang.dark button { color: var(--muted); }
.lang.dark button.on { background: var(--blue); color: #fff; }

/* pretend phone SMS bubble (demo only) */
.pretend-phone {
	border: 3px dashed #b9c4d0; border-radius: 18px; padding: 12px; background: #fafcff; font-size: .9rem;
}
.pretend-phone .sms { background: #e8f0e9; border-radius: 12px; padding: 10px 12px; margin-top: 6px; }
.pretend-phone h4 { margin: 0; font-size: .75rem; text-transform: uppercase; color: var(--muted); letter-spacing: .05em; }

/* demo tools (floating) */
.demo-tools {
	position: fixed; left: 10px; bottom: 10px; z-index: 900;
	background: #222; color: #fff; border-radius: 12px; font-size: .8rem; padding: 8px 10px; max-width: 260px;
	opacity: .92;
}
.demo-tools summary { cursor: pointer; font-weight: 700; }
.demo-tools button { margin: 6px 6px 0 0; }

/* child learning area: bigger and friendlier */
.kid { font-size: 20px; background: #fff9ec; min-height: 100vh; }
.kid .card { box-shadow: 0 4px 0 rgba(0,0,0,.08); border: 2px solid #f1e3c3; }
.kidbar {
	background: var(--sun); color: #3b2a00; padding: 8px 14px;
	display: flex; align-items: center; gap: 10px; flex-wrap: wrap; position: sticky; top: 0; z-index: 50;
}
.kidbar .who { font-weight: 800; flex: 1; min-width: 140px; }
.kidbar .pill { background: rgba(255,255,255,.7); border-radius: 99px; padding: 2px 12px; font-size: .8rem; font-weight: 700; }
.step {
	display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 18px; background: #fff;
	border: 3px solid #f1e3c3; text-decoration: none; color: inherit; cursor: pointer; width: 100%; text-align: left; font: inherit;
}
.step:hover { border-color: var(--sun); }
.step .ico { font-size: 2rem; width: 54px; height: 54px; border-radius: 16px; background: var(--sun-soft); display: grid; place-items: center; flex: none; }
.step.done { background: var(--green-soft); border-color: #b5e2c8; }
.step.done .ico { background: #c8eed8; }
.step.now { border-color: var(--blue); box-shadow: 0 0 0 4px #cfe3f6; }
.step.locked { background: #f0efe9; border-style: dashed; color: var(--muted); cursor: default; }
.step b { display: block; font-size: 1.05rem; }
.step small { color: var(--muted); }
.setbox { border: 3px dashed #e0c98c; border-radius: 20px; padding: 12px; background: #fffdf7; }
.setbox > .stack > * + * { margin-top: 10px; }
.or { text-align: center; font-weight: 800; color: var(--muted); }
.videobox {
	aspect-ratio: 16 / 9; width: 100%; border-radius: 18px; overflow: hidden; position: relative;
	background: linear-gradient(135deg, #2f7d4f, #8fd19e); display: grid; place-items: center; color: #fff;
}
.videobox .scene { font-size: 6rem; animation: bob 3s ease-in-out infinite; }
.videobox .cap { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.45); padding: 8px 12px; font-weight: 700; }
.videobox.paused .scene { animation-play-state: paused; opacity: .5; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
.seekbar { height: 22px; background: #d8dde3; border-radius: 99px; position: relative; cursor: pointer; overflow: hidden; }
.seekbar .got { position: absolute; left: 0; top: 0; bottom: 0; background: #7cc79a; }
.seekbar .pos { position: absolute; top: 0; bottom: 0; width: 6px; background: var(--blue); }
.shake { animation: shake .35s; }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.pdfpages { max-height: 55vh; overflow-y: auto; border: 3px solid #f1e3c3; border-radius: 18px; padding: 10px; background: #e9e4d6; }
.pdfpage { background: #fff; border-radius: 6px; padding: 22px; margin-bottom: 14px; min-height: 260px; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.answer {
	display: block; width: 100%; text-align: left; font: inherit; font-weight: 700; padding: 14px 16px; margin-top: 10px;
	border: 3px solid #e3d6b5; background: #fff; border-radius: 16px; cursor: pointer;
}
.answer:hover { border-color: var(--sun); }
.answer.picked { border-color: var(--blue); background: var(--blue-soft); }
.answer.right { border-color: var(--green); background: var(--green-soft); }
.answer.wrong { border-color: var(--red); background: var(--red-soft); }
.bigtime { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs img, .thumbs .ph { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; border: 2px solid var(--line); background: #eee; }
.leftscreen {
	position: fixed; inset: 0; background: #b3150a; color: #fff; z-index: 3000; display: flex; flex-direction: column;
	align-items: center; justify-content: center; text-align: center; padding: 24px; gap: 14px;
}
.leftscreen h1 { font-size: 2.4rem; }
.leftscreen .btn { background: #fff; color: #7a1610; border-color: #fff; }
.pulse { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .55; } }

/* builder */
.builder { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .builder { grid-template-columns: 1fr; } }
.bstep { border: 2px solid var(--line); border-radius: 14px; background: #fff; padding: 10px 12px; }
.bstep.sel { border-color: var(--blue); box-shadow: 0 0 0 3px #cfe3f6; }
.bstep .head { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.bstep .head .t { flex: 1; font-weight: 700; }
.bstep .kids { margin: 10px 0 0 14px; padding-left: 12px; border-left: 3px dashed #c9d5e2; }
.iconbtn { border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 32px; height: 32px; cursor: pointer; font-size: 1rem; }
.iconbtn:hover { background: var(--blue-soft); }

@media (max-width: 600px) {
	body { font-size: 16px; }
	h1 { font-size: 1.45rem; }
	.wrap { padding: 12px; }
}
