/* Khelzi for parents on the web. Same palette and type as the Android app. */
@font-face { font-family: Display; src: url(/app/fonts/barlow_condensed_medium.ttf) format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: Display; src: url(/app/fonts/barlow_condensed_semibold.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: Display; src: url(/app/fonts/barlow_condensed_bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: Body; src: url(/app/fonts/ibm_plex_sans.ttf) format("truetype"); font-weight: 100 700; font-display: swap; }

:root {
  --ink: #0A2540; --ground: #F3F7FA; --sand: #E1E8EF; --field: #00A89C; --lime: #A6F000; --pitch: #E6D9B0;
  --red: #C62828; --muted: #56657A; --line: #DCE4EC;
  --top: env(safe-area-inset-top); --bottom: env(safe-area-inset-bottom);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--ground); color: var(--ink); font: 400 15px/1.45 Body, -apple-system, system-ui, sans-serif; -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; padding-top: var(--top); }
main { max-width: 560px; margin: 0 auto; padding: 0 20px calc(28px + var(--bottom)); }
a { color: var(--field); }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.display { font-family: Display, sans-serif; font-weight: 600; letter-spacing: .005em; line-height: 1.05; margin: 0; }
.label { font-family: Display, sans-serif; font-weight: 600; font-size: 15px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
p { margin: 0; }
.stack > * + * { margin-top: 12px; }

.banner { position: sticky; top: 0; z-index: 5; background: var(--ink); color: var(--ground); font-size: 13px; font-weight: 500; padding: 8px 20px; }
.boot { min-height: 80dvh; display: grid; place-items: center; }

/* header */
.top { display: flex; align-items: center; gap: 12px; padding: 18px 0 6px; }
.top img { width: 44px; height: auto; }
.top .grow { flex: 1; min-width: 0; }
.top h1 { font-size: 30px; font-weight: 700; }
.back { width: 40px; height: 40px; margin-left: -8px; border: 0; background: none; display: grid; place-items: center; border-radius: 50%; }
.back:active { background: var(--sand); }
.sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .title { font-size: 34px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* cards and buttons */
.card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px; }
.card.dark { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.card.flush { padding: 0; overflow: hidden; }
.card.tap { display: block; width: 100%; text-align: left; font: inherit; text-decoration: none; color: var(--ink); }
.card.dark.tap { color: var(--ground); }
.card.tap:active { transform: scale(.99); }
.card + .card { margin-top: 12px; }
.big { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 56px; border: 0; border-radius: 16px;
  background: var(--ink); color: #fff; font-size: 17px; font-weight: 600; }
.big.red { background: var(--red); }
.big:disabled { background: var(--sand); color: var(--muted); }
.big .dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.outline { display: block; width: 100%; height: 50px; border: 1px solid var(--line); background: none; border-radius: 16px; font-size: 15px; color: var(--ink); }
.outline.danger { color: var(--red); font-weight: 600; }
.link { border: 0; background: none; padding: 4px 0; color: var(--field); font-size: 13px; font-weight: 600; }
.link.grey { color: var(--muted); font-weight: 400; }
.text { border: 0; background: none; padding: 10px 14px; font-weight: 500; color: var(--ink); border-radius: 10px; }
.text.danger { color: var(--red); font-weight: 600; }
.error { background: #FDECEC; color: var(--red); border-radius: 12px; padding: 10px 12px; font-size: 14px; }

/* form */
.field { display: flex; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; height: 60px; padding: 0 16px; gap: 10px; }
.field:focus-within { border-color: var(--ink); }
.field span { font-size: 18px; color: var(--muted); }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 500 20px Body, sans-serif; color: var(--ink); }
.field input.code { text-align: center; font: 600 30px Display, sans-serif; letter-spacing: 10px; }

/* login */
.hero { background: #fff; margin: 0 -20px; padding: 34px 20px 22px; text-align: center; border-bottom: 1px solid var(--line); }
.hero img { width: 190px; height: auto; }
.legal { display: flex; justify-content: center; gap: 22px; margin-top: 22px; }
.legal a { color: var(--muted); text-decoration: none; font-size: 14px; }
.help { text-align: center; margin-top: 14px; font-size: 14px; font-weight: 500; }
.help a { color: var(--muted); text-decoration: none; }

/* child cards */
.kid { display: flex; align-items: center; gap: 14px; }
.kid .grow { flex: 1; min-width: 0; }
.kid h3 { font-size: 27px; overflow-wrap: anywhere; }
.kid .academy { font-size: 13px; opacity: .8; }
.kid-line { margin-top: 14px; font-size: 15px; }
.avatar { flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--sand); color: var(--ink); font: 600 20px Display, sans-serif; }
.dark .avatar { background: var(--lime); }
.chev { flex: none; opacity: .9; }

.live { display: inline-flex; align-items: center; gap: 7px; background: var(--red); color: #fff; border-radius: 8px; padding: 5px 10px;
  font: 700 15px Display, sans-serif; letter-spacing: .06em; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: pulse 1.3s ease-in-out infinite; }
.live .pulse { background: #FFB4B4; }
@keyframes pulse { 50% { opacity: .25; } }

.pitch { display: block; width: 100%; background: var(--field); }

/* videos */
.clip { display: flex; align-items: center; gap: 12px; padding: 10px; }
.clip .grow { flex: 1; min-width: 0; }
.clip h4 { font-size: 19px; white-space: nowrap; }
.tile { position: relative; flex: none; width: 100px; height: 64px; border-radius: 12px; overflow: hidden; border: 0; padding: 0; background: none; }
.tile svg { width: 100%; height: 100%; }
.tile .play { position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; border-radius: 50%; background: rgba(10,37,64,.82); display: grid; place-items: center; }
.tile .len { position: absolute; right: 6px; bottom: 6px; background: rgba(10,37,64,.82); color: #fff; font-size: 11px; font-weight: 500; border-radius: 4px; padding: 1px 5px; }
.spin { width: 22px; height: 22px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; position: absolute; inset: 0; margin: auto; }
.spin.ink { position: static; border-color: var(--sand); border-top-color: var(--ink); margin: 10px 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.bin { flex: none; width: 36px; height: 40px; border: 0; background: none; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.bin:active { background: var(--sand); }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: #E0F5F3; color: #007A72; }
.row { display: flex; align-items: center; gap: 10px; margin-top: 3px; }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; }
.check i { flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; background: var(--field); display: grid; place-items: center; }

/* video screen */
.player { position: fixed; inset: 0; background: var(--ink); color: var(--ground); display: flex; flex-direction: column; padding-top: var(--top); z-index: 10; }
.player .top { padding: 12px 16px; }
.player .back { color: var(--ground); }
.player .back:active { background: rgba(255,255,255,.1); }
.player video { width: 100%; aspect-ratio: 16/9; max-height: calc(100dvh - 150px); background: #000; }
.player .note { padding: 18px 20px; font-size: 13px; opacity: .85; }
.player .error { margin: 18px 20px; background: var(--red); color: #fff; }

dialog { border: 0; border-radius: 22px; padding: 22px 22px 12px; max-width: min(420px, 90vw); background: var(--ground); color: var(--ink); }
dialog::backdrop { background: rgba(10,37,64,.45); }
dialog h2 { font-size: 26px; margin-bottom: 10px; }
.ask-buttons { display: flex; justify-content: flex-end; gap: 4px; margin-top: 16px; }

.install { display: flex; gap: 12px; align-items: flex-start; }
.install svg { flex: none; }
