/* Gerig (Divaskell app) : cahier d'écolier, encre bleue, gommettes ; mêmes polices et couleurs que Ger an deiz. */
@font-face{font-family:'Fredoka';font-weight:500;font-display:swap;src:url('../fonts/fredoka-500-B0JifZgm.woff2') format('woff2')}
@font-face{font-family:'Fredoka';font-weight:600;font-display:swap;src:url('../fonts/fredoka-600-C4zohCW5.woff2') format('woff2')}
@font-face{font-family:'Fredoka';font-weight:700;font-display:swap;src:url('../fonts/fredoka-700-BOIZVyIN.woff2') format('woff2')}
@font-face{font-family:'Roboto';font-weight:400;font-display:swap;src:url('../fonts/roboto-400-BqEyEoaF.woff2') format('woff2')}
@font-face{font-family:'Roboto';font-weight:500;font-display:swap;src:url('../fonts/roboto-500-7RbcRiD8.woff2') format('woff2')}
@font-face{font-family:'Roboto';font-weight:700;font-display:swap;src:url('../fonts/roboto-700-BZpUvMxY.woff2') format('woff2')}
:root{
  --paper:#FBFBF5; --line:#DCE4F2; --margin:#E8737A; --ink:#2B4C9B; --ink-strong:#1C3474; --text:#1F2A44; --muted:#5B6480;
  --card:#FFFFFF; --soft:#EEF3FD; --hl:#FFE98A; --shadow:#C9D6EC; --on-ink:#FFFFFF;
  --jaune:#FFD84D; --rose:#F5B5C2; --vert:#BFE6D2; --bleu:#BFD3F5; --picto:#1F2A44;
  --ok:#1B6E45; --ok-bg:#D9F2E4; --todo:#6B5600; --todo-bg:#FFF4C2; --err:#B3261E;
  --f-titre:'Fredoka','Trebuchet MS',sans-serif; --f-texte:'Roboto',Arial,sans-serif;
  color-scheme:light;
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){
  --paper:#151B2B; --line:#212A40; --margin:#B5545B; --ink:#9DB6F2; --ink-strong:#C3D3FA; --text:#E6EAF4; --muted:#A6AEC4;
  --card:#1D2539; --soft:#243052; --hl:#6B4F14; --shadow:#0C111D; --on-ink:#10172A;
  --jaune:#8A6516; --rose:#7A3B4A; --vert:#2E5E47; --bleu:#2F4775; --picto:#E6EAF4;
  --ok:#7FD6A6; --ok-bg:#1F3D2E; --todo:#F2DE8A; --todo-bg:#3D3517; --err:#FFB4AB; color-scheme:dark }}
:root[data-theme="dark"]{
  --paper:#151B2B; --line:#212A40; --margin:#B5545B; --ink:#9DB6F2; --ink-strong:#C3D3FA; --text:#E6EAF4; --muted:#A6AEC4;
  --card:#1D2539; --soft:#243052; --hl:#6B4F14; --shadow:#0C111D; --on-ink:#10172A;
  --jaune:#8A6516; --rose:#7A3B4A; --vert:#2E5E47; --bleu:#2F4775; --picto:#E6EAF4;
  --ok:#7FD6A6; --ok-bg:#1F3D2E; --todo:#F2DE8A; --todo-bg:#3D3517; --err:#FFB4AB; color-scheme:dark }
*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;height:100%}
body{background:var(--paper);color:var(--text);font-family:var(--f-texte);font-size:16px;line-height:1.4;-webkit-text-size-adjust:100%}
button{font:inherit;color:inherit;cursor:pointer}
a{color:var(--ink)}
:focus-visible{outline:3px solid var(--ink);outline-offset:2px}
[hidden]{display:none!important}
.app{max-width:460px;min-height:100%;margin:0 auto;display:flex;flex-direction:column;background:var(--paper);position:relative;
  background-image:repeating-linear-gradient(to bottom,transparent 0,transparent 31px,var(--line) 31px,var(--line) 32px)}
/* Marge rouge du cahier, comme dans le Studio son. */
.app::before{content:"";position:absolute;top:0;bottom:0;left:max(7px,env(safe-area-inset-left,0px));width:2px;background:var(--margin);opacity:.7;pointer-events:none;z-index:0}
.app > *{position:relative;z-index:1}
@media (min-width:720px){
  body{background:var(--soft);display:flex;align-items:center;justify-content:center;padding:24px}
  .app{min-height:0;height:min(900px,calc(100vh - 48px));width:430px;border:3px solid var(--ink);border-radius:40px;overflow:hidden;box-shadow:10px 10px 0 var(--shadow)}
}
.bandeau{background:var(--todo-bg);color:var(--todo);font-size:11px;text-align:center;padding:3px 12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:max(14px,env(safe-area-inset-top,0px)) 18px 6px}
.marque{display:flex;align-items:center;gap:10px;min-width:0}
.marque img{flex-shrink:0;width:46px;height:46px}
.marque>div{display:flex;flex-direction:column;min-width:0}
.marque b{font-family:var(--f-titre);font-weight:700;font-size:30px;color:var(--ink);line-height:1}
.marque span{font-size:14px;color:var(--muted);margin-top:4px}
.animal{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 12px 0 6px;border:2px solid var(--ink);border-radius:22px;background:var(--hl);font-family:var(--f-titre);font-weight:600}
.animal svg{width:34px;height:34px;color:var(--picto)}
.animal small{font-family:var(--f-texte);font-weight:500;font-size:13px;color:var(--muted)}
.jour{display:flex;align-items:center;justify-content:space-between;padding:2px 8px 8px}
.jour .fl{width:44px;height:44px;border:0;background:none;color:var(--ink);display:flex;align-items:center;justify-content:center}
.jour .fl[disabled]{opacity:.25;cursor:default}
.jour .t{text-align:center}
.jour .t b{display:block;font-family:var(--f-titre);font-weight:600;font-size:18px;color:var(--ink)}
.jour .t span{font-size:16px;color:var(--muted)}
main{flex:1 1 auto;overflow-y:auto;padding:0 16px 16px;display:flex;flex-direction:column;gap:12px}
.enfant{flex-shrink:0;background:var(--card);border:2px solid var(--ink);border-radius:28px;box-shadow:6px 6px 0 var(--shadow);padding:22px 16px 58px;
  display:flex;flex-direction:column;align-items:center;gap:14px;position:relative;min-height:340px;justify-content:center;text-align:center;touch-action:pan-y}
.enfant.simple{padding-bottom:22px;min-height:0}
.gom{width:150px;height:150px;border-radius:75px;display:flex;align-items:center;justify-content:center;color:var(--picto);flex-shrink:0}
.gom svg{width:96px;height:96px}
.gom .lettre{font-family:var(--f-titre);font-weight:700;font-size:72px;line-height:1}
.g-jaune{background:var(--jaune)}.g-rose{background:var(--rose)}.g-vert{background:var(--vert)}.g-bleu{background:var(--bleu)}.g-pale{background:var(--soft)}
.mot{font-family:var(--f-titre);font-weight:700;font-size:42px;line-height:1.05;color:var(--ink);margin:0;overflow-wrap:anywhere}
.phrase{font-family:var(--f-titre);font-weight:700;font-size:27px;line-height:1.2;color:var(--ink);margin:0}
.etiquette{font-size:14px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--todo);background:var(--todo-bg);padding:4px 10px;border-radius:10px}
.selaou{display:flex;align-items:center;gap:10px;min-height:56px;padding:0 24px;border:3px solid var(--ink);border-radius:28px;background:var(--jaune);
  font-family:var(--f-titre);font-weight:700;font-size:20px;box-shadow:4px 4px 0 var(--shadow);color:var(--text)}
.selaou.bientot{background:var(--soft);border-style:dashed;box-shadow:none;color:var(--ink);cursor:default}
.selaou small{font-family:var(--f-texte);font-weight:500;font-size:13px;color:var(--ink)}
.selaou.joue{box-shadow:0 0 0 5px var(--hl)}
.selaou svg{width:22px;height:22px}
.petit{font-size:15px;color:var(--muted);margin:-6px 0 0}
.nav-cartes{position:absolute;left:4px;right:4px;bottom:6px;display:flex;align-items:center;justify-content:center}
.nav-cartes .glisse{width:auto!important;min-height:44px;padding:0 14px;gap:6px;font-family:var(--f-titre);font-weight:600;font-size:15px;border-radius:22px}
.nav-cartes button{width:44px;height:44px;border:0;background:none;color:var(--ink);display:flex;align-items:center;justify-content:center}
.points{display:flex;gap:8px}
.points span{width:10px;height:10px;border-radius:5px;background:var(--line)}
.points span.actif{background:var(--ink)}
.parent{background:var(--soft);border-radius:22px;padding:14px 18px;display:flex;flex-direction:column;gap:6px}
.parent h2{margin:0;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.parent .l1{font-size:18px;font-weight:500;margin:0}
.parent p{margin:0;font-size:14px}
.parent .vide{color:var(--muted);font-style:italic}
.semaine-mots{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%}
.semaine-mots button{border:2px solid var(--ink);border-radius:20px;background:var(--card);padding:10px 8px;display:flex;flex-direction:column;align-items:center;gap:6px;min-height:120px}
.semaine-mots .gom{width:64px;height:64px;border-radius:32px}
.semaine-mots .gom svg{width:42px;height:42px}
.semaine-mots .gom .lettre{font-size:32px}
.semaine-mots b{font-family:var(--f-titre);font-weight:700;font-size:18px;color:var(--ink);overflow-wrap:anywhere}
.semaine-mots small{font-size:14px;color:var(--muted)}
.semaine-mots button[disabled]{cursor:default}
.semaine-mots button.cache b{filter:blur(6px)}
.semaine-mots button.joue{box-shadow:0 0 0 5px var(--hl)}
.grand-btn{min-height:52px;padding:0 26px;border:2px solid var(--ink);border-radius:26px;background:var(--ink);color:var(--on-ink);font-family:var(--f-titre);font-weight:600;font-size:18px}
.choix{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;width:100%}
.choix button{min-height:170px;border:2px solid var(--ink);border-radius:20px;background:var(--soft);display:flex;align-items:center;justify-content:center;color:var(--picto)}
.choix button svg{width:110px;height:110px}
.choix button .lettre{font-family:var(--f-titre);font-weight:700;font-size:64px}
.choix button.bon{border:4px solid var(--ok);background:var(--ok-bg)}
.choix button.faux{border:4px solid var(--err)}
.retour{min-height:24px;font-family:var(--f-titre);font-weight:600;font-size:20px;margin:0}
.retour.bon{color:var(--ok)} .retour.faux{color:var(--err)}
.fiche{width:100%;text-align:left}
.fiche h3{margin:0 0 4px;font-family:var(--f-titre);font-size:20px;color:var(--ink)}
.fiche ul{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-direction:column;gap:6px}
.fiche li{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;border-bottom:1px solid var(--line);padding-bottom:6px}
.fiche li .e{flex:0 0 28px;font-family:var(--f-titre);font-weight:700;color:var(--muted)}
.fiche li b{font-family:var(--f-titre);font-size:18px;color:var(--ink)}
.fiche li span{font-size:15px;color:var(--muted)}
nav.onglets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:2px solid var(--line);background:var(--card);padding-bottom:env(safe-area-inset-bottom,0px)}
nav.onglets button{min-height:62px;border:0;background:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:var(--muted);font-family:var(--f-titre);font-weight:600;font-size:16px}
nav.onglets button span{font-family:var(--f-texte);font-weight:400;font-size:14px}
nav.onglets button[aria-current="page"]{color:var(--ink);font-weight:700}
.niveaux{display:flex;flex-direction:column;gap:12px;width:100%}
.niveaux button{display:flex;align-items:center;gap:14px;min-height:84px;border:2px solid var(--ink);border-radius:22px;background:var(--card);padding:8px 16px;text-align:left}
.niveaux button svg{width:58px;height:58px;flex-shrink:0;color:var(--picto)}
.niveaux button > div{flex:1 1 auto}
.niveaux .ombre{width:34px;height:56px;color:var(--ink);opacity:.8}
.niveaux b{display:block;font-family:var(--f-titre);font-size:22px;color:var(--ink)}
.niveaux span{font-size:13px;color:var(--muted)}
.niveaux button[aria-pressed="true"]{background:var(--hl)}
.fin{font-family:var(--f-titre);font-weight:700;font-size:34px;color:var(--ink);margin:0}
.pied{font-size:12px;color:var(--muted);text-align:center;margin:4px 0 0}
.vide-etat{padding:40px 16px;text-align:center;color:var(--muted)}

/* Titre du thème touchable : bulle avec le nom breton (et son son). */
.theme-btn{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:2px 10px;border:0;border-radius:16px;background:none;color:var(--ink);cursor:pointer}
.theme-btn svg{width:24px;height:24px;flex-shrink:0}
.theme-btn:active{background:var(--soft)}
.bulle{position:relative;margin-top:-4px;padding:8px 18px;border:2px solid var(--ink);border-radius:18px;background:var(--jaune);font-family:var(--f-titre);font-weight:700;font-size:24px;color:var(--ink)}
.bulle::before{content:"";position:absolute;top:-9px;left:50%;width:14px;height:14px;margin-left:-7px;background:var(--jaune);border-left:2px solid var(--ink);border-top:2px solid var(--ink);transform:rotate(45deg)}
.bulle[hidden]{display:none}
.aide-ecoute{margin:0}
