/* Lumiko : style « album » (v2) : contours encre, ombres franches, sans flou ni dégradé.
   Chargé après base.css et activities.css. Toutes les couleurs passent par les jetons de base.css (thèmes clair et sombre). */
:root {
  --lk-line: 2.5px solid var(--outline);
  --lk-drop: 0 5px 0 var(--outline);
  --lk-drop-sm: 0 3px 0 var(--outline);
  --lk-press: 0 1px 0 var(--outline);
}

.screen { background: var(--sand); }
.wax { border-top: var(--lk-line); box-shadow: inset 0 5px 0 var(--sun); }

/* ---------- Composants communs ---------- */
.lk-bubble, .bubble {
  position: relative;
  margin: 0;
  background: var(--card);
  border: var(--lk-line);
  border-radius: 22px;
  box-shadow: var(--lk-drop-sm);
  font-family: var(--font-display);
  font-weight: 500;
  text-wrap: pretty;
}
.lk-bubble { padding: 12px 16px; font-size: calc(1.1rem * var(--scale)); line-height: 1.3; }
/* Pointe de bulle : un carré tourné qui reprend le contour */
.bubble::before { left: -11px; border-left: var(--lk-line); border-bottom: var(--lk-line); border-radius: 0 0 0 4px; }
.lk-bubble--down::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -11px;
  width: 18px;
  height: 18px;
  background: var(--card);
  border-right: var(--lk-line);
  border-bottom: var(--lk-line);
  transform: translateX(-50%) rotate(45deg);
}

.icon-btn { border: var(--lk-line); box-shadow: var(--lk-drop-sm); }
.icon-btn:active { box-shadow: var(--lk-press); }
.pill { border: var(--lk-line); box-shadow: var(--lk-drop); }
.pill:active { box-shadow: var(--lk-press); }
.pill:not(.alt) svg { stroke: var(--on-sun); } /* icône lisible sur le jaune dans les deux thèmes */
.tile, .card, .panel { border: var(--lk-line); box-shadow: var(--lk-drop); }
.tile:active, button.card:active { transform: translateY(3px); box-shadow: var(--lk-press); }
.card[disabled] { border-style: dashed; box-shadow: none; }
.level-btn { border: var(--lk-line); box-shadow: var(--lk-drop-sm); }
.level-btn:active { box-shadow: var(--lk-press); }
.level-btn.rec { background: var(--sun); color: var(--on-sun); }
.level-btn.rec small { color: var(--on-sun); }
.level-btn.rec .rec-chip { background: var(--card); color: var(--ink); }
.level-btn.done { border-color: var(--outline); box-shadow: 0 3px 0 var(--leaf); }
.text-btn { border: var(--lk-line); box-shadow: var(--lk-drop-sm); }
.text-btn.confirm { border-color: var(--red); }
.stat { background: var(--card); border: var(--lk-line); }
.seg { background: var(--card); border: var(--lk-line); border-radius: 24px; }
.seg input:checked + label { background: var(--ink); color: var(--sand); box-shadow: none; }
.switch { border: var(--lk-line); }
.switch::after { top: 2px; left: 2px; box-shadow: none; border: var(--lk-line); box-sizing: border-box; }
.switch:checked::after { transform: translateX(22px); }
.setting { border-top: 2px dashed var(--line); }

/* Réponses des jeux : tuiles « gommettes » */
.num, .pick, .letter-card, .tile-l, .story-choice, .animal, .chooser button, .tool {
  border: var(--lk-line);
  box-shadow: 0 4px 0 var(--outline);
}
.num:active, .pick:active, .tile-l:active, .story-choice:active, .chooser button:active, .tool:active { box-shadow: var(--lk-press); }
.board, .coloring, .story-art, .story-text, .seq, .model { border: var(--lk-line); box-shadow: var(--lk-drop); }

/* ---------- Accueil ---------- */
.home-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.parents-pill {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: var(--lk-line);
  border-radius: 999px;
  background: var(--mint);
  box-shadow: var(--lk-drop-sm);
  font-weight: 800;
  -webkit-touch-callout: none;
}
.parents-pill svg { width: 22px; height: 22px; }
.parents-pill.hold::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 5px;
  width: calc(var(--p) * 100%);
  background: var(--leaf);
}
.scene {
  position: relative;
  overflow: hidden;
  height: calc(300px * var(--scale));
  max-height: 46vh;
  min-height: 220px;
  border: var(--lk-line);
  border-radius: 28px;
  background: var(--blue-soft);
  box-shadow: var(--lk-drop);
}
.scene-sun { position: absolute; top: 22px; right: 26px; width: 58px; height: 58px; border-radius: 50%; background: var(--sun); border: var(--lk-line); }
.scene-hill { position: absolute; left: -12%; right: -12%; bottom: -55%; height: 80%; border-radius: 50%; background: var(--leaf); border-top: var(--lk-line); }
.scene-bubble { position: absolute; top: 20px; left: 18px; max-width: 58%; z-index: 2; }
#lumi-hello { position: absolute; left: 0; right: 0; bottom: 10px; height: 76%; border: 0; background: none; padding: 0; }
#lumi-hello .lumi-wrap { width: 100%; height: 100%; }
.tile-play { flex-direction: row; align-items: center; justify-content: flex-start; min-height: calc(110px * var(--scale)); gap: 16px; }
.tile-play > span:not(.play-go) { flex: 1; }
.tile-play strong { font-size: calc(1.9rem * var(--scale)); }
.tile-play small { color: var(--on-sun); }
.play-go { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border: var(--lk-line); border-radius: 50%; background: var(--card); }
.play-go svg { width: 24px; height: 24px; }
.tile-row { flex-direction: row; align-items: center; justify-content: flex-start; min-height: calc(76px * var(--scale)); gap: 12px; padding: 12px 16px; }
.tile-row svg { width: calc(38px * var(--scale)); height: calc(38px * var(--scale)); flex: none; }
.tile-row strong { font-size: calc(1.2rem * var(--scale)); }

/* ---------- Réglages : ami de jeu ---------- */
.setting-kid { justify-content: flex-start; }
.kid-mini { width: 34px; height: 56px; }
.setting-kid .seg { margin-left: auto; }

/* ---------- Ouverture (premier lancement) ---------- */
.onboarding {
  position: absolute;
  inset: 0;
  z-index: 30;
  overflow-y: auto;
  background: var(--sand);
  padding: 0 max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px));
}
.onb-step { width: 100%; max-width: 520px; min-height: 100%; margin-inline: auto; box-sizing: border-box; display: flex; flex-direction: column; gap: 18px; padding-block: 24px; animation: screen-in .35s ease-out; }
.onb-mark { margin: 0; font-size: 1.9rem; }
.onb-title { font-size: clamp(2rem, 9vw, 2.6rem); line-height: 1.05; }
.onb-title--small { font-size: clamp(1.7rem, 7vw, 2.1rem); }
.onb-note { margin: 0; font-size: .95rem; font-weight: 700; line-height: 1.45; color: var(--ink-soft); }
.onb-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.onb-kid {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 0 16px;
  border: var(--lk-line);
  border-radius: 28px;
  background: var(--kid);
  box-shadow: var(--lk-drop);
}
.onb-kid::before { content: ""; position: absolute; left: -20%; right: -20%; bottom: -40px; height: 120px; border-radius: 50%; background: var(--card); border-top: var(--lk-line); }
.onb-kid:active { transform: translateY(3px); box-shadow: var(--lk-press); }
.onb-kid b { position: relative; font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; }
.onb-slot { position: relative; width: 120px; height: min(210px, 32vh); }
.onb-top { display: flex; align-items: center; justify-content: space-between; }
.onb-skip { border: 0; background: none; font-weight: 800; text-decoration: underline; padding: 8px; }
.onb-hello { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.onb-hello .lk-bubble { max-width: 280px; text-align: center; font-size: 1.35rem; padding: 16px 22px; }
.onb-big { width: 220px; height: min(300px, 42vh); border: 0; background: none; padding: 0; }
.onb-go { justify-content: center; width: 100%; }
.onb-tag { align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: var(--ink); color: var(--sand); font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.onb-ages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.onb-age { padding: 16px 0; border: var(--lk-line); border-radius: 22px; background: var(--card); box-shadow: 0 4px 0 var(--outline); }
.onb-age[aria-checked="true"] { background: var(--sun); color: var(--on-sun); }
.onb-age b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 2.2rem; line-height: 1; }
.onb-age small { font-weight: 800; }
.onb-private { margin-top: auto; }
