/* Raaj LMS · playful crayon palette, rounded "pressable" buttons, light + dark */
:root {
  --bg: #fff8ee;
  --bg2: #fff1df;
  --surface: #ffffff;
  --surface2: #fbf6ff;
  --ink: #2a2542;
  --muted: #6d6889;
  --line: #ece2d3;
  --line2: #e2d6f5;
  --grape: #7c4dff;
  --grape-d: #5b2fe0;
  --coral: #ff6b6b;
  --coral-d: #e14848;
  --sun: #ffc53d;
  --sun-d: #e0a100;
  --mint: #22c3a6;
  --mint-d: #109a82;
  --sky: #4d96ff;
  --sky-d: #2f74db;
  --pink: #ff7eb6;
  --leaf: #6bcb77;
  --orange: #ff9f43;
  --grape-t: #efe8ff;
  --coral-t: #ffe7e7;
  --sun-t: #fff3d1;
  --mint-t: #dcf7f1;
  --sky-t: #e2eeff;
  --pink-t: #ffe6f1;
  --leaf-t: #e3f6e5;
  --orange-t: #ffeedd;
  --shadow: 0 10px 30px -12px rgba(60, 35, 120, .25);
  --shadow-sm: 0 3px 10px -4px rgba(60, 35, 120, .2);
  --r: 18px;
  --display: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16142a; --bg2: #1d1a36; --surface: #221f3d; --surface2: #29254a; --ink: #f4f1ff; --muted: #aca6cf; --line: #343058; --line2: #3d3766;
    --grape: #9b7bff; --grape-d: #7c4dff; --coral: #ff8080; --sun: #ffd166; --mint: #3ddcbf; --sky: #6aa8ff; --pink: #ff94c4; --leaf: #7ed88a; --orange: #ffb067;
    --grape-t: #2f2858; --coral-t: #3d2433; --sun-t: #3a321f; --mint-t: #1b3a3c; --sky-t: #1f2e4f; --pink-t: #3b2340; --leaf-t: #213a2c; --orange-t: #3b2c22;
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6); --shadow-sm: 0 3px 10px -4px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #16142a; --bg2: #1d1a36; --surface: #221f3d; --surface2: #29254a; --ink: #f4f1ff; --muted: #aca6cf; --line: #343058; --line2: #3d3766;
  --grape: #9b7bff; --grape-d: #7c4dff; --coral: #ff8080; --sun: #ffd166; --mint: #3ddcbf; --sky: #6aa8ff; --pink: #ff94c4; --leaf: #7ed88a; --orange: #ffb067;
  --grape-t: #2f2858; --coral-t: #3d2433; --sun-t: #3a321f; --mint-t: #1b3a3c; --sky-t: #1f2e4f; --pink-t: #3b2340; --leaf-t: #213a2c; --orange-t: #3b2c22;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6); --shadow-sm: 0 3px 10px -4px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--body); overflow-x: hidden }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em }
p { margin: 0 0 1em }
a { color: var(--grape) }
img { max-width: 100% }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px }
.narrow { max-width: 780px }
.center { text-align: center }
.muted { color: var(--muted) }
.small { font-size: .86rem }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap }
.between { justify-content: space-between }
.grow { flex: 1 }
[hidden] { display: none !important }

/* ---------- buttons & inputs ---------- */
button, .btn {
  --c: var(--surface); --cd: var(--line); --fg: var(--ink);
  font: 700 .95rem/1 var(--body); color: var(--fg); background: var(--c); border: 2px solid var(--cd);
  border-radius: 14px; padding: 11px 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  text-decoration: none; box-shadow: 0 3px 0 var(--cd); transition: transform .08s, box-shadow .08s, background .15s; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
button:hover, .btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--cd) }
button:active, .btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--cd) }
button:disabled { opacity: .55; cursor: default; transform: none }
button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--grape) 45%, transparent); outline-offset: 2px }
.primary { --c: var(--grape); --cd: var(--grape-d); --fg: #fff }
.coral { --c: var(--coral); --cd: var(--coral-d); --fg: #fff }
.sunb { --c: var(--sun); --cd: var(--sun-d); --fg: #2a2542 }
.mintb { --c: var(--mint); --cd: var(--mint-d); --fg: #fff }
.ghost { --c: transparent; --cd: transparent; box-shadow: none }
.ghost:hover { background: var(--grape-t); box-shadow: none }
.danger { --fg: var(--coral-d) }
.big { padding: 15px 22px; font-size: 1.05rem; border-radius: 16px }
.sm { padding: 7px 10px; font-size: .82rem; border-radius: 11px; box-shadow: 0 2px 0 var(--cd) }
.icon { padding: 8px; width: 38px; height: 38px; border-radius: 12px }
.icon.sm { width: 32px; height: 32px; padding: 5px }

input, select, textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%; min-width: 0;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.5 }
select { padding-right: 30px }
label.f { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 12px }
label.f > input, label.f > select, label.f > textarea, label.f > .pw { margin-top: 5px }
.pw { display: flex; gap: 6px }
.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 600; font-size: .92rem; margin: 8px 0; cursor: pointer }
.check input { width: 20px; height: 20px; flex: none; accent-color: var(--grape); margin-top: 1px }
.err-msg { color: var(--coral-d); font-weight: 700; font-size: .9rem; min-height: 1.2em; margin: 4px 0 10px }
:root[data-theme="dark"] .err-msg { color: var(--coral) }

.card { background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow-sm) }

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 600 1.25rem/1 var(--display) }
.brand small { display: block; font: 600 .72rem/1.2 var(--body); color: var(--muted); letter-spacing: .02em }
.logo { width: 40px; height: 40px; flex: none; background: url(/favicon.svg) center/contain no-repeat }

/* ---------- landing ---------- */
html.authed #landing { display: none }
html:not(.authed) #app { display: none }
.lnav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 2px solid transparent }
.lnav.scrolled { border-bottom-color: var(--line) }
.lnav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 70px }
.lnav nav { display: flex; gap: 4px; align-items: center }
.lnav nav a.lk { color: var(--ink); font-weight: 700; text-decoration: none; padding: 8px 12px; border-radius: 10px }
.lnav nav a.lk:hover { background: var(--grape-t) }

.hero { position: relative; padding: 36px 0 70px; overflow: hidden }
.hero-grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: 44px; align-items: center }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; background: var(--sun-t); color: var(--ink); font-weight: 800; font-size: .82rem; padding: 7px 13px; border-radius: 99px; border: 2px dashed var(--sun); margin-bottom: 18px }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); font-weight: 700; margin-bottom: 18px }
.hl { position: relative; white-space: nowrap; z-index: 0 }
.hl::after { content: ''; position: absolute; left: -4px; right: -4px; bottom: .06em; height: .38em; border-radius: 8px; z-index: -1; background: var(--hlc, var(--sun)); opacity: .55; transform: rotate(-1.2deg) }
.c-grape { color: var(--grape) } .c-coral { color: var(--coral) } .c-mint { color: var(--mint) } .c-sky { color: var(--sky) }
.lead { font-size: 1.14rem; color: var(--muted); max-width: 36em }
.cta-row { margin: 26px 0 18px; gap: 12px }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-weight: 700; font-size: .9rem; padding: 0; margin: 0; list-style: none }
.trust li::before { content: '✓'; color: var(--mint); font-weight: 900; margin-right: 6px }

/* decorative blobs */
.blob { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .5; z-index: -1; pointer-events: none }
.b1 { width: 340px; height: 340px; background: var(--pink-t); top: -90px; right: -80px }
.b2 { width: 220px; height: 220px; background: var(--sky-t); bottom: -60px; left: -70px }
.b3 { width: 120px; height: 120px; background: var(--sun-t); top: 40%; left: 46% }
.doodle { position: absolute; pointer-events: none; z-index: -1 }

/* hero mock app */
.mock { position: relative; background: var(--surface); border: 2px solid var(--line2); border-radius: 26px; box-shadow: var(--shadow); padding: 14px; transform: rotate(1deg) }
.mock-bar { display: flex; gap: 6px; align-items: center; padding: 2px 4px 12px }
.mock-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--coral) }
.mock-bar i:nth-child(2) { background: var(--sun) } .mock-bar i:nth-child(3) { background: var(--mint) }
.mock-bar b { margin-left: 10px; font: 600 .9rem var(--display); color: var(--muted) }
.mock-body { display: grid; grid-template-columns: 130px 1fr; gap: 12px }
.mock-side { display: flex; flex-direction: column; gap: 7px }
.kid { display: flex; align-items: center; gap: 7px; font-weight: 800; font-size: .8rem; padding: 7px 9px; border-radius: 12px; background: var(--bg) }
.kid.on { background: var(--grape-t); color: var(--grape) }
.av { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 700 .7rem var(--display); flex: none }
.mock-main { display: flex; flex-direction: column; gap: 8px }
.mock-title { font: 600 1.05rem var(--display); display: flex; justify-content: space-between; align-items: center; gap: 6px }
.chip { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; font-size: .72rem; padding: 4px 9px; border-radius: 99px; background: var(--mint-t); color: var(--mint-d) }
:root[data-theme="dark"] .chip { color: var(--mint) }
.mblock { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); font-weight: 700; font-size: .82rem }
.mblock .grip { color: var(--muted); letter-spacing: -2px; font-weight: 900 }
.mblock .ft { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; font: 700 .62rem var(--display); flex: none }
.mblock small { display: block; color: var(--muted); font-weight: 600 }
.mblock.drag { transform: rotate(-2.5deg) translateX(14px); box-shadow: var(--shadow); border-color: var(--grape) }
.float-pdf { position: absolute; right: -18px; bottom: -34px; width: 150px; background: #fff; border-radius: 10px; box-shadow: var(--shadow); padding: 12px; transform: rotate(-6deg); border: 2px solid #efe6ff }
.float-pdf .ph { height: 64px; border-radius: 6px; background: linear-gradient(135deg, #ffd6e7, #d8e8ff); margin-bottom: 8px }
.float-pdf .ln { height: 6px; border-radius: 3px; background: #e9e4f5; margin-bottom: 5px }
.float-pdf .tag { position: absolute; top: -12px; left: -12px; background: var(--coral); color: #fff; font: 700 .72rem var(--display); padding: 5px 9px; border-radius: 9px; transform: rotate(-4deg) }
.float-sticker { position: absolute; left: -26px; top: 64px; background: var(--sun); color: #2a2542; font: 700 .85rem var(--display); padding: 10px 12px; border-radius: 14px; transform: rotate(-9deg); box-shadow: var(--shadow-sm) }

/* format strip */
.formats { padding: 8px 0 22px }
.fstrip { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center }
.fchip { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; padding: 10px 16px; border-radius: 99px; background: var(--surface); border: 2px solid var(--line); box-shadow: var(--shadow-sm) }
.fchip i { width: 12px; height: 12px; border-radius: 4px; display: inline-block }

section.sec { padding: 72px 0 }
.sec-head { text-align: center; max-width: 680px; margin: 0 auto 40px }
.sec-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem) }
.kicker { display: inline-block; font: 700 .8rem var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--coral); margin-bottom: 10px }
.band { background: var(--bg2) }
.wave { display: block; width: 100%; height: 40px; color: var(--bg2) }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; list-style: none; padding: 0; margin: 0 }
.steps li { position: relative; background: var(--surface); border: 2px solid var(--line); border-radius: 22px; padding: 26px 22px 22px; box-shadow: var(--shadow-sm) }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; top: -18px; left: 20px; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font: 700 1.2rem var(--display); color: #fff; background: var(--sc); transform: rotate(-6deg); box-shadow: 0 3px 0 rgba(0,0,0,.15) }
.steps li:nth-child(1) { --sc: var(--grape) } .steps li:nth-child(2) { --sc: var(--coral) } .steps li:nth-child(3) { --sc: var(--mint) }
.steps h3 { font-size: 1.25rem; margin-top: 8px }
.steps p { color: var(--muted); margin: 0 }
.step-art { height: 92px; border-radius: 14px; margin-bottom: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--bg) }
.step-art .ft { width: 44px; height: 54px; border-radius: 9px; display: grid; place-items: center; color: #fff; font: 700 .68rem var(--display); box-shadow: 0 3px 0 rgba(0,0,0,.12) }
.step-art .ft:nth-child(odd) { transform: rotate(-6deg) } .step-art .ft:nth-child(even) { transform: rotate(5deg) translateY(-5px) }

.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px }
.feat { background: var(--surface); border: 2px solid var(--line); border-radius: 22px; padding: 22px; transition: transform .15s, box-shadow .15s }
.feat:hover { transform: translateY(-3px) rotate(-.3deg); box-shadow: var(--shadow) }
.feat .fi { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 14px; background: var(--t) }
.feat h3 { font-size: 1.18rem }
.feat p { color: var(--muted); margin: 0 }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center }
.sizes { display: flex; gap: 16px; align-items: flex-end; justify-content: center; flex-wrap: wrap; padding: 20px 0 }
.sheet { background: var(--surface); border: 2px solid var(--line2); border-radius: 8px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; justify-content: flex-end; padding: 8px; font: 700 .78rem var(--display); color: var(--muted); position: relative; overflow: hidden }
.sheet::before { content: ''; position: absolute; inset: 8px 8px 28px; border-radius: 4px; background: repeating-linear-gradient(var(--line) 0 4px, transparent 4px 12px) top/100% 60% no-repeat, linear-gradient(135deg, var(--sc, var(--sky-t)), transparent) bottom/100% 35% no-repeat }
.sheet.hot { border-color: var(--grape); color: var(--grape) }
.bullets { list-style: none; padding: 0; margin: 18px 0 0 }
.bullets li { display: flex; gap: 12px; margin-bottom: 14px; font-weight: 600 }
.bullets li span { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--t); font-size: .95rem }

.who { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px }
.who > div { border-radius: 22px; padding: 24px; background: var(--t); border: 2px solid transparent }
.who h3 { font-size: 1.2rem }
.who p { margin: 0; color: var(--ink); opacity: .82 }

details { background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 14px 18px; margin-bottom: 10px }
details summary { cursor: pointer; font-weight: 800; list-style: none; display: flex; justify-content: space-between; gap: 10px }
details summary::after { content: '+'; font: 700 1.3rem/1 var(--display); color: var(--grape) }
details[open] summary::after { content: '–' }
details p { margin: 10px 0 0; color: var(--muted) }

.final { padding: 30px 0 80px }
.final-card { position: relative; overflow: hidden; border-radius: 30px; padding: 54px 24px; text-align: center; color: #fff; background: linear-gradient(120deg, var(--grape) 0%, #a05cff 45%, var(--coral) 100%) }
.final-card h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); color: #fff }
.final-card p { opacity: .92; font-size: 1.1rem }
.final-card .btn { --c: #fff; --cd: #e4d9ff; --fg: var(--grape-d) }
.confetti i { position: absolute; width: 14px; height: 14px; border-radius: 4px; opacity: .9 }
.lfoot { border-top: 2px solid var(--line); padding: 22px 0 40px; color: var(--muted); font-weight: 600; font-size: .92rem }
.lfoot a { color: var(--muted) }

/* auth sheet */
.authwrap { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(30, 20, 60, .45); backdrop-filter: blur(4px) }
.authcard { width: min(440px, 100%); position: relative; padding: 26px 22px 20px; border-radius: 26px; animation: pop .22s ease-out }
.authcard h2 { font-size: 1.6rem; margin-bottom: 4px }
.authcard .x { position: absolute; top: 12px; right: 12px }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--bg); border-radius: 14px; padding: 5px; margin: 16px 0 18px }
.seg button { box-shadow: none; border: 0; background: transparent; border-radius: 10px }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--grape); box-shadow: var(--shadow-sm) }
@keyframes pop { from { transform: scale(.94) translateY(10px); opacity: 0 } to { transform: none; opacity: 1 } }

/* ---------- app shell ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 2px solid var(--line) }
.topbar .wrap { display: flex; align-items: center; gap: 10px; height: 64px }
.tabs { display: flex; gap: 4px; margin-left: 14px }
.tabs a { text-decoration: none; color: var(--muted); font-weight: 800; padding: 9px 13px; border-radius: 12px; display: inline-flex; gap: 7px; align-items: center }
.tabs a:hover { background: var(--grape-t); color: var(--ink) }
.tabs a.on { background: var(--grape-t); color: var(--grape) }
.mtabs { display: none }
main.page { padding: 22px 0 90px }

.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px }
.hello h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 }
.hello p { margin: 4px 0 0 }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px }
.stat { border-radius: 18px; padding: 14px 16px; background: var(--t); display: flex; flex-direction: column }
.stat b { font: 700 1.7rem/1.1 var(--display) }
.stat span { font-weight: 700; font-size: .85rem; opacity: .8 }

.lib { display: grid; grid-template-columns: 230px 1fr; gap: 20px; align-items: start }
.side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 4px }
.side h4 { font: 800 .74rem var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 14px 8px 6px }
.side .who-btn { --c: transparent; --cd: transparent; box-shadow: none; justify-content: flex-start; width: 100%; padding: 9px 10px; border-radius: 12px; font-weight: 800; text-align: left; white-space: normal }
.side .who-btn:hover { background: var(--surface); transform: none }
.side .who-btn.on { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-sm) }
.side .who-btn .n { margin-left: auto; font-size: .78rem; color: var(--muted); background: var(--bg2); border-radius: 99px; padding: 2px 8px }
.side .who-btn .nm { overflow: hidden; text-overflow: ellipsis }
.ic { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; flex: none; font-size: .9rem; background: var(--grape-t) }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px }
.toolbar .search { flex: 1 1 220px; position: relative }
.toolbar .search input { padding-left: 38px }
.toolbar .search::before { content: '🔍'; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: .9rem; opacity: .6 }
.toolbar select { width: auto; flex: 0 1 auto }
.seg2 { display: inline-flex; background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 3px }
.seg2 button { box-shadow: none; border: 0; padding: 7px 10px; border-radius: 9px; --c: transparent }
.seg2 button.on { background: var(--grape-t); color: var(--grape) }

.group-h { display: flex; align-items: center; gap: 10px; margin: 22px 0 12px; font: 600 1.15rem var(--display) }
.group-h .n { font: 800 .78rem var(--body); color: var(--muted); background: var(--surface); border: 2px solid var(--line); padding: 2px 9px; border-radius: 99px }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px }
.lcard { position: relative; background: var(--surface); border: 2px solid var(--line); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: transform .12s, box-shadow .12s; box-shadow: var(--shadow-sm) }
.lcard:hover { transform: translateY(-3px); box-shadow: var(--shadow) }
.lcard .cov { height: 112px; background: var(--t); display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 10px; position: relative }
.lcard .cov .tile { border-radius: 10px; background: var(--surface) center/cover no-repeat; display: grid; place-items: center; font: 700 .72rem var(--display); color: #fff; overflow: hidden; box-shadow: 0 2px 0 rgba(0,0,0,.06) }
.lcard .cov .empty { grid-column: 1 / -1; display: grid; place-items: center; font-size: 2.4rem; opacity: .9 }
.lcard .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1 }
.lcard h3 { font-size: 1.08rem; margin: 0; word-break: break-word }
.lcard .meta { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: .8rem; color: var(--muted); font-weight: 700 }
.lcard .foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; gap: 6px }
.lcard .done-flag { position: absolute; top: 10px; right: 10px; background: var(--mint); color: #fff; font: 700 .75rem var(--display); padding: 4px 9px; border-radius: 99px; transform: rotate(4deg); box-shadow: var(--shadow-sm) }
.lcard.isdone .cov { filter: saturate(.75) }
.pill { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; font-size: .74rem; padding: 3px 9px; border-radius: 99px; background: var(--t, var(--bg2)); color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--d) }
.list .lrow { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer }
.list .lrow:hover { border-color: var(--line2); box-shadow: var(--shadow-sm) }
.list .lrow .th { width: 48px; height: 48px; border-radius: 12px; flex: none; background: var(--t) center/cover no-repeat; display: grid; place-items: center; font-size: 1.3rem }
.list .lrow .tx { flex: 1; min-width: 0 }
.list .lrow .tx b { display: block; font-family: var(--display); font-weight: 600; font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.handle { cursor: grab; touch-action: none; user-select: none; color: var(--muted); font-weight: 900; letter-spacing: -2px; padding: 6px 4px; border-radius: 8px; flex: none; line-height: 1 }
.handle:hover { background: var(--grape-t); color: var(--grape) }
.dragging { opacity: .92; box-shadow: var(--shadow) !important; transform: rotate(-1deg) scale(1.02); z-index: 5; position: relative; border-color: var(--grape) !important }
.lcard .handle { position: absolute; top: 8px; left: 8px; background: var(--surface); z-index: 2 }

.emptybox { text-align: center; padding: 50px 20px; border: 3px dashed var(--line2); border-radius: 26px; background: var(--surface) }
.emptybox .big-emoji { font-size: 3.2rem; display: block; margin-bottom: 8px }
.emptybox h3 { font-size: 1.4rem }

/* ---------- editor ---------- */
.ed { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start }
.ed-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap }
.ed-title { font: 600 clamp(1.5rem, 3vw, 2.1rem)/1.2 var(--display); border: 0; background: transparent; padding: 6px 4px; border-radius: 10px; flex: 1; min-width: 200px }
.ed-title:hover { background: var(--surface) }
.ed-title::placeholder { color: var(--muted); opacity: .6 }
.saved { font-weight: 800; font-size: .8rem; color: var(--muted); white-space: nowrap }
.saved.ok { color: var(--mint-d) }
.saved.err { color: var(--coral-d) }
.blocks { display: flex; flex-direction: column; gap: 10px; min-height: 120px }
.blk { display: flex; gap: 8px; align-items: flex-start; background: var(--surface); border: 2px solid var(--line); border-radius: 18px; padding: 10px; position: relative }
.blk:focus-within { border-color: var(--line2) }
.blk > .handle { margin-top: 8px }
.blk .bc { flex: 1; min-width: 0 }
.blk .bt { display: flex; gap: 4px; flex-direction: column }
.blk .tag { font: 800 .68rem var(--body); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; display: flex; gap: 6px; align-items: center }
.blk input.h { font: 600 1.3rem var(--display); border-color: transparent; background: transparent; padding: 4px 6px }
.blk input.h:hover, .blk input.h:focus { border-color: var(--line); background: var(--bg) }
.blk textarea { border-color: transparent; background: var(--bg); min-height: 70px }
.blk.t-heading { border-left: 6px solid var(--grape) }
.blk.t-text { border-left: 6px solid var(--sky) }
.blk.t-checklist { border-left: 6px solid var(--mint) }
.blk.t-link { border-left: 6px solid var(--orange) }
.blk.t-break { border: 2px dashed var(--line2); background: transparent; padding: 6px 10px; align-items: center }
.blk.t-break .bc { text-align: center; font-weight: 800; color: var(--muted); font-size: .85rem }
.blk.t-file { border-left: 6px solid var(--coral) }
.fblk { display: flex; gap: 12px; align-items: flex-start }
.fthumb { width: 96px; height: 96px; flex: none; border-radius: 14px; background: var(--t, var(--bg2)) center/cover no-repeat; display: grid; place-items: center; font: 700 .9rem var(--display); color: #fff; cursor: zoom-in; border: 2px solid var(--line); overflow: hidden; position: relative }
.fthumb .ext { background: var(--x); padding: 5px 8px; border-radius: 8px; box-shadow: 0 2px 0 rgba(0,0,0,.15) }
.fthumb.has .ext { position: absolute; bottom: 5px; right: 5px; font-size: .62rem; padding: 3px 6px }
.finfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px }
.finfo .fname { font-weight: 800; word-break: break-word }
.finfo input { padding: 7px 10px; font-size: .92rem }
.ck { display: flex; gap: 8px; align-items: center; margin-bottom: 6px }
.ck input[type="checkbox"] { width: 20px; height: 20px; flex: none; accent-color: var(--mint) }
.ck input[type="text"] { padding: 6px 10px; border-color: transparent; background: var(--bg) }
.prog { height: 8px; border-radius: 99px; background: var(--bg2); overflow: hidden; margin-top: 6px }
.prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--grape), var(--pink)); border-radius: 99px; transition: width .2s }
.addbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding: 12px; border: 3px dashed var(--line2); border-radius: 20px; align-items: center; justify-content: center; background: color-mix(in srgb, var(--surface) 60%, transparent) }
.addbar.over { border-color: var(--grape); background: var(--grape-t) }
.addbar .hint { width: 100%; text-align: center; font-weight: 700; color: var(--muted); font-size: .88rem }
.panel { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 14px }
.panel .card { padding: 16px }
.panel h4 { font: 600 1.02rem var(--display); margin-bottom: 10px }
.pick { display: flex; flex-wrap: wrap; gap: 6px }
.pick button { box-shadow: none; padding: 6px 10px; border-radius: 99px; font-size: .82rem; border-width: 2px; --c: var(--surface); --cd: var(--line) }
.pick button.on { --c: var(--t); --cd: var(--d); color: var(--ink) }
.stbtn { display: grid; grid-template-columns: 1fr 1fr; gap: 6px }
.stbtn button { box-shadow: none; font-size: .85rem }
.stbtn button.on.pl { --c: var(--sun-t); --cd: var(--sun) }
.stbtn button.on.dn { --c: var(--mint-t); --cd: var(--mint) }
.tags-in { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border: 2px solid var(--line); border-radius: 12px; padding: 6px; background: var(--surface) }
.tags-in input { border: 0; padding: 4px; flex: 1; min-width: 80px }
.tags-in .pill button { box-shadow: none; border: 0; padding: 0 0 0 3px; background: none; font-size: .8rem; color: var(--muted) }

/* files page */
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px }
.fcard { background: var(--surface); border: 2px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column }
.fcard .fthumb { width: 100%; height: 120px; border-radius: 0; border: 0; border-bottom: 2px solid var(--line) }
.fcard .fb { padding: 10px; display: flex; flex-direction: column; gap: 4px; flex: 1 }
.fcard .fb b { font-size: .88rem; word-break: break-word; line-height: 1.3 }
.fcard .fb small { color: var(--muted); font-weight: 700 }
.fcard .fa { display: flex; gap: 4px; margin-top: auto; padding-top: 6px }
.fcard.sel { border-color: var(--grape); box-shadow: 0 0 0 3px var(--grape-t) }
.meter { height: 12px; border-radius: 99px; background: var(--bg2); overflow: hidden; border: 2px solid var(--line) }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--mint), var(--sky), var(--grape)); border-radius: 99px }

/* learners page */
.lrn { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 2px solid var(--line); border-radius: 18px; padding: 12px; margin-bottom: 10px }
.lrn .av { width: 44px; height: 44px; font-size: 1.1rem; border-radius: 14px }
.swatches { display: flex; gap: 6px; flex-wrap: wrap }
.swatches button { width: 30px; height: 30px; border-radius: 10px; padding: 0; background: var(--c); --cd: transparent; box-shadow: none; border: 3px solid transparent }
.swatches button.on { border-color: var(--ink) }

/* dialogs */
dialog { border: 0; padding: 0; background: transparent; color: var(--ink); max-width: min(720px, calc(100vw - 24px)); width: 100% }
dialog::backdrop { background: rgba(30, 20, 60, .5); backdrop-filter: blur(3px) }
dialog .card { padding: 22px; border-radius: 24px; max-height: calc(100vh - 40px); overflow: auto; animation: pop .2s ease-out }
dialog.wide { max-width: min(1100px, calc(100vw - 24px)) }
dialog h2 { font-size: 1.45rem }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px }
.dlg-head h2 { margin: 0; word-break: break-word }
.viewer { min-height: 200px; display: flex; flex-direction: column; align-items: center; gap: 12px }
.viewer img, .viewer video { max-width: 100%; max-height: 72vh; border-radius: 12px }
.viewer canvas { max-width: 100%; height: auto; border-radius: 6px; box-shadow: var(--shadow-sm); background: #fff }
.viewer .doc { width: 100%; background: #fff; color: #222; border-radius: 12px; padding: 24px; max-height: 70vh; overflow: auto; font-family: Georgia, serif }
.viewer .doc img { max-width: 100% }
.viewer .slide { width: 100%; background: var(--bg); border-radius: 12px; padding: 16px; border: 2px solid var(--line) }
.viewer .slide img { max-height: 220px; margin: 4px }
.viewer pre { width: 100%; white-space: pre-wrap; background: var(--bg); padding: 16px; border-radius: 12px; max-height: 70vh; overflow: auto }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px }
.sizegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-bottom: 12px }
.sizegrid button { flex-direction: column; gap: 6px; padding: 10px 6px; box-shadow: none; font-size: .8rem; white-space: normal; text-align: center; line-height: 1.2 }
.sizegrid button.on { --c: var(--grape-t); --cd: var(--grape); color: var(--grape) }
.sizegrid button small { font-weight: 600; color: var(--muted); font-size: .7rem }
.sizegrid .pg { background: var(--surface); border: 2px solid currentColor; border-radius: 3px; opacity: .7 }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-weight: 800; opacity: 0; pointer-events: none; transition: .25s; z-index: 100; max-width: calc(100vw - 32px); box-shadow: var(--shadow) }
#toast.show { opacity: 1; transform: translateX(-50%) }
.dropover::after { content: 'Drop files to add them to this lesson'; position: fixed; inset: 10px; border: 4px dashed var(--grape); border-radius: 28px; background: color-mix(in srgb, var(--grape-t) 85%, transparent); display: grid; place-items: center; font: 600 1.5rem var(--display); color: var(--grape); z-index: 80; pointer-events: none }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .split { grid-template-columns: 1fr }
  .hero-art { max-width: 560px; margin: 10px auto 30px; width: 100% }
  .feats, .who { grid-template-columns: 1fr 1fr }
  .ed { grid-template-columns: 1fr }
  .panel { position: static; order: -1 }
  .lib { grid-template-columns: 1fr }
  .side { position: static; flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none }
  .side h4, .side .side-extra { display: none }
  .side .who-btn { width: auto; flex: none; white-space: nowrap; background: var(--surface); border-color: var(--line) }
  .side .who-btn.on { background: var(--grape-t); border-color: var(--grape) }
}
@media (max-width: 720px) {
  .lnav nav a.lk { display: none }
  .steps, .feats, .who { grid-template-columns: 1fr }
  .steps { gap: 30px }
  .stats { grid-template-columns: 1fr 1fr }
  .tabs { display: none }
  .mtabs { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: var(--surface); border-top: 2px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around }
  .mtabs a { flex: 1; text-decoration: none; color: var(--muted); font-weight: 800; font-size: .72rem; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px }
  .mtabs a span { font-size: 1.25rem }
  .mtabs a.on { color: var(--grape); background: var(--grape-t) }
  .mock-body { grid-template-columns: 1fr }
  .mock-side { flex-direction: row; overflow: hidden }
  .mock-side .kid:nth-child(n+3) { display: none }
  .float-pdf { width: 110px; right: -6px; bottom: -28px }
  .float-sticker { left: -6px; top: -16px }
  .mock { transform: none }
  .hide-sm { display: none !important }
  .fthumb { width: 72px; height: 72px }
  .grid2 { grid-template-columns: 1fr }
  .toolbar select { flex: 1 1 40% }
  .grid { grid-template-columns: 1fr 1fr; gap: 10px }
  .lcard .cov { height: 86px; padding: 7px }
  .lcard .body { padding: 10px }
  .lcard h3 { font-size: .96rem }
}
@media (max-width: 400px) { .grid { grid-template-columns: 1fr } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important } }
@media print { .topbar, .mtabs { display: none } }
