/* Polices servies par le site (pas d'appel à Google Fonts) : sous-ensembles latins, et cyrillique pour Caveat. *//* public-sans-latin-400-normal */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./public-sans-latin-400-normal-8Rpg0ruU.woff2) format('woff2'), url(./public-sans-latin-400-normal-SBbinRkI.woff) format('woff');
}
/* public-sans-latin-500-normal */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(./public-sans-latin-500-normal-NlrCPXnF.woff2) format('woff2'), url(./public-sans-latin-500-normal-vCxiVFAq.woff) format('woff');
}
/* public-sans-latin-600-normal */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(./public-sans-latin-600-normal-Fru-LXNs.woff2) format('woff2'), url(./public-sans-latin-600-normal-BR59oU-I.woff) format('woff');
}
/* public-sans-latin-700-normal */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(./public-sans-latin-700-normal-BqJmxWdE.woff2) format('woff2'), url(./public-sans-latin-700-normal-Dm-oTPSL.woff) format('woff');
}
/* public-sans-latin-400-italic */
@font-face {
  font-family: 'Public Sans';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url(./public-sans-latin-400-italic-B1appi_f.woff2) format('woff2'), url(./public-sans-latin-400-italic-DsCWG5h0.woff) format('woff');
}
/* public-sans-latin-ext-400-normal */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./public-sans-latin-ext-400-normal-mk90oQqJ.woff2) format('woff2'), url(./public-sans-latin-ext-400-normal-B02wwOdZ.woff) format('woff');
}
/* public-sans-latin-ext-500-normal */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(./public-sans-latin-ext-500-normal-DC-z7ASZ.woff2) format('woff2'), url(./public-sans-latin-ext-500-normal-BHCCp-na.woff) format('woff');
}
/* public-sans-latin-ext-600-normal */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(./public-sans-latin-ext-600-normal-DchWdWJ_.woff2) format('woff2'), url(./public-sans-latin-ext-600-normal-DfkbVac2.woff) format('woff');
}
/* public-sans-latin-ext-700-normal */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(./public-sans-latin-ext-700-normal-CgolUQuG.woff2) format('woff2'), url(./public-sans-latin-ext-700-normal-jWHjnMgZ.woff) format('woff');
}
/* public-sans-latin-ext-400-italic */
@font-face {
  font-family: 'Public Sans';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url(./public-sans-latin-ext-400-italic-CNGQRUpp.woff2) format('woff2'), url(./public-sans-latin-ext-400-italic-BqkXX9t-.woff) format('woff');
}
/* kalam-latin-400-normal */
@font-face {
  font-family: 'Kalam';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./kalam-latin-400-normal-BthBl_aR.woff2) format('woff2'), url(./kalam-latin-400-normal-Bl-H2BUA.woff) format('woff');
}
/* kalam-latin-700-normal */
@font-face {
  font-family: 'Kalam';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(./kalam-latin-700-normal-D2H-9ISU.woff2) format('woff2'), url(./kalam-latin-700-normal-7TSuSrjP.woff) format('woff');
}
/* kalam-latin-ext-400-normal */
@font-face {
  font-family: 'Kalam';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./kalam-latin-ext-400-normal-DtcdGa4L.woff2) format('woff2'), url(./kalam-latin-ext-400-normal-AcQmRO9z.woff) format('woff');
}
/* kalam-latin-ext-700-normal */
@font-face {
  font-family: 'Kalam';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(./kalam-latin-ext-700-normal-CwgfRD_T.woff2) format('woff2'), url(./kalam-latin-ext-700-normal-BA-KJHgr.woff) format('woff');
}
/* caveat-latin-400-normal */
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./caveat-latin-400-normal-D6LQsQ_v.woff2) format('woff2'), url(./caveat-latin-400-normal-BzhAQZkN.woff) format('woff');
}
/* caveat-latin-700-normal */
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(./caveat-latin-700-normal-D8_1Nw6V.woff2) format('woff2'), url(./caveat-latin-700-normal-cPyBTTZN.woff) format('woff');
}
/* caveat-latin-ext-400-normal */
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./caveat-latin-ext-400-normal-D7hBUiug.woff2) format('woff2'), url(./caveat-latin-ext-400-normal-DtiRFvw0.woff) format('woff');
}
/* caveat-latin-ext-700-normal */
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(./caveat-latin-ext-700-normal-DFbRgDry.woff2) format('woff2'), url(./caveat-latin-ext-700-normal-DjJQd59I.woff) format('woff');
}
/* caveat-cyrillic-400-normal */
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./caveat-cyrillic-400-normal-9cDH9rLW.woff2) format('woff2'), url(./caveat-cyrillic-400-normal-CebvvJET.woff) format('woff');
}
/* caveat-cyrillic-700-normal */
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(./caveat-cyrillic-700-normal-BIyejhEL.woff2) format('woff2'), url(./caveat-cyrillic-700-normal-Bhcx9qBB.woff) format('woff');
}
/* caveat-cyrillic-ext-400-normal */
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./caveat-cyrillic-ext-400-normal-3iEGd-c5.woff2) format('woff2'), url(./caveat-cyrillic-ext-400-normal-Cg0RnRQ5.woff) format('woff');
}
/* caveat-cyrillic-ext-700-normal */
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(./caveat-cyrillic-ext-700-normal-CrK2-ngJ.woff2) format('woff2'), url(./caveat-cyrillic-ext-700-normal-DjFGiEhD.woff) format('woff');
}
/* Direction « Carnet de terrain » : papier quadrillé, fiches collées au ruban, encre vert sapin,
   crayon rouge pour les erreurs et les dangers. Coque d'application mobile (480 px max, centrée),
   barre d'onglets fixe, panneau qui monte du bas. Variante « carnet de nuit » en mode sombre. */
:root {
  --paper: #EEF1EA;         /* page quadrillée */
  --grid: #DCE2D6;
  --desk: #E2E7DD;          /* autour de la coque, grand écran */
  --card: #FBFCF9;          /* fiche */
  --frame: #FFFFFF;         /* cadre des photos */
  --ink: #1F4A36;           /* encre vert sapin */
  --on-ink: #FFFFFF;
  --ink-soft: #E2EDE4;
  --text: #1C2620;
  --muted: #4A5A4F;
  --mid: #8FA897;
  --line: #C9D1C4;          /* traits décoratifs */
  --outline: #6F7F74;       /* contours de composants, 3:1 minimum */
  --track: #D3DACE;
  --red: #B3261E;           /* crayon rouge */
  --on-red: #FFFFFF;
  --red-soft: #FBEAE8;
  --ok-chip-bg: #DCEBD9; --ok-chip: #245C2E; --ok-chip-line: transparent;
  --meter: #DCE2D6;         /* fond des jauges du relevé et de l'herbier */
  --tape: rgba(190, 204, 180, .78);
  --focus: #8A5A00;
  --shadow: 0 2px 4px rgb(28 38 32 / .14);
  --shadow-photo: 0 3px 6px rgb(28 38 32 / .18);
  --scrim: rgb(20 28 23 / .45);
  --ui: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --hand: "Kalam", "Caveat", "Segoe Print", "Bradley Hand", "Chalkboard SE", "Comic Sans MS", cursive;
  --tab-h: 62px;
  --shadow-up: 0 -2px 10px rgb(28 38 32 / .10);
  --same-bg: #F4E7B8; --same: #6A5100;   /* champignon du jour : essai de la même famille */
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #141A16; --grid: #1F2822; --desk: #0E1310; --card: #1C241F; --frame: #232D27;
  --ink: #A8D5B8; --on-ink: #10201A; --ink-soft: #22352A; --text: #E4EAE3; --muted: #A9B5AC; --mid: #5F8A6F;
  --line: #33403A; --outline: #788A7E; --track: #2C3831; --red: #F28B82; --on-red: #1A0F0E; --red-soft: #3A2220;
  --ok-chip-bg: #24402F; --ok-chip: #A8D5B8; --ok-chip-line: #6F9E80; --meter: #2C3831; --tape: rgba(150, 185, 160, .3); --focus: #E2AD4C;
  --shadow: 0 2px 6px rgb(0 0 0 / .45); --shadow-photo: 0 3px 10px rgb(0 0 0 / .5); --scrim: rgb(0 0 0 / .6); --shadow-up: 0 -2px 12px rgb(0 0 0 / .5); --same-bg: #3D3417; --same: #E9D28C;
  color-scheme: dark } }
:root[data-theme="dark"] {
  --paper: #141A16; --grid: #1F2822; --desk: #0E1310; --card: #1C241F; --frame: #232D27;
  --ink: #A8D5B8; --on-ink: #10201A; --ink-soft: #22352A; --text: #E4EAE3; --muted: #A9B5AC; --mid: #5F8A6F;
  --line: #33403A; --outline: #788A7E; --track: #2C3831; --red: #F28B82; --on-red: #1A0F0E; --red-soft: #3A2220;
  --ok-chip-bg: #24402F; --ok-chip: #A8D5B8; --ok-chip-line: #6F9E80; --meter: #2C3831; --tape: rgba(150, 185, 160, .3); --focus: #E2AD4C;
  --shadow: 0 2px 6px rgb(0 0 0 / .45); --shadow-photo: 0 3px 10px rgb(0 0 0 / .5); --scrim: rgb(0 0 0 / .6); --shadow-up: 0 -2px 12px rgb(0 0 0 / .5); --same-bg: #3D3417; --same: #E9D28C;
  color-scheme: dark }
:root[data-theme="light"] { color-scheme: light; }

html, body { height: 100%; }
[hidden] { display: none !important; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--desk); color: var(--text); font: 16px/1.45 var(--ui); -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; border: 0; background: none; padding: 0; text-align: inherit; }
button:focus-visible, a:focus-visible, [tabindex="0"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* Titres et zones qui reçoivent le focus par le code (annonce aux lecteurs d'écran) : pas de cadre, ce ne sont pas des commandes */
[tabindex="-1"]:focus { outline: none; }
h1, h2, h3 { margin: 0; line-height: 1.15; text-wrap: balance; }
p { margin: 0; }
a { color: var(--ink); text-underline-offset: 2px; }
.sci { font-style: italic; color: var(--muted); }
.hand { font-family: var(--hand); font-weight: 400; }
.label { font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.note { font-size: .875rem; color: var(--muted); }
svg.i { width: 1em; height: 1em; flex: none; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
body.sheet-open { overflow: hidden; }

/* Coque */
.shell { position: relative; max-width: 480px; min-height: 100%; margin: 0 auto; display: flex; flex-direction: column; overflow-x: clip;
  background-color: var(--paper); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 22px 22px; }
@media (min-width: 560px) { .shell { box-shadow: 0 0 0 1px var(--line), 0 10px 40px rgb(0 0 0 / .08); } }
.view { flex: 1; display: flex; flex-direction: column; }
.pad { padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.with-tabs { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 28px); }

/* Papier, ruban, tampons */
.paper { position: relative; background: var(--card); border-radius: 4px; box-shadow: var(--shadow); }
.tape { position: absolute; top: -10px; left: 50%; width: 74px; height: 20px; margin-left: -37px; background: var(--tape); transform: rotate(3deg); pointer-events: none; }
.tilt-l { transform: rotate(-.6deg); }
.tilt-r { transform: rotate(.5deg); }
.stamp { position: absolute; top: -12px; right: 12px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 3px; padding: 0 8px;
  transform: rotate(4deg); font-size: .6875rem; font-weight: 700; letter-spacing: .14em; line-height: 1.7; color: var(--ink); white-space: nowrap; }
.stamp.red { color: var(--red); border-color: var(--red); }

/* Boutons */
.btn { width: 100%; min-height: 48px; padding: 0 16px; border-radius: 6px; background: var(--ink); color: var(--on-ink); font-size: 1rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translate(1px, 1px); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn.danger { background: var(--red); color: var(--on-red); }
.btns { display: flex; flex-direction: column; gap: 10px; }
.fine { font-size: .75rem; color: var(--muted); text-align: center; }
.linkbtn { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; font-size: .875rem; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; align-self: flex-start; text-align: left; }
.linkbtn.danger { color: var(--red); }

/* Badges de comestibilité : texte + pictogramme + style propre à chaque classe */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px 1px 7px; border-radius: 12px; border: 1.5px solid transparent;
  font-size: .75rem; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.badge svg { width: 13px; height: 13px; stroke-width: 2.4; }
.badge.comestible { background: var(--ok-chip-bg); color: var(--ok-chip); border-color: var(--ok-chip-line); }
.badge.non-comestible { background: transparent; color: var(--muted); border: 1.5px dashed var(--outline); }
.badge.toxique { background: var(--card); color: var(--red); border-color: var(--red); }
.badge.mortel { background: var(--red); color: var(--on-red); border-color: var(--red); }

/* Avertissement au crayon rouge */
.warn { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-left: 3px solid var(--red); background: var(--card); font-size: .8125rem; line-height: 1.4; }
.warn svg { width: 18px; height: 18px; color: var(--red); flex: none; margin-top: 1px; }
.warn strong { display: block; }
.warn.big { font-size: .9375rem; padding: 14px; box-shadow: var(--shadow); }
.warn.big svg { width: 22px; height: 22px; }

/* Barre d'onglets : carte claire aux coins hauts arrondis, ombre vers le haut ; pictogramme dans une pastille, libellé dessous */
.tabbar { position: fixed; z-index: 20; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px;
  background: var(--card); border-radius: 18px 18px 0 0; box-shadow: var(--shadow-up); display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 0 max(8px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(8px, env(safe-area-inset-left, 0px)); }
.tab { height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .75rem; font-weight: 600; line-height: 1.2; color: var(--muted); text-align: center; }
.tpill { width: 52px; height: 28px; border-radius: 14px; display: grid; place-items: center; }
.tab svg { width: 18px; height: 18px; stroke-width: 2; }
.tab[aria-current="page"] { color: var(--ink); font-weight: 700; }
.tab[aria-current="page"] .tpill { background: var(--ink-soft); }
.tab[aria-current="page"] svg { stroke-width: 2.2; }

/* Accueil */
.home { display: flex; flex-direction: column; gap: 18px; }
.mast { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: calc(env(safe-area-inset-top, 0px) + 32px); }
.mast .hand { font-size: 1rem; line-height: 1.25; color: var(--muted); }
.mast h1 { font-size: 2rem; line-height: 1.12; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.mast .sub { font-size: .875rem; color: var(--muted); }
.seal { flex: none; width: 58px; height: 58px; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center; transform: rotate(-8deg); color: var(--ink); }
.seal svg { width: 30px; height: 30px; stroke-width: 1.6; }
.releve { padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.releve .tape { left: 46%; }
.rhead { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; }
.rhead h2 { font-size: .8125rem; }
.rhead span { font-size: .8125rem; color: var(--muted); }
.nums { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.nums p { display: flex; align-items: baseline; gap: 6px; font-size: .875rem; }
.num { font: 700 2.375rem/1.05 var(--hand); color: var(--ink); font-variant-numeric: tabular-nums; }
.meter { height: 8px; border-radius: 4px; background: var(--meter); display: flex; overflow: hidden; }
.meter.big { height: 10px; border-radius: 5px; border: 1px solid var(--line); }
.meter i { display: block; height: 100%; }
.meter .m { background: var(--ink); } .meter .s { background: var(--mid); }

.shead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-bottom: 10px; }
.shead h2 { font-size: 1.125rem; font-weight: 700; }
.shead .hand { font-size: .95rem; color: var(--muted); }
.trail { list-style: none; margin: 0; padding: 0; }
.step { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; }
.rail { display: flex; flex-direction: column; align-items: center; }
.rail::after { content: ""; flex: 1; min-height: 14px; border-left: 2px dashed var(--outline); }
.step.done .rail::after { border-left-color: var(--ink); }
.step:last-child .rail::after, .step.soon .rail::after { display: none; }
.node { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; }
.node svg { width: 20px; height: 20px; stroke-width: 2.4; }
.step.done .node { background: var(--ink); color: var(--on-ink); }
.step.open .node { background: var(--card); border: 2px solid var(--ink); color: var(--ink); font: 700 1.25rem/1 var(--hand); }
.step.locked .node, .step.soon .node { width: 34px; height: 34px; margin: 3px 0; border: 1.5px dashed var(--outline); color: var(--muted); }
.step.locked .node svg, .step.soon .node svg { width: 15px; height: 15px; stroke-width: 2; }
.stepbody { min-width: 0; padding-bottom: 14px; }
.step.open .stepbody { padding-bottom: 18px; padding-top: 4px; }
.step:last-child .stepbody, .step.soon .stepbody { padding-bottom: 0; }
.step.soon + .step.soon { margin-top: 4px; }
.txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sname { font-size: 1rem; font-weight: 700; line-height: 1.25; }
.sdesc { font-size: .8125rem; color: var(--muted); line-height: 1.35; }
.donebtn { width: 100%; min-height: 44px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; border-radius: 4px; padding-top: 2px; }
.donebtn .again { font: 400 .95rem/1.3 var(--hand); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; padding-top: 2px; }
.score { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.stars { display: inline-flex; gap: 2px; color: var(--ink); }
.stars svg { width: 16px; height: 16px; }
.hscore { font: 700 1rem/1.2 var(--hand); color: var(--ink); white-space: nowrap; }
.opencard { position: relative; background: var(--card); border: 1.5px solid var(--ink); border-radius: 6px; padding: 14px; margin-right: 3px;
  display: flex; flex-direction: column; gap: 10px; box-shadow: 3px 3px 0 var(--ink); }
.opencard .sname { font-size: 1.0625rem; padding-right: 64px; }
.opencard .hnote { font: 400 .95rem/1.3 var(--hand); color: var(--ink); padding-top: 2px; }
.srow { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 40px; }
.srow .sname { font-size: .9375rem; font-weight: 600; color: var(--muted); }
.srow .hand { flex: none; font-size: .95rem; line-height: 1.2; color: var(--muted); text-align: right; max-width: 45%; }

/* Jeu : l'écran de question tient dans la hauteur visible, sans défilement (100dvh, repli svh puis vh).
   De haut en bas : barre de jeu, photo qui prend la place restante, ligne de la question (avec la loupe de l'indice),
   réponses calées en bas, sous le pouce. L'indice s'ouvre sous la question : la photo rétrécit, les réponses ne bougent pas. */
body.ingame::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
body.ingame .shell { min-height: 0; }
.game { min-height: 100vh; min-height: 100svh; min-height: 100dvh; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); }
.gbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; flex: none; display: flex; align-items: center; gap: 10px; padding-block: 8px 6px;
  background: var(--paper); background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.iconbtn { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--outline); background: var(--card); display: grid; place-items: center; color: var(--text); }
.iconbtn svg { width: 18px; height: 18px; stroke-width: 2.2; }
.iconbtn:active { background: var(--ink-soft); }
.gprog { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.gprog .row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.gprog .tier { font-size: .8125rem; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.qnum { flex: none; font: 700 1rem/1 var(--hand); color: var(--ink); white-space: nowrap; }
.bar { height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink); }
.lives { flex: none; display: flex; gap: 2px; padding-left: 4px; }
.life { width: 20px; height: 20px; overflow: visible; }
.life .h { fill: var(--ink); stroke: var(--ink); }
.life .x { stroke: var(--red); display: none; }
.life.lost .h { fill: none; stroke: var(--outline); }
.life.lost .x { display: inline; }
.life.pop { animation: pop .45s ease; }
@keyframes pop { 40% { transform: scale(1.35) rotate(-12deg); } }

.gbody { flex: 1 1 auto; display: flex; flex-direction: column; gap: 12px; padding-top: 14px; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 14px); }
.qhead { flex: 1 1 auto; display: flex; flex-direction: column; gap: 12px; }
/* Polaroïd : grandit dans la place restante (photo de 200 px au moins, 380 px au plus), l'espace en trop passe au-dessus */
.polaroid { --pb: 30px; position: relative; margin: 0; align-self: center; width: min(100% - 8px, 340px); background: var(--frame); padding: 9px 9px var(--pb);
  box-shadow: var(--shadow-photo); transform: rotate(-1.8deg); }
.qhead .polaroid { flex: 1 1 auto; display: flex; flex-direction: column; margin-top: auto; max-height: calc(380px + 9px + var(--pb)); }
.polaroid .tape { top: -12px; left: 18px; margin: 0; width: 70px; height: 22px; transform: rotate(-10deg); z-index: 1; }
.polaroid .tape + .tape { left: auto; right: 14px; width: 62px; transform: rotate(8deg); }
.ph { position: relative; display: block; width: 100%; overflow: hidden; background: var(--line); height: clamp(170px, 30vh, 250px); }
.qhead .ph { flex: 1 1 auto; height: auto; min-height: 200px; }
.gbody.hint-on:not(.answered) .qhead .ph { min-height: 96px; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; animation: fadein .35s ease; }
.qhead .ph img { position: absolute; inset: 0; }
button.ph { cursor: zoom-in; }
button.ph:focus-visible { outline-offset: 3px; }
@keyframes fadein { from { opacity: 0; } }
/* Crédit de la photo : lisible en entier, sur deux lignes en bas de la photo quand il est long */
.credit { position: absolute; right: 6px; bottom: 6px; max-width: calc(100% - 12px); background: rgb(20 28 23 / .76); color: #fff; font-size: .6875rem; line-height: 1.5;
  padding: 1px 6px; border-radius: 3px; text-align: right; overflow-wrap: anywhere; }
.caption { position: absolute; left: 14px; right: 14px; bottom: 3px; font: 400 .95rem/1.5 var(--hand); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gq { flex: none; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.qrow { display: flex; align-items: center; gap: 10px; }
.prompt { flex: 1; min-width: 0; font-size: 1.375rem; line-height: 1.27; font-weight: 700; }
.prompt .target { color: var(--ink); }
.pcredit { display: none; font-size: .6875rem; color: var(--muted); }
.hint { padding: 8px 12px; border-left: 3px solid var(--ink); background: var(--card); font-size: .9375rem; line-height: 1.4; }
.hint .hand { color: var(--ink); font-size: 1rem; line-height: 1.2; }
/* Loupe de l'indice, au bout de la ligne de la question ; une fois l'indice montré, elle reste enfoncée */
.hintbtn { flex: none; width: 44px; height: 44px; border: 1.5px dashed var(--ink); border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: transparent; }
.hintbtn svg { width: 20px; height: 20px; stroke-width: 2.2; }
.hintbtn:active { background: var(--ink-soft); }
.hintbtn[aria-expanded="true"] { border-style: solid; background: var(--ink-soft); cursor: default; }

.answers { flex: none; display: flex; flex-direction: column; gap: 8px; }
.answers.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ans { position: relative; width: 100%; min-width: 0; min-height: 54px; padding: 6px 12px; border: 1.5px solid var(--outline); border-radius: 6px; background: var(--card);
  display: flex; align-items: center; gap: 12px; text-align: left; transition: background-color .15s, border-color .15s; }
.ans:active:not(:disabled) { transform: translate(1px, 1px); }
.ans .k { flex: none; width: 18px; font: 700 1.25rem/1 var(--hand); color: var(--ink); }
.ans .lab { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ans .nm { font-size: 1rem; font-weight: 700; line-height: 1.25; color: var(--text); }
.ans .ds { font-size: .8125rem; line-height: 1.3; color: var(--muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.ans .mark { flex: none; width: 22px; height: 22px; }
.ans span.mark:empty { display: none; }
.ans svg.mark { stroke-width: 2.6; }
.ans.big { min-height: 72px; }
.ans.big .nm { font-size: 1.125rem; }
.ans.big { padding-right: 36px; }
.ans.big span.mark { display: none; }
.ans.big svg.mark { position: absolute; right: 8px; top: 50%; margin-top: -11px; }
.ans.big .why { align-self: flex-start; font-size: .875rem; }
.ans:disabled { cursor: default; }
.ans.right { border: 2px solid var(--ink); background: var(--ink-soft); padding-top: 5.5px; padding-bottom: 5.5px; padding-left: 11.5px; }
.ans.right .nm, .ans.right .mark { color: var(--ink); }
.ans.wrong { border-color: var(--red); }
.ans.wrong .k { color: var(--red); }
/* Trait de crayon rouge légèrement penché qui déborde du nom, comme dans la maquette */
.ans.wrong .nm { position: relative; align-self: flex-start; font-weight: 600; }
.ans.wrong .nm::after { content: ""; position: absolute; left: -4px; right: -6px; top: 50%; height: 2px; margin-top: -1px; background: var(--red); transform: rotate(-4deg); }
.ans .why { flex: none; font: 400 .95rem/1.2 var(--hand); color: var(--red); transform: rotate(-2deg); }
.ans.dim { border-color: var(--line); }
.ans.dim .k, .ans.dim .nm { color: var(--muted); }
.ans.dim .nm { font-weight: 600; }

.namecard { flex: none; margin-top: 0; padding: 18px 16px 16px; display: flex; flex-direction: column; gap: 4px; transform: rotate(-.6deg); }
.namecard .hand { font-size: 1rem; color: var(--muted); }
.namecard .big { font-size: 1.75rem; line-height: 1.15; font-weight: 700; color: var(--ink); }
/* Les quatre photos-réponses remplissent la place restante : la largeur d'une case suit la hauteur disponible */
.pwrap { flex: 1 1 0; min-height: 300px; container-type: size; display: flex; flex-direction: column; justify-content: flex-end; }
.photos { --w: max(64px, min((100cqw - 12px) / 2, (100cqh - 64px) / 2)); display: grid; grid-template-columns: repeat(2, var(--w)); justify-content: center; gap: 14px 12px; }
.pans { position: relative; min-width: 0; display: flex; flex-direction: column; background: var(--frame); padding: 5px 5px 0; border: 2px solid transparent; box-shadow: var(--shadow-photo); text-align: left; }
.pans:active:not(:disabled) { translate: 1px 1px; }
.pans .pimg { display: block; aspect-ratio: 1; overflow: hidden; background: var(--line); }
.pans img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pans .pcap { display: flex; align-items: baseline; gap: 6px; min-height: 30px; padding: 4px 3px 5px; font: 400 .95rem/1.2 var(--hand); color: var(--muted); }
.pans .k { flex: none; font: 700 1.1rem/1 var(--hand); color: var(--ink); }
.pans .pn { min-width: 0; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
.pans span.mark { display: none; }
.pans svg.mark { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; padding: 5px; border-radius: 50%; border: 2px solid currentColor; background: var(--card); transform: rotate(-12deg); stroke-width: 3; }
.pans:disabled { cursor: default; }
.pans.right { border-color: var(--ink); }
.pans.right .pcap { color: var(--ink); font-weight: 700; }
.pans.right svg.mark { color: var(--ink); }
.pans.wrong { border-color: var(--red); }
.pans.wrong .pcap, .pans.wrong .k, .pans.wrong svg.mark { color: var(--red); }
.pans.dim { box-shadow: none; }
.pans.dim .pimg { opacity: .55; }

.shake { animation: shake .32s ease; }
@keyframes shake { 0%, 100% { transform: none } 25% { transform: translateX(-7px) } 75% { transform: translateX(7px) } }

/* Une fois la réponse donnée, la question se resserre (petite photo à côté de la question, qu'on peut toujours agrandir)
   pour laisser voir les réponses au-dessus du panneau ; la loupe disparaît, l'indice déjà ouvert reste. */
@media (orientation: portrait), (min-height: 501px) {
  .gbody.answered { gap: 10px; padding-top: 10px; }
  /* Grille : petite photo | question et crédit ; l'indice ouvert passe dessous, sur toute la largeur */
  .gbody.answered .qhead { flex: none; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; row-gap: 4px; align-items: center; }
  .gbody.answered .gq { display: contents; }
  .gbody.answered .polaroid { grid-row: 1 / span 2; flex: none; width: 96px; max-height: none; margin: 4px 0 0 2px; padding: 5px 5px 12px; transform: rotate(-3deg); }
  .gbody.answered .qrow { grid-column: 2; align-self: end; }
  .gbody.answered .pcredit { grid-column: 2; align-self: start; }
  .gbody.answered .hint { display: none; }
  .gbody.answered .ph { flex: none; height: 72px; min-height: 0; }
  .gbody.answered .polaroid .tape { width: 44px; height: 16px; top: -8px; left: 22px; transform: rotate(-6deg); }
  .gbody.answered .polaroid .tape + .tape, .gbody.answered .credit, .gbody.answered .caption,
  .gbody.answered .ds, .gbody.answered .hintbtn { display: none; }
  .gbody.answered .answers { gap: 6px; }
  .gbody.answered .ans .nm { font-size: .9375rem; }
  .gbody.answered .ans.big .nm { font-size: 1.0625rem; }
  .gbody.answered .prompt { font-size: 1.125rem; }
  .gbody.answered .pcredit { display: block; }
  .gbody.answered .ans:not(.big) { min-height: 44px; }
  .gbody.answered .ans.big { min-height: 52px; }
  /* Photos-réponses : carte du nom resserrée, les quatre photos sur une ligne, noms dessous */
  .gbody.answered .namecard { padding: 8px 14px; }
  .gbody.answered .namecard .hand { display: none; }
  .gbody.answered .namecard .big { font-size: 1.25rem; }
  .gbody.answered .pwrap { flex: none; min-height: 0; container-type: normal; }
  .gbody.answered .photos { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .gbody.answered .pans { padding: 3px 3px 0; }
  .gbody.answered .pans .pcap { min-height: 0; padding: 3px 2px 4px; font-size: .8125rem; line-height: 1.15; }
  .gbody.answered .photos:not(.two) .pcap { font-size: .75rem; }
  .gbody.answered .pans .k { font-size: .9375rem; }
  .gbody.answered .pans svg.mark { top: 6px; right: 6px; width: 26px; height: 26px; padding: 4px; }
}

/* Panneau du bas */
.scrim { position: fixed; inset: 0; z-index: 30; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .25s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; z-index: 40; left: 50%; bottom: 0; width: 100%; max-width: 480px; transform: translate(-50%, 105%); visibility: hidden;
  transition: transform .32s cubic-bezier(.2, .8, .2, 1), visibility 0s .32s; background: var(--card); border-top: 2px solid var(--ink); border-radius: 14px 14px 0 0;
  box-shadow: 0 -3px 8px rgb(28 38 32 / .12); max-height: 88%; display: flex; flex-direction: column; }
.sheet.on { transform: translate(-50%, 0); visibility: visible; transition: transform .32s cubic-bezier(.2, .8, .2, 1); }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 10px auto 0; flex: none; }
.sheet .scroll { overflow-y: auto; overscroll-behavior: contain; padding-block: 16px 10px; display: flex; flex-direction: column; gap: 10px; }
/* Suite cachée : le bas du texte s'efface, signe qu'il faut faire défiler */
.sheet .scroll.more { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 34px), transparent); }
.sheet .scroll:focus-visible { outline-offset: -3px; }
.sheet .foot { flex: none; padding-top: 6px; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); display: flex; flex-direction: column; gap: 8px; }
.sheet h2 { font-size: 1.25rem; }
/* Tampon du verdict : flotte à droite de la première ligne du verdict (il ne déborde plus sur les photos au-dessus du panneau) */
.sstamp { float: right; margin: 1px 0 4px 12px; border: 2px solid var(--ink); border-radius: 4px; padding: 0 8px; background: var(--card);
  transform: rotate(5deg); font: 700 .75rem/1.6 var(--ui); letter-spacing: .12em; color: var(--ink); white-space: nowrap; }
.sheet.ko .sstamp { border-color: var(--red); color: var(--red); }
.verdict { display: block; font: 400 1.25rem/1.3 var(--hand); color: var(--ink); }
.verdict::after { content: ""; display: block; clear: both; }
.verdict svg { width: 22px; height: 22px; stroke-width: 2.6; vertical-align: -4px; margin-right: 6px; }
.sheet.ko .verdict { color: var(--red); }
.ansblock { display: flex; flex-direction: column; gap: 4px; }
.who { display: flex; align-items: center; gap: 14px; }
.whotxt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.namerow { display: flex; align-items: center; justify-content: space-between; gap: 4px 8px; flex-wrap: wrap; }
.who .n { font-size: 1.3125rem; line-height: 1.2; font-weight: 700; color: var(--ink); }
.mini { flex: none; display: block; background: var(--frame); padding: 4px 4px 10px; box-shadow: var(--shadow-photo); transform: rotate(-3deg); }
.mini img { width: 60px; height: 60px; object-fit: cover; display: block; }
.tipbox { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-left: 3px solid var(--ink); background: var(--paper); }
.tipbox .t1 { font-size: .875rem; line-height: 1.43; font-weight: 600; }
.tipbox .t2 { font-size: .84rem; line-height: 1.4; }
.tipbox .used .hand { color: var(--ink); font-size: .95rem; line-height: 1.2; }

/* Résultat */
.result { flex: 1; display: flex; flex-direction: column; gap: 16px; padding-top: calc(env(safe-area-inset-top, 0px) + 24px); padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); }
.result > .hand { font-size: 1rem; color: var(--muted); }
.rcard { margin-top: 6px; padding: 22px 18px 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; transform: rotate(-.6deg); }
.rcard .stamp { top: -11px; }
.rcard .tape { left: 26%; }
.grade { position: relative; width: 150px; height: 116px; display: grid; place-items: center; }
.grade svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.grade path { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .9s .15s ease-out forwards; }
.grade.out path { stroke: var(--red); }
.grade p { position: relative; font: 700 1.5rem/1 var(--hand); color: var(--ink); font-variant-numeric: tabular-nums; }
.grade b { font-size: 3.25rem; }
.grade.out p { color: var(--red); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.bigstars { display: flex; justify-content: center; gap: 8px; color: var(--ink); }
.bigstars svg { width: 30px; height: 30px; }
.bigstars .on svg { animation: pop .5s ease backwards; }
.bigstars .on:nth-child(2) svg { animation-delay: .15s; } .bigstars .on:nth-child(3) svg { animation-delay: .3s; }
.rcard .title { font-size: 1.625rem; color: var(--text); }
.rcard .msg { color: var(--muted); max-width: 34ch; }
.unlock { margin: 4px 3px 0 0; }
.unlock .hand { font-size: 1rem; color: var(--muted); }
.review { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }
.review h2 { font-size: 1.125rem; }
.ritem { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 12px 10px 10px; text-align: left; }
.ritem .mini { transform: rotate(2deg); }
.ritem:nth-child(odd) .mini { transform: rotate(-2deg); }
.ritem .rtxt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: .875rem; color: var(--muted); }
.ritem .n { font-size: 1rem; font-weight: 700; color: var(--text); }

/* Pages Herbier et À propos */
.phead { display: flex; flex-direction: column; gap: 12px; padding-top: calc(env(safe-area-inset-top, 0px) + 32px); }
.titlerow { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 10px; flex-wrap: wrap; }
.titlerow h1 { font-size: 1.875rem; line-height: 1.13; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.titlerow .hand { font-size: 1rem; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8125rem; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.legend .u { color: var(--muted); }
.legend .u i { border: 1px solid var(--outline); }
.filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 4px;
  margin-inline: calc(-1 * max(20px, env(safe-area-inset-left, 0px))) calc(-1 * max(20px, env(safe-area-inset-right, 0px)));
  padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px)); }
.filters::-webkit-scrollbar { display: none; }
.fchip { flex: none; min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1.5px solid var(--outline); background: var(--card); color: var(--text); font-size: .875rem; font-weight: 600; white-space: nowrap; }
.fchip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); font-weight: 700; }
.hwarn { background: transparent; border: 0; padding: 0; font-size: .75rem; }
.hwarn svg { width: 15px; height: 15px; }
.herb { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px 10px; padding-top: 14px; }
.spc { position: relative; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 5px 5px 8px; border-radius: 2px; background: var(--frame); box-shadow: var(--shadow); text-align: left; }
.spc:nth-child(5n+1) { transform: rotate(-1deg); } .spc:nth-child(5n+2) { transform: rotate(.8deg); } .spc:nth-child(5n+3) { transform: rotate(-.4deg); }
.spc:nth-child(5n+4) { transform: rotate(1deg); } .spc:nth-child(5n) { transform: rotate(-.8deg); }
.spc .th { position: relative; display: block; aspect-ratio: 1 / .84; overflow: hidden; background: var(--line); }
.spc .th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spc .n { font-size: .8125rem; line-height: 1.23; font-weight: 700; min-height: 2.46em; overflow-wrap: anywhere; hyphens: auto; }
/* Dans la grille, pastille sur une ligne et sans pictogramme (comme la maquette) : le texte et le style propre à chaque classe suffisent */
.spc .badge { align-self: flex-start; max-width: 100%; white-space: nowrap; font-size: .6875rem; padding: 0 5px; line-height: 1.45; letter-spacing: -.01em; }
.spc .badge svg { display: none; }
.mstamp { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--ink); background: var(--card); color: var(--ink); display: grid; place-items: center; transform: rotate(-12deg); }
.mstamp svg { width: 16px; height: 16px; stroke-width: 3; }
.spc.unseen { background: transparent; background: color-mix(in srgb, var(--card) 60%, transparent); border: 1.5px dashed var(--outline); border-radius: 4px; box-shadow: none; }
.spc.unseen .th img { opacity: .2; filter: grayscale(1); }
.spc .q { position: absolute; inset: 0; display: grid; place-items: center; font: 700 1.875rem/1 var(--hand); color: var(--muted); }
.spc.unseen .n { color: var(--muted); font-weight: 600; }
.spc .tag { font: 400 .875rem/1.2 var(--hand); color: var(--muted); }
.empty { margin-top: 14px; padding: 20px 16px; display: flex; flex-direction: column; gap: 6px; transform: rotate(-.5deg); }
.empty .hand { font-size: 1.125rem; color: var(--ink); }
.foot-note { padding-top: 18px; }

.fiche { gap: 12px; }
.fiche .polaroid { width: min(100% - 12px, 340px); padding-bottom: 9px; transform: rotate(-1deg); margin-top: 8px; }
.fiche .ph { height: auto; aspect-ratio: 4 / 3; }
.fiche h2 { font-size: 1.5rem; color: var(--ink); }
.fiche dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .875rem; }
.fiche dt { color: var(--muted); }
.fiche dd { margin: 0; }
.fiche .ok { font-family: var(--hand); color: var(--ink); }
.small { font-size: .75rem; color: var(--muted); overflow-wrap: anywhere; }

.about { display: flex; flex-direction: column; gap: 18px; }
.card { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card:nth-of-type(odd) { transform: rotate(-.4deg); }
.card:nth-of-type(even) { transform: rotate(.3deg); }
.card.flat { transform: none; }
.card h2 { font-size: 1.0625rem; font-weight: 700; }
.how { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 8px; font-size: .9375rem; }
.how li::marker { font-family: var(--hand); font-weight: 700; color: var(--ink); }
.credits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: .8125rem; }
.credits li { overflow-wrap: anywhere; color: var(--muted); }
.credits b { color: var(--text); font-weight: 600; }
.credits a { display: inline-block; padding: 10px 4px; margin: -10px -4px; }
.danger-txt { color: var(--red); font-weight: 600; }

/* Accueil « Jeux » : carte du parcours, puis une carte par jeu */
.pcard { margin-top: 4px; }
.pchead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pchead .sname { font-size: 1.125rem; padding-right: 0; white-space: nowrap; }
.tdots { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.tdots li { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1.5px dashed var(--outline); color: var(--muted); font: 700 .875rem/1 var(--hand); }
.tdots li svg { width: 13px; height: 13px; stroke-width: 3; }
.tdots .done { background: var(--ink); border: 1.5px solid var(--ink); color: var(--on-ink); }
.tdots .cur { border: 2px solid var(--ink); color: var(--ink); background: var(--card); }
.pcur { display: flex; flex-direction: column; gap: 2px; }
.pcur b { font-size: 1.0625rem; line-height: 1.25; }
.games { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.games li:nth-child(odd) .gcard { transform: rotate(-.4deg); }
.games li:nth-child(even) .gcard { transform: rotate(.3deg); }
.gcard { width: 100%; min-height: 72px; display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px 14px 12px 12px; text-align: left; }
.ghead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 10px; }
.gseal { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--ink); color: var(--ink); display: grid; place-items: center; transform: rotate(-6deg); }
.gseal svg { width: 22px; height: 22px; stroke-width: 1.8; }
.grec { font-size: .95rem; line-height: 1.2; color: var(--ink); white-space: nowrap; }
.gcard.soon { background: transparent; background: color-mix(in srgb, var(--card) 55%, transparent); box-shadow: none; border: 1.5px dashed var(--outline); }
.gcard.soon .gseal { border-style: dashed; border-color: var(--outline); color: var(--muted); }
.gcard.soon .sname, .gcard.soon .grec { color: var(--muted); }

/* Écran du parcours */
.parcours .phead { padding-top: calc(env(safe-area-inset-top, 0px) + 16px); gap: 8px; }
.backrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.backrow .hand { font-size: 1rem; color: var(--muted); }
.parcours h1 { font-size: 1.875rem; line-height: 1.13; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.parcours .trail { padding-top: 6px; }

/* Parcours : questions des paliers 3 à 5 */
.fill { flex: 1 1 0; min-height: 0; }
.ans .nm.lat { font-style: italic; font-weight: 600; }
.desccard { gap: 8px; }
.desccard h1.hand { font-size: 1.0625rem; line-height: 1.3; font-weight: 400; color: var(--muted); }
.desccard .dtip { font-size: 1.125rem; line-height: 1.4; font-weight: 600; color: var(--text); }
.pairhead { gap: 2px; }
.pairhead .hand { font-size: 1rem; color: var(--muted); }
.pcell { position: relative; min-width: 0; display: flex; }
.pcell .pans { flex: 1; }
.pcell:nth-child(1) .pans { transform: rotate(-1deg); } .pcell:nth-child(2) .pans { transform: rotate(.8deg); }
.pcell:nth-child(3) .pans { transform: rotate(.6deg); } .pcell:nth-child(4) .pans { transform: rotate(-.8deg); }
.k-pair .pwrap { justify-content: center; }
.k-pair .prompt { flex: none; }
/* Deux photos côte à côte, jusqu'au bord de l'écran ; en hauteur, elles prennent la place libre jusqu'à deux fois leur largeur (recadrées au centre) */
.k-pair .pwrap { margin-inline: -12px; }
.photos.two { --w: max(96px, (100cqw - 10px) / 2); gap: 10px; }
/* La question est dans le même bloc que les photos (centré dans la place libre) : sa hauteur est retirée de celle des photos */
.k-pair .pwrap { justify-content: center; gap: 14px; }
.k-pair .pairhead { padding-inline: 12px; }
.photos.two .pimg { aspect-ratio: auto; height: max(120px, min(100cqh - 44px - 72px, (var(--w) - 14px) * 2)); }
.pairres { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pairres li { display: grid; grid-template-columns: 5.5em minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.pairres .label { font-size: .6875rem; }
.pairres .pn2 { font-weight: 700; line-height: 1.25; color: var(--text); }
.pans { -webkit-touch-callout: none; }
.zbtn { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--outline); background: var(--card); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow); }
.zbtn svg { width: 20px; height: 20px; stroke-width: 2.2; }
.streakrow { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: .8125rem; line-height: 1.1; color: var(--muted); }
.streakrow b { font: 700 1.0625rem/1 var(--hand); color: var(--ink); }
.regain { display: flex; align-items: center; gap: 6px; font: 400 1.0625rem/1.3 var(--hand); color: var(--ink); }
.regain svg { width: 18px; height: 18px; stroke-width: 2.6; }
.swarn { display: flex; align-items: flex-start; justify-content: center; gap: 6px; color: var(--text); font-weight: 600; text-align: left; }
.swarn svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--red); }
.rsub { display: flex; flex-direction: column; align-items: center; font-size: 1.0625rem; line-height: 1.3; color: var(--ink); }
.rsub .red { color: var(--red); }
.grade .of { display: block; font-size: 1rem; line-height: 1; text-align: center; margin-top: 2px; }
.grade p:has(.of) { margin-top: -14px; }
.ritem .badge { align-self: flex-start; margin: 2px 0; }
.ritem .fam-l { font-size: .8125rem; font-weight: 600; color: var(--ink); }

/* Jeux : en-tête (score), introduction */
.xscore { flex: none; min-width: 48px; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.xscore b { font: 700 1.5rem/1 var(--hand); color: var(--ink); font-variant-numeric: tabular-nums; }
.xscore .hand { font-size: .8125rem; color: var(--muted); white-space: nowrap; }
.intro { gap: 16px; }
.rules { padding-top: 18px; transform: rotate(-.4deg); }
.rules h1 { font-size: 1.5rem; color: var(--ink); }
.rules .hand { font-size: 1rem; color: var(--muted); }
.rules .hnote { font: 400 1rem/1.3 var(--hand); color: var(--ink); }
@media (pointer: coarse) { .kbd { display: none; } }

/* Cueillette express */
.xclock { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.xclock.low { color: var(--red); }
.xbtns { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.xbtn { min-height: 76px; border-radius: 8px; border: 2px solid var(--ink); background: var(--card); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 1.125rem; font-weight: 700; transition: background-color .15s, border-color .15s; -webkit-user-select: none; user-select: none; }
.xbtn svg { width: 26px; height: 26px; stroke-width: 2; }
.xbtn.take { background: var(--ink); color: var(--on-ink); }
.xbtn:active:not([aria-disabled="true"]) { transform: translate(1px, 1px); }
.xbtn[aria-disabled="true"] { cursor: default; }
.xbtn.right { box-shadow: 0 0 0 3px var(--card), 0 0 0 6px var(--ink); }
.xbtn.wrong { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.xwarn { display: flex; align-items: center; justify-content: center; gap: 6px; }
.xwarn svg { width: 14px; height: 14px; color: var(--red); }
/* Pause : la photo est voilée tant que le chrono est arrêté */
.xgame.paused #ximg { filter: blur(26px) grayscale(.4); }

/* Les familles : 7 réponses sur deux colonnes */
.answers.fams { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.fams .ans { min-height: 46px; padding: 4px 8px 4px 10px; gap: 8px; }
.fams .ans.right { padding: 3.5px 7.5px 3.5px 9.5px; }
.fams .ans .nm { font-size: .9375rem; line-height: 1.2; }
.fams .ans:last-child:nth-child(odd) { grid-column: 1 / -1; }
.fams .ans { position: relative; }
.fams .why, .fams span.mark { display: none; }
.fams svg.mark { position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; }
.fam { font-size: 1.3125rem; line-height: 1.2; font-weight: 700; color: var(--ink); }
.fam .label { font-size: .75rem; }
.ansblock .small-n { font-size: 1rem; line-height: 1.3; font-weight: 700; color: var(--text); }
.ansblock .small-n .sci { font-weight: 400; font-size: .875rem; }

/* Réponse donnée : deux photos plus petites, carte du nom ou de la description resserrée */
@media (orientation: portrait), (min-height: 501px) {
  .gbody.answered .photos.two { grid-template-columns: repeat(2, minmax(0, 132px)); gap: 12px; }
  .gbody.answered .photos.two .pimg { aspect-ratio: 1; height: auto; }
  /* Place libre au-dessus du panneau (fitSheet, shell.ts) : les photos grandissent en hauteur jusqu'à deux fois leur largeur, puis en largeur */
  .gbody.answered .photos.two.grown { grid-template-columns: repeat(2, minmax(0, var(--pw))); }
  .gbody.answered .photos.two.grown .pimg { aspect-ratio: auto; height: var(--ph); }
  .gbody.answered .zbtn { top: 4px; right: 4px; }
  .gbody.answered .pairhead .hand { display: none; }
  .gbody.answered .fill { display: none; }
  .gbody.answered .desccard .dtip { font-size: .9375rem; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
  .gbody.answered .fams .ans { min-height: 38px; padding-block: 2px; }
  .gbody.answered .fams .ans.right { padding-block: 1.5px; }
  .gbody.answered .fams .ans .nm { font-size: .875rem; }
  .gbody.answered .fams .k { font-size: 1.05rem; }
}

@media (hover: hover) and (pointer: fine) {
  .ans:hover:not(:disabled), .fchip:hover:not([aria-pressed="true"]) { border-color: var(--ink); }
  .spc:hover, .ritem:hover, .gcard:not(.soon):hover { box-shadow: 0 3px 8px rgb(28 38 32 / .2); }
  .donebtn:hover .sname, .tab:hover { color: var(--ink); }
}
/* Hauteur visible courte (petit Android, iPhone SE avec la barre du navigateur) : légende du polaroïd masquée, écran resserré */
@media (max-height: 699px) {
  .polaroid { --pb: 9px; }
  .caption { display: none; }
  .gbody, .qhead { gap: 8px; }
  .gbody { padding-top: 8px; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 10px); }
  .answers { gap: 6px; }
  .ans { min-height: 50px; }
  .ans .ds { font-size: .75rem; }
  .ans.big { min-height: 64px; }
  .prompt { font-size: 1.25rem; }
  .hint { padding: 6px 10px; font-size: .875rem; line-height: 1.35; }
  .gbody.hint-on:not(.answered) .qhead .ph { min-height: 84px; }
  .mast, .phead { padding-top: calc(env(safe-area-inset-top, 0px) + 20px); }
  .home, .about { gap: 14px; }
  .gbody.answered { padding-top: 6px; }
  .gbody.answered .ph { height: 62px; }
  .gbody.answered .polaroid { width: 86px; }
  .gbody.answered .answers { gap: 5px; }
  .gbody.answered .ans:not(.big) { min-height: 36px; padding-block: 3px; }
  .gbody.answered .ans.right:not(.big) { padding-block: 2.5px; }
  .gbody.answered .fams .ans { min-height: 34px; }
  .gbody.answered { gap: 8px; }
  .gbody.answered .namecard { padding: 6px 12px; }
  .gbody.answered .namecard .big { font-size: 1.125rem; }
  /* Panneau de réponse resserré */
  .sheet .scroll { padding-block: 12px 8px; gap: 8px; }
  .sheet .foot { padding-top: 4px; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); gap: 6px; }
  .verdict { font-size: 1.05rem; }
  /* « Bonne réponse » : le verdict (« Vous avez dit … ») et le nom en grand suffisent à l'œil ; le libellé reste pour les lecteurs d'écran */
  .ansblock > p.label:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .who { gap: 12px; }
  .who .n { font-size: 1.125rem; }
  .mini img { width: 46px; height: 46px; }
  .tipbox { padding: 8px 10px; }
  .tipbox .t1 { font-size: .84rem; line-height: 1.4; }
  .fam { font-size: 1.125rem; }
}
/* Panneau de réponse plus long que la place (fitSheet, shell.ts) : la page et le panneau se resserrent par paliers cumulés.
   1 : marges, petite photo et énoncé ; 2 : les réponses écartées disparaissent (restent la bonne et celle choisie, comme dans
   La révélation), la question « Lequel se mange ? » aussi ; 3 : l'indice déjà lu quitte le panneau, l'énoncé aussi. */
@media (orientation: portrait), (min-height: 501px) {
  .gbody.answered.fit1 { gap: 6px; padding-top: 4px; }
  .gbody.answered.fit1 .qhead { column-gap: 12px; row-gap: 2px; }
  .gbody.answered.fit1 .polaroid { width: 70px; padding: 4px 4px 9px; margin-top: 2px; }
  .gbody.answered.fit1 .ph { height: 50px; }
  .gbody.answered.fit1 .polaroid .tape { width: 34px; height: 13px; top: -6px; left: 18px; }
  .gbody.answered.fit1 .prompt { font-size: 1rem; line-height: 1.25; }
  .gbody.answered.fit1 .answers { gap: 4px; }
  .gbody.answered.fit1 .ans:not(.big) { min-height: 34px; padding-block: 2px; }
  .gbody.answered.fit1 .ans.right:not(.big) { padding-block: 1.5px; }
  .gbody.answered.fit1 .ans.big { min-height: 46px; }
  .gbody.answered.fit1 .fams .ans { min-height: 32px; }
  .gbody.answered.fit1 .namecard { padding: 5px 12px; }
  .gbody.answered.fit1 .photos.two { grid-template-columns: repeat(2, minmax(0, 108px)); }
  .gbody.answered.fit1 .pwrap { gap: 8px; }
  .sheet.fit1 .scroll { padding-block: 10px 6px; gap: 6px; }
  .sheet.fit1 .foot { padding-top: 2px; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); gap: 4px; }
  .sheet.fit1 .btn { min-height: 44px; }
  .sheet.fit1 .tipbox { padding: 6px 10px; gap: 4px; }
  .sheet.fit1 .tipbox .t1, .sheet.fit1 .tipbox .t2 { line-height: 1.35; }
  .sheet.fit1 .pairres { gap: 4px; }
  .sheet.fit1 .pairres .pn2 { line-height: 1.2; }
  .gbody.answered.fit2 .ans.dim { display: none; }
  .gbody.answered.fit2 .pairhead { display: none; }
  .gbody.answered.fit2 .photos.two { grid-template-columns: repeat(2, minmax(0, 92px)); }
  .gbody.answered.fit2 .photos:not(.two) { grid-template-columns: repeat(4, minmax(0, 62px)); justify-content: center; }
  .gbody.answered.fit3 .qrow { display: none; }
  .gbody.answered.fit3 .photos.two { grid-template-columns: repeat(2, minmax(0, 80px)); }
  .sheet.fit3 .tipbox .used { display: none; }
}
@media (max-width: 359px) {
  .gprog .tn { display: none; }
  .opencard { padding: 12px; }
  .btn { padding: 0 10px; }
  .ans { gap: 10px; padding-left: 10px; }
}
@media (hover: none) and (pointer: coarse) {
  /* Pas de survol au doigt ; les lettres a, b, c, d restent visibles car elles servent de repères dans le carnet */
  .ans, .fchip, .donebtn, .gcard { -webkit-user-select: none; user-select: none; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .shell, .tabbar, .sheet { max-width: 860px; }
  .gbody { display: grid; grid-template-columns: 42% 1fr; column-gap: 22px; align-content: start; }
  .gbody > .qhead, .gbody > .namecard { grid-row: 1 / span 3; }
  .qhead .polaroid { flex: none; margin-top: 0; max-height: none; }
  .gbody .ph, .qhead .ph, .gbody.hint-on .qhead .ph { flex: none; min-height: 0; height: max(120px, calc(100vh - 210px)); }
  .pwrap { container-type: normal; min-height: 0; }
  .fill.top { display: none; }
  .photos { grid-template-columns: repeat(4, 1fr); }
  .sheet { max-height: 96%; }
  .fiche .ph { aspect-ratio: auto; height: 45vh; }
}
/* Visionneuse de photo (plein écran, fond sombre, mêmes couleurs dans les deux thèmes) */
body.zoom-open { overflow: hidden; }
.zoom { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #0E120F; color: #F2F4F0; }
.zoom[open] { display: flex; flex-direction: column; }
.zoom::backdrop { background: rgb(0 0 0 / .85); }
.zstage { position: relative; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; touch-action: pinch-zoom pan-x pan-y;
  padding-top: env(safe-area-inset-top, 0px); }
.zstage img { position: absolute; inset: env(safe-area-inset-top, 0px) 0 0; width: 100%; height: calc(100% - env(safe-area-inset-top, 0px)); object-fit: contain; display: block;
  cursor: zoom-in; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.zstage.zoomed img { position: static; width: 200%; max-width: none; height: auto; cursor: zoom-out; }
.zbar { flex: none; display: flex; align-items: center; gap: 12px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 12px) max(16px, env(safe-area-inset-left, 0px)); }
.zcredit { flex: 1; min-width: 0; font-size: .75rem; color: #C9D1C4; overflow-wrap: anywhere; }
.zoom .zclose { flex: none; width: auto; min-width: 96px; color: #F2F4F0; box-shadow: inset 0 0 0 1.5px #F2F4F0; }
.zoom .zclose:focus-visible { outline-color: #E2AD4C; }

::view-transition-old(root) { animation: .16s ease both vt-out; }
::view-transition-new(root) { animation: .24s cubic-bezier(.2, .8, .2, 1) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .grade path { stroke-dashoffset: 0; }
}

/* La révélation : photo très agrandie et floue qui se dévoile en 5 étapes ; pastilles des étapes au bout de la question */
.rph img { animation: none; transition: transform .6s ease, filter .6s ease; }
div.rph { cursor: default; }
.rpips { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding-top: 2px; }
.rpips .dots { display: flex; gap: 4px; }
.rpips i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink); }
.rpips i.on { background: var(--ink); }
.rpips .pts { font-size: 1.125rem; line-height: 1; font-weight: 700; color: var(--ink); white-space: nowrap; }
.tipbox .label { font-size: .6875rem; }
/* Réponse donnée : la photo entière reste en grand au-dessus du panneau (revelation.ts, fitReveal) ;
   seules la bonne réponse et celle choisie restent, en rappel */
.k-reveal.revealed .ans.dim { display: none; }
.k-reveal.revealed .qhead .ph { min-height: 120px; }
.k-reveal.revealed .answers { gap: 6px; }
.k-reveal.revealed .ans { min-height: 44px; }

/* Écrans des jeux à grande photo (.play : Cueillette express, Les sosies, La révélation, Les familles, et « Lequel se mange ? »
   du palier 4). Hauteur de l'écran exactement, sans défilement : en-tête, photo qui commence juste dessous et prend toute
   la hauteur libre sur toute la largeur (cadre fin arrondi), commandes en bas. Après la réponse, le panneau monte du bas
   (fitPanel, shell.ts) : le jeu prend la hauteur restante au-dessus de lui et la photo garde tout ce qui reste. */
.game.play { height: 100vh; height: 100svh; height: 100dvh; min-height: 0; overflow: hidden; }
.play .pad { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.play .gbar { position: static; gap: 12px; padding-block: 14px 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.play .gprog { gap: 6px; }
.play .gprog .row { flex-wrap: wrap; row-gap: 0; }
.ginfo { margin-left: auto; font-size: .8125rem; color: var(--muted); white-space: nowrap; }
.ginfo b { color: var(--ink); font-variant-numeric: tabular-nums; }
.play .bar { height: 8px; border-radius: 4px; }
.play .bar i { border-radius: 4px; }
.play .xscore { min-width: 44px; align-items: flex-end; }
.play .xscore b { font-size: 1.875rem; }
.play .xscore .unit { font-size: .8125rem; line-height: 1.2; color: var(--muted); white-space: nowrap; }
.play .gbody { flex: 1 1 0; min-height: 0; gap: 12px; padding-top: 14px; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); }
.play .gbody.done { padding-bottom: 12px; }
.play .stage { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.play .ctrl { flex: none; display: flex; flex-direction: column; gap: 10px; }
.play .prompt { flex: none; font-size: 1.3125rem; line-height: 1.25; }

/* Cadre de la photo */
.shot { position: relative; flex: 1 1 0; min-height: 0; border-radius: 20px; background: var(--frame); padding: 6px; box-shadow: var(--shadow-photo); overflow: hidden; }
.shot > img { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: cover; border-radius: 15px; display: block;
  background: var(--line); animation: fadein .35s ease; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.szoom { position: absolute; z-index: 2; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--text);
  background: var(--card); background: color-mix(in srgb, var(--card) 92%, transparent); box-shadow: var(--shadow); }
.szoom svg { width: 20px; height: 20px; }
.schip { position: absolute; top: 18px; left: 18px; border-radius: 999px; padding: 2px 12px; font: 400 .9375rem/1.5 var(--hand); color: var(--ink); pointer-events: none;
  background: var(--card); background: color-mix(in srgb, var(--card) 92%, transparent); }
/* Crédit : en bas à gauche de la photo, lisible en entier (sur deux lignes s'il est long) */
.shot .credit { z-index: 1; left: 14px; right: auto; bottom: 12px; max-width: calc(100% - 28px); font-size: .8125rem; line-height: 1.35; padding: 2px 8px; border-radius: 6px; text-align: left; pointer-events: none; }
.shot button:focus-visible { outline-offset: -4px; }
.play .badge, .panel .badge { font-size: .8125rem; padding: 2px 10px 2px 8px; border-radius: 999px; }

/* Panneau de réponse des jeux : coins arrondis en haut, sans filet */
.sheet.panel { border-top: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -2px 10px rgb(28 38 32 / .12); }
.panel .pad { padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); }
/* 20 px en haut (le panneau commence par une cale de 8 px), 16 px entre les blocs, 22 px en bas */
.panel .scroll { padding-block: 12px 0; gap: 16px; }
.panel .foot { padding-top: 16px; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); gap: 16px; }
.panel .btn { min-height: 54px; border-radius: 14px; font-size: 1.0625rem; }
.panel .fine { font-size: .8125rem; }
.panel .swarn svg { margin-top: 2px; }
/* 1re ligne : verdict manuscrit court, tampon à droite ; puis petite ligne en capitales, nom + pastille, nom latin */
.vrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel .verdict { font: 700 1.375rem/1.25 var(--hand); color: var(--ink); }
.panel.ko .verdict { color: var(--red); }
.nblock { display: flex; flex-direction: column; gap: 4px; }
.capline { margin-bottom: 2px; font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.capline b { color: var(--ink); }
.nrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nrow .badge { flex: none; }
.rname { min-width: 0; font-size: 1.25rem; line-height: 1.2; font-weight: 700; color: var(--text); }
.nblock .sci { font-size: .875rem; }
.pstamp { flex: none; border: 2px solid var(--ink); border-radius: 6px; padding: 2px 10px; color: var(--ink); font-size: .8125rem; font-weight: 800; letter-spacing: .08em; white-space: nowrap; transform: rotate(3deg); }
.panel.ko .pstamp { border-color: var(--red); color: var(--red); }
.panel .tipbox { border-left: 0; border-radius: 12px; background: var(--ink-soft); padding: 10px 12px; gap: 4px; }
.panel .tipbox .label { font-size: .8125rem; font-weight: 700; color: var(--ink); }
.panel .tipbox .t1 { font-size: .9375rem; line-height: 1.4; font-weight: 400; color: var(--text); }
.struck { font-size: .8125rem; line-height: 1.4; color: var(--muted); }
.struck s { text-decoration-thickness: 1.5px; }

/* Cueillette express : chrono à droite de l'en-tête, deux gros boutons, photo qu'on glisse à gauche ou à droite */
.xtime { position: relative; flex: none; min-width: 64px; display: flex; flex-direction: column; align-items: flex-end; }
.play .xclock { font: 700 1.875rem/1 var(--hand); color: var(--ink); font-variant-numeric: tabular-nums; }
.play .xclock.low, .fb-ko .xclock { color: var(--red); }
.xpen { position: absolute; top: 100%; right: 0; font-size: .8125rem; font-weight: 700; color: var(--red); white-space: nowrap; }
.fb-ko .gbar .bar i { background: var(--red); }
.fb-ko .ginfo #xstreak { color: var(--red); }
.xshot { touch-action: none; cursor: grab; will-change: transform; }
.xshot.back { transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
.xshot:active { cursor: grabbing; }
.fb-ok .xshot { outline: 3px solid var(--ink); outline-offset: -3px; }
.fb-ko .xshot { outline: 3px solid var(--red); outline-offset: -3px; }
.xswipe { position: absolute; z-index: 2; top: 72px; border: 3px solid; border-radius: 10px; padding: 2px 12px; font-size: 1.25rem; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; background: var(--card); background: color-mix(in srgb, var(--card) 92%, transparent); opacity: 0; pointer-events: none; white-space: nowrap; }
.xswipe.l { right: 18px; color: var(--muted); transform: rotate(6deg); }
.xswipe.r { left: 18px; color: var(--ink); transform: rotate(-6deg); }
.xswipe.go { box-shadow: 0 0 0 3px var(--card); }
.xmark { position: absolute; z-index: 3; top: 30%; left: 50%; transform: translateX(-50%) rotate(-6deg); border: 3px solid var(--ink); border-radius: 10px; padding: 4px 16px;
  background: var(--card); background: color-mix(in srgb, var(--card) 94%, transparent); color: var(--ink); font-size: 1.625rem; font-weight: 800; letter-spacing: .04em;
  white-space: nowrap; pointer-events: none; animation: stampin .22s cubic-bezier(.2, .8, .2, 1); }
.fb-ko .xmark { border-color: var(--red); color: var(--red); }
@keyframes stampin { from { transform: translateX(-50%) rotate(-6deg) scale(1.4); opacity: 0; } }
.xband { position: absolute; z-index: 2; left: 6px; right: 6px; bottom: 6px; border-radius: 0 0 15px 15px; padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 3px;
  background: var(--card); background: color-mix(in srgb, var(--card) 96%, transparent); pointer-events: none; animation: rise .18s ease-out; }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }
.xrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.xrow .n { min-width: 0; font-size: 1.25rem; line-height: 1.2; font-weight: 700; color: var(--text); }
.xline { font-size: .875rem; line-height: 1.35; color: var(--muted); }
.xcr { font-size: .8125rem; line-height: 1.35; color: var(--muted); overflow-wrap: anywhere; }
.k-express .prompt { text-align: center; font-size: 1.25rem; }
.play .xbtns { gap: 12px; }
.play .xbtn { min-height: 76px; border-radius: 16px; flex-direction: row; gap: 10px; transition: opacity .15s; }
.play .xbtn svg { width: 22px; height: 22px; }
.fb-ok .xbtns, .fb-ko .xbtns { opacity: .45; }
.play .xbtn.right, .play .xbtn.wrong { box-shadow: none; border-color: var(--ink); }
.play .xbtn.leave.wrong { background: var(--card); color: var(--ink); }
.play .xbtn.take.wrong { background: var(--ink); color: var(--on-ink); }
.xhint { text-align: center; font: 400 .9375rem/1.3 var(--hand); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media not (pointer: coarse) { .xhint .tch { display: none; } }
.play .xwarn { font-size: .8125rem; }

/* Les sosies et « Lequel se mange ? » : deux photos l'une au-dessus de l'autre, pleine largeur */
.ptitle { flex: none; display: flex; align-items: baseline; justify-content: space-between; gap: 4px 10px; flex-wrap: wrap; }
.ptitle .prompt { font-size: 1.375rem; }
.ptitle .hand { font-size: .9375rem; color: var(--muted); }
.pair { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.pshot { padding: 0; }
.pick { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 6px; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.pick img { width: 100%; height: 100%; object-fit: cover; border-radius: 15px; display: block; background: var(--line); animation: fadein .35s ease; }
.pick:active:not(:disabled) { translate: 1px 1px; }
.pltr { position: absolute; top: 16px; left: 16px; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--on-ink); display: grid; place-items: center;
  font: 700 1.5rem/1 var(--hand); pointer-events: none; }
.por { flex: none; display: flex; align-items: center; gap: 10px; margin: -4px 0; }
.por::before, .por::after { content: ""; flex: 1; height: 1.5px; background: var(--line); }
.por .hand { font-size: 1.125rem; line-height: 1.2; color: var(--muted); }
.phelp { text-align: center; font-size: .875rem; color: var(--muted); }
.k-pair .ctrl { gap: 0; }
/* Après la réponse : titre, « ou », aide et loupes s'effacent ; chaque photo porte son nom et sa comestibilité */
.k-pair.done .ptitle, .k-pair.done .por, .k-pair.done .ctrl, .k-pair.done .pltr { display: none; }
.k-pair.done .pair { gap: 10px; }
.k-pair.done .pick { cursor: zoom-in; padding: 5px; }
.pshot.right { box-shadow: 0 0 0 3px var(--ink), var(--shadow-photo); }
.pshot.wrong.mine { box-shadow: 0 0 0 3px var(--red), var(--shadow-photo); }
.pband { position: absolute; left: 5px; right: 5px; bottom: 5px; border-radius: 0 0 14px 14px; padding: 7px 12px; display: flex; align-items: center; gap: 8px; pointer-events: none;
  background: var(--card); background: color-mix(in srgb, var(--card) 95%, transparent); }
.pltr2 { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--muted); color: var(--card); font: 700 1.0625rem/1 var(--hand); }
.right .pltr2 { background: var(--ink); color: var(--on-ink); }
.pname { flex: 1; min-width: 0; font-size: 1rem; line-height: 1.2; font-weight: 700; color: var(--text); }
.pmine { position: absolute; top: 12px; right: 12px; display: flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 12px; background: var(--ink); color: var(--on-ink);
  font: 400 .9375rem/1.5 var(--hand); pointer-events: none; }
.pmine svg { width: 15px; height: 15px; stroke-width: 3; }
.wrong .pmine { background: var(--red); color: var(--on-red); }

/* La révélation : jauge des 5 étapes et points en jeu en bas de la photo, réponses en grille 2 × 2 */
.rwin { position: absolute; inset: 6px; border-radius: 15px; overflow: hidden; display: block; padding: 0; background: var(--line); }
.rwin img { width: 100%; height: 100%; object-fit: cover; display: block; }
button.rwin { cursor: zoom-in; }
.rgauge { position: absolute; left: 6px; right: 6px; bottom: 6px; border-radius: 0 0 15px 15px; padding: 22px 14px 12px; display: flex; align-items: center; gap: 10px;
  background: linear-gradient(transparent, rgb(20 28 23 / .6)); pointer-events: none; }
.rgauge .segs { flex: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.rgauge .segs i { height: 8px; border-radius: 4px; background: rgb(255 255 255 / .38); transition: background-color .3s; }
.rgauge .segs i.on { background: #fff; }
.rpts { flex: none; border-radius: 999px; padding: 2px 12px; background: var(--card); color: var(--ink); font: 700 1.0625rem/1.5 var(--hand); white-space: nowrap; }
.rstamp { position: absolute; z-index: 1; top: 18px; right: 18px; border: 3px solid var(--ink); border-radius: 8px; padding: 2px 12px; color: var(--ink); font-size: 1.25rem; font-weight: 800;
  letter-spacing: .04em; white-space: nowrap; transform: rotate(4deg); pointer-events: none; background: var(--card); background: color-mix(in srgb, var(--card) 94%, transparent);
  animation: stampin2 .22s cubic-bezier(.2, .8, .2, 1); }
.rstamp.ko { border-color: var(--red); color: var(--red); }
@keyframes stampin2 { from { transform: rotate(4deg) scale(1.4); opacity: 0; } }
.k-reveal .answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.k-reveal .ans { min-height: 64px; border-radius: 14px; padding: 6px 10px 6px 12px; gap: 8px; }
.k-reveal .ans .k { width: auto; font-size: 1.125rem; font-weight: 400; }
.k-reveal .ans .nm { font-size: 1rem; font-weight: 600; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
.k-reveal.done .ctrl { display: none; }

/* Les familles : 7 boutons avec un petit dessin, deux colonnes, le dernier sur toute la largeur ; après la réponse,
   seules la famille choisie et la bonne restent */
.k-famille .fams { gap: 8px; }
.k-famille .fams .ans { min-height: 52px; border-radius: 12px; padding: 4px 10px; gap: 10px; }
.k-famille .fams .ans.right { padding: 3.5px 9.5px; }
.k-famille .fams .nm { font-size: .9375rem; font-weight: 600; line-height: 1.2; }
.k-famille .fams .nm .more { font-weight: 400; color: var(--muted); }
.fic { flex: none; width: 26px; height: 26px; color: var(--ink); }
.k-famille.done .prompt, .k-famille.done .ans.dim, .k-famille.done .fic, .k-famille.done .nm .more { display: none; }
.k-famille.done .fams .ans { grid-column: auto; min-height: 48px; }
.k-famille.done .fams .ans.solo { grid-column: 1 / -1; }
.k-famille .fams .ans.wrong { border: 2px solid var(--red); background: var(--red-soft); padding: 3.5px 9.5px; }
.k-famille .fams .ans.wrong .nm { color: var(--red); }
.k-famille .fams .ans.right .nm { font-weight: 700; }
.k-famille .fams .why { display: inline; font-size: .875rem; transform: none; }
.k-famille .fams svg.mark { position: static; width: 18px; height: 18px; color: var(--ink); }

/* Petite hauteur visible (iPhone SE, petit Android) : tout se resserre un peu, la photo garde la place */
@media (max-height: 699px) {
  .play .gbar { padding-top: 10px; }
  .play .gbody { gap: 10px; padding-top: 10px; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); }
  .play .stage, .play .ctrl { gap: 8px; }
  .play .xbtn { min-height: 64px; }
  .k-reveal .ans { min-height: 56px; }
  .k-famille .fams { gap: 6px; }
  .k-famille .fams .ans { min-height: 46px; }
  .k-famille.done .fams .ans { min-height: 44px; }
  .ptitle .prompt { font-size: 1.25rem; }
  .play .prompt { font-size: 1.1875rem; }
  .panel .scroll { padding-block: 8px 0; gap: 12px; }
  .panel .foot { padding-top: 12px; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); gap: 10px; }
  .panel .btn { min-height: 50px; }
  .panel .verdict { font-size: 1.25rem; }
  .rname { font-size: 1.125rem; }
  .panel .tipbox { padding: 8px 10px; }
  .panel .tipbox .t1 { font-size: .875rem; line-height: 1.35; }
  .xband { padding: 8px 12px 10px; }
  .xrow .n { font-size: 1.125rem; }
}
/* Paysage bas : photo à gauche, commandes à droite */
@media (orientation: landscape) and (max-height: 500px) {
  .play .gbody { display: flex; flex-direction: row; align-items: stretch; }
  .play .stage { flex: 1 1 55%; }
  .play .ctrl { flex: 1 1 45%; justify-content: flex-end; }
  .play .gbody.done .stage { flex-basis: 100%; }
}

/* ---------- Accueil : défis du jour (screens/home.ts) ----------
   De haut en bas, sans défilement : en-tête et série, le champignon du jour (toute la hauteur restante), la cueillette
   et le carnet du jour (ou la journée complète), « Jouer librement » ; la barre d'onglets en bas. */
.home2 { min-height: 100vh; min-height: 100svh; min-height: 100dvh; display: flex; flex-direction: column; gap: 10px;
  padding-top: calc(env(safe-area-inset-top, 0px) + 12px); padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 10px); }
.home2.pad { padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px)); }
.hhead { flex: none; height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hhead h1 { font-size: 1.375rem; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.streak { flex: none; border: 1.5px solid var(--ink); border-radius: 999px; padding: 3px 10px; background: var(--card); color: var(--ink); font-size: .8125rem; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.streak.on { background: var(--ink); color: var(--on-ink); }

.hero { position: relative; flex: 1 1 0; min-height: 180px; width: 100%; display: block; overflow: hidden; border-radius: 18px; background: #1F4A36; box-shadow: var(--shadow-photo); text-align: left; }
.hero .hblur { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(16px) saturate(1.1); transform: scale(1.25); }
.hveil { position: absolute; inset: 0; background: linear-gradient(180deg, rgb(20 40 30 / .15) 0%, rgb(20 40 30 / .8) 100%); }
.hchip { position: absolute; z-index: 1; top: 12px; left: 12px; border-radius: 999px; padding: 3px 10px; background: var(--card); background: color-mix(in srgb, var(--card) 95%, transparent);
  color: var(--ink); font-size: .75rem; font-weight: 700; letter-spacing: .06em; line-height: 1.5; pointer-events: none; }
.hleft { position: absolute; top: 12px; right: 12px; color: #fff; font-size: .875rem; line-height: 1.5; text-shadow: 0 1px 2px rgb(0 0 0 / .5); white-space: nowrap; }
/* Titre sur toute la largeur, puis le sous-titre et le bouton à sa droite : le titre tient sur une ligne même avec « Continuer » */
.hfoot { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 4px; color: #fff; }
.hrow { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.hrow .hs { flex: 1; min-width: 0; }
.hfoot .ht { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.htxt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ht { font-size: 1.3125rem; font-weight: 800; line-height: 1.2; }
.hs { font-size: .8125rem; line-height: 1.35; opacity: .92; }
.hgo { flex: none; border-radius: 12px; padding: 10px 14px; background: var(--card); color: var(--ink); font-size: .9375rem; font-weight: 800; line-height: 1.2; }
.hero:active .hgo { transform: translate(1px, 1px); }
/* Fini : photo nette dans un cadre blanc, tampon, bande claire avec le nom et « Partager » */
.hero.fin { background: var(--frame); }
.hphoto { position: absolute; inset: 5px; display: block; overflow: hidden; border-radius: 14px; background: var(--line); cursor: pointer; }
.hphoto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hphoto:focus-visible { outline-offset: -4px; }
.hero.fin .hchip { top: 14px; left: 14px; letter-spacing: .04em; }
.hstamp { position: absolute; z-index: 1; top: 14px; right: 14px; border: 2.5px solid var(--ink); border-radius: 8px; padding: 1px 10px; background: var(--card); background: color-mix(in srgb, var(--card) 94%, transparent);
  color: var(--ink); font-size: .8125rem; font-weight: 800; letter-spacing: .04em; line-height: 1.6; white-space: nowrap; transform: rotate(4deg); pointer-events: none; }
.hstamp.ko { border-color: var(--red); color: var(--red); }
.hband { position: absolute; z-index: 1; left: 5px; right: 5px; bottom: 5px; border-radius: 0 0 14px 14px; padding: 10px 12px; display: flex; align-items: center; gap: 10px;
  background: var(--card); background: color-mix(in srgb, var(--card) 96%, transparent); }
.hn { font-size: 1.0625rem; font-weight: 800; line-height: 1.25; color: var(--text); overflow-wrap: anywhere; }
.hb { font-size: .75rem; line-height: 1.35; color: var(--muted); }
.hshare { flex: none; min-height: 40px; border: 1.5px solid var(--ink); border-radius: 12px; padding: 0 12px; background: var(--card); color: var(--ink);
  display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; font-weight: 700; white-space: nowrap; }
.hshare svg { width: 15px; height: 15px; stroke-width: 2.6; }

.dsmalls { flex: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dsmall { height: 58px; min-width: 0; border-radius: 14px; padding: 0 10px; background: var(--card); box-shadow: var(--shadow); display: flex; align-items: center; gap: 8px; text-align: left; }
.dring { flex: none; width: 24px; height: 24px; border-radius: 12px; border: 1.5px solid var(--outline); display: grid; place-items: center; }
.dring svg, .dcheck svg { width: 12px; height: 12px; }
.dsmall.done .dring { border: 0; background: var(--ok-chip-bg); color: var(--ok-chip); }
.dtx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dname { font-size: .8125rem; font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsub { font-size: .75rem; line-height: 1.3; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsmall.done .dname { color: var(--muted); }
.dsmall.done .dsub { color: var(--ok-chip); font-weight: 700; }
.dall { flex: none; height: 58px; border-radius: 14px; padding: 0 12px; background: var(--ink-soft); display: flex; align-items: center; gap: 10px; }
.dcheck { flex: none; width: 26px; height: 26px; border-radius: 13px; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; }
.dcheck svg { width: 13px; height: 13px; }
.dall .dname { font-size: .875rem; color: var(--ink); }
.dnext { flex: none; display: flex; flex-direction: column; align-items: flex-end; font-size: .75rem; line-height: 1.3; color: var(--muted); white-space: nowrap; }
.dnext b { font-size: .875rem; color: var(--ink); }

.libre { flex: none; display: flex; flex-direction: column; gap: 4px; }
.libre h2 { padding: 0 2px; font-size: .8125rem; font-weight: 700; letter-spacing: .08em; line-height: 1.4; text-transform: uppercase; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { height: 60px; min-width: 0; border-radius: 14px; padding: 0 8px; background: var(--card); box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: center; text-align: left; }
.tile .tn { font-size: .8125rem; font-weight: 700; line-height: 1.3; }
.tile .tr { font-size: .75rem; line-height: 1.3; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.quiz { grid-column: span 2; padding: 0 12px; flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; background: var(--ink); color: var(--on-ink); }
.tile.quiz .qn { flex: none; font-size: 1.625rem; font-weight: 700; line-height: 1; }
.tile.quiz .qt { min-width: 0; display: flex; flex-direction: column; }
.tile.quiz .tn { font-size: .9375rem; }
.tile.quiz .tr { color: inherit; opacity: .9; }
.tile.soon { background: transparent; box-shadow: none; border: 1.5px dashed var(--outline); color: var(--muted); }
.tile:active:not(.soon), .dsmall:active { transform: translate(1px, 1px); }
@media (hover: hover) and (pointer: fine) {
  .tile:not(.soon):hover, .dsmall:hover, .hero:hover { box-shadow: 0 3px 8px rgb(28 38 32 / .22); }
}
/* Grand écran : même ordre, plus d'air */
@media (min-height: 760px) {
  .home2 { gap: 14px; padding-top: calc(env(safe-area-inset-top, 0px) + 18px); padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 16px); }
  .libre { gap: 6px; }
}

/* ---------- Défis du jour : écrans (games/daily-*.ts) ---------- */
.dbar .dno { font-weight: 500; }
/* Titre du défi en entier : l'avancement passe à la ligne, calé à droite, s'il n'y a pas la place */
.dbar .gprog .row { flex-wrap: wrap; row-gap: 0; }
.dbar .tier { overflow: visible; white-space: normal; }
/* La cueillette du jour : réponse donnée, les boutons laissent la place à la photo au-dessus du panneau */
.dgame .gbody.done .ctrl { display: none; }
/* Le carnet du jour, « De quelle famille ? » : la réponse choisie reste barrée, sans « votre choix » par-dessus */
.k-famille.answered .fams .why { display: none; }
/* Le champignon du jour : photo (agrandie et floue, comme La révélation), indices posés en bas de la photo,
   essais ratés dessous, panneau de saisie en bas */
.mgame .gbody { gap: 10px; padding-bottom: 10px; }
.k-mystery.done .mguess { display: none; }
.mclues { position: absolute; z-index: 1; left: 6px; right: 6px; bottom: 6px; border-radius: 0 0 15px 15px; padding: 28px 12px 12px; display: flex; flex-direction: column; gap: 8px;
  background: linear-gradient(transparent, rgb(20 28 23 / .65)); pointer-events: none; }
.mchips { display: flex; flex-wrap: wrap; gap: 6px; }
.mchip { border-radius: 999px; padding: 2px 10px; background: var(--card); color: var(--text); font-size: .8125rem; font-weight: 600; line-height: 1.5; }
.mchip b { color: var(--ink); }
.mchip.off { background: rgb(20 28 23 / .35); color: #fff; border: 1.5px dashed rgb(255 255 255 / .75); padding: .5px 10px; font-weight: 500; }
.mclues .badge.non-comestible { background: var(--card); }
.mtip { border-radius: 10px; padding: 6px 10px; background: var(--card); background: color-mix(in srgb, var(--card) 95%, transparent); color: var(--text); font-size: .875rem; line-height: 1.35; }
.mtip .label { margin-right: 4px; font-size: .6875rem; font-weight: 700; color: var(--ink); }
.mguess { flex: none; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.mguess li { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 1px 10px 1px 8px; background: var(--track); color: var(--muted); font-size: .8125rem; line-height: 1.5; }
.mguess li.same { background: var(--same-bg); color: var(--same); }
.mguess .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; }
.mguess .same .dot { background: currentColor; }
.mguess s { text-decoration-thickness: 1.5px; }
.mpanel { flex: none; display: flex; flex-direction: column; gap: 8px; padding-top: 14px; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
  background: var(--card); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-up); }
.mmsg { font: 700 1.0625rem/1.3 var(--hand); color: var(--red); }
.minput { width: 100%; height: 48px; border: 1.5px solid var(--outline); border-radius: 12px; padding: 0 14px; background: var(--paper); color: var(--text); font: 500 1rem var(--ui); }
.minput::placeholder { color: var(--muted); opacity: 1; }
.minput:focus { outline: 3px solid var(--focus); outline-offset: 1px; }
.msugs { min-height: 102px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 48px; gap: 6px; align-content: start; }
.msug { min-width: 0; border: 1.5px solid var(--outline); border-radius: 12px; padding: 3px 10px; background: var(--card); display: flex; flex-direction: column; justify-content: center; text-align: left; }
.msug:active { transform: translate(1px, 1px); background: var(--ink-soft); }
.msug .fr { font-size: .875rem; font-weight: 700; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msug .la { font-size: .75rem; font-style: italic; line-height: 1.25; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mhint { grid-column: 1 / -1; padding: 4px 2px; font: 400 .9375rem/1.3 var(--hand); color: var(--muted); }
.panel .verdict.mverdict { font-size: 1.5rem; }
.mbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mbtns .btn { padding: 0 8px; font-size: .9375rem; }
@media (hover: hover) and (pointer: fine) { .msug:hover { border-color: var(--ink); } }
@media (max-height: 699px) {
  .mpanel { gap: 6px; padding-top: 12px; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); }
  .minput { height: 44px; }
  .msugs { grid-auto-rows: 44px; min-height: 94px; }
}

/* Bilan d'un défi : tient dans l'écran (carte resserrée, espèces à revoir sur une ligne qu'on fait défiler de côté) */
.dres { min-height: 100vh; min-height: 100svh; min-height: 100dvh; gap: 12px; padding-top: calc(env(safe-area-inset-top, 0px) + 16px); padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); }
.dres .rcard { padding: 16px 16px 14px; gap: 4px; }
.dres .grade { width: 124px; height: 94px; }
.dres .grade b { font-size: 2.75rem; }
.dres .rcard .title { font-size: 1.375rem; }
.dres .rcard .msg .red { color: var(--red); font-weight: 600; }
.dmiss { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dmiss h2 { font-size: 1rem; }
.dstrip { list-style: none; margin: 0 calc(-1 * max(20px, env(safe-area-inset-left, 0px))); padding: 4px max(20px, env(safe-area-inset-left, 0px)) 6px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; }
.dstrip li { flex: none; }
.dthumb { width: 84px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; border-radius: 6px; padding: 2px; }
.dthumb .mini img { width: 52px; height: 52px; }
.dthumb .dn { font-size: .75rem; font-weight: 700; line-height: 1.2; color: var(--text); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.dthumb .dl { font-size: .6875rem; line-height: 1.2; color: var(--muted); }
.dnote { text-align: center; font-size: 1rem; line-height: 1.3; color: var(--ink); }
.dres .fill { flex: 1 1 0; min-height: 0; }

/* Grand écran (ordinateur) : le jeu garde sa colonne de téléphone, posée sur un sous-main quadrillé ;
   pendant une partie, la colonne s'élargit pour donner plus de place aux photos. */
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  body { background-image: linear-gradient(color-mix(in srgb, var(--line) 50%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--line) 50%, transparent) 1px, transparent 1px);
    background-size: 88px 88px; background-position: center top; }
}
@media (min-width: 900px) and (min-height: 760px) and (hover: hover) and (pointer: fine) {
  body.ingame .shell, body.ingame .sheet { max-width: 600px; }
}
