/* Polices servies par le site (pas d'appel à Google Fonts). Chaque sous-ensemble porte son unicode-range : le navigateur
   ne télécharge que ceux dont la page a besoin (latin, latin étendu, cyrillique pour Caveat), en une seule fois. *//* public-sans-vietnamese-400-normal */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./public-sans-vietnamese-400-normal-TxZB8OSn.woff2) format('woff2'), url(./public-sans-vietnamese-400-normal-BO1meqcx.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* 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');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* 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');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* public-sans-vietnamese-500-normal */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(./public-sans-vietnamese-500-normal-DjztbcKe.woff2) format('woff2'), url(./public-sans-vietnamese-500-normal-CXYe29CY.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* 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');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* 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');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* public-sans-vietnamese-600-normal */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(./public-sans-vietnamese-600-normal-P4BtCUdw.woff2) format('woff2'), url(./public-sans-vietnamese-600-normal-CcnAzmUX.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* 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');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* 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');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* public-sans-vietnamese-700-normal */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(./public-sans-vietnamese-700-normal-D97ShjGS.woff2) format('woff2'), url(./public-sans-vietnamese-700-normal-Dq5VrXjD.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* 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');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* 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');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* public-sans-vietnamese-400-italic */
@font-face {
  font-family: 'Public Sans';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url(./public-sans-vietnamese-400-italic-BxGMV3P9.woff2) format('woff2'), url(./public-sans-vietnamese-400-italic-BtoPYhHL.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* 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');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* 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');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* kalam-devanagari-400-normal */
@font-face {
  font-family: 'Kalam';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./kalam-devanagari-400-normal-Dy6c0U2e.woff2) format('woff2'), url(./kalam-devanagari-400-normal-Dyzod-UE.woff) format('woff');
  unicode-range: U+0900-097F,U+1CD0-1CF9,U+200C-200D,U+20A8,U+20B9,U+20F0,U+25CC,U+A830-A839,U+A8E0-A8FF,U+11B00-11B09;
}

/* 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');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* 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');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* kalam-devanagari-700-normal */
@font-face {
  font-family: 'Kalam';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(./kalam-devanagari-700-normal-BeU_-hjz.woff2) format('woff2'), url(./kalam-devanagari-700-normal-B52CSkpd.woff) format('woff');
  unicode-range: U+0900-097F,U+1CD0-1CF9,U+200C-200D,U+20A8,U+20B9,U+20F0,U+25CC,U+A830-A839,U+A8E0-A8FF,U+11B00-11B09;
}

/* 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');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* 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');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* 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');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* 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');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* 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');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* 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');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* 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');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* 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');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* 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');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* 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');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* 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.edible { background: var(--ok-chip-bg); color: var(--ok-chip); border-color: var(--ok-chip-line); }
.badge.inedible { background: transparent; color: var(--muted); border: 1.5px dashed var(--outline); }
.badge.toxic { background: var(--card); color: var(--red); border-color: var(--red); }
.badge.deadly { 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; }
/* Correction contrastive (screens/quiz.ts) : l'espèce choisie à gauche, la bonne à droite, puis ce qui les sépare */
.contrast { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cside { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.cside .clab { font-size: .6875rem; font-weight: 700; letter-spacing: .08em; line-height: 1.3; text-transform: uppercase; color: var(--red); }
.cside.good .clab { color: var(--ink); }
.cside .mini { margin: 2px 0 4px 3px; }
.cside.good .mini { transform: rotate(2deg); }
.cside .cn { font-size: 1rem; line-height: 1.25; font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.cside.good .cn { color: var(--ink); }
.tipbox .t1 .hand { color: var(--ink); font-size: .95rem; line-height: 1.2; }
/* Annonce des sosies parmi les mauvaises réponses (bilan des paliers 2, 3 et 5) */
.ilnote { border-left-color: var(--mid); }
/* Réviser, première question : pourquoi la série mêle espèces à revoir et acquises */
.rwhy { flex: none; font-size: .95rem; line-height: 1.25; color: var(--ink); }

/* 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; }

.species-sheet { gap: 12px; }
.species-sheet .polaroid { width: min(100% - 12px, 340px); padding-bottom: 9px; transform: rotate(-1deg); margin-top: 8px; }
.species-sheet .ph { height: auto; aspect-ratio: 4 / 3; }
/* Galerie de la fiche : vignettes sous la grande photo, l'actuelle soulignée d'un trait d'encre */
.gallery { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
.gthumb { flex: none; width: 48px; height: 48px; padding: 0; border: 0; background: var(--line); cursor: pointer; opacity: .65; box-shadow: 0 0 0 1px var(--line); transition: opacity .15s; }
.gthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gthumb[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--ink); }
.gthumb:hover { opacity: 1; }
.gthumb:focus-visible { outline-offset: 2px; }
.species-sheet h2 { font-size: 1.5rem; color: var(--ink); }
.species-sheet dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .875rem; }
.species-sheet dt { color: var(--muted); }
.species-sheet dd { margin: 0; }
.species-sheet .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 */
.journey .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); }
.journey h1 { font-size: 1.875rem; line-height: 1.13; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.journey .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; }
  .sheet.fit2 .cside .mini img { width: 36px; height: 36px; }
  .sheet.fit3 .cside .mini { 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%; }
  .species-sheet .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; }
.zoom .zreport { min-height: 36px; color: #F2F4F0; font-size: .8125rem; }
.zoom .zreport:focus-visible { outline-color: #E2AD4C; }

/* « Signaler une erreur » (report.ts) : lien discret au bas des panneaux de réponse, boîte de dialogue « page de carnet » */
.rpline { margin: 0; }
.rpline .linkbtn { min-height: 36px; color: var(--muted); font-weight: 500; }
.splinks .rpbtn { color: var(--muted); font-weight: 500; }
.report { width: calc(100% - 32px); max-width: 440px; max-height: calc(100% - 32px); margin: auto; padding: 0; border: 0; border-top: 2px solid var(--ink); border-radius: 6px;
  background: var(--card); color: var(--text); box-shadow: 0 6px 20px rgb(0 0 0 / .25); overflow: auto; overscroll-behavior: contain; }
.report::backdrop { background: var(--scrim); }
.rpform { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.rpform h2 { font-size: 1.25rem; }
.rpabout b { color: var(--text); }
.rpcats { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; }
.rpcats legend { padding: 0; margin-bottom: 4px; }
.rpcat { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.rpcat input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.rpcat input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.rplabel { font-size: .875rem; font-weight: 600; }
.rpcomment { width: 100%; min-height: 84px; resize: vertical; border: 1.5px solid var(--outline); border-radius: 10px; padding: 10px 12px; background: var(--paper); color: var(--text); font: 400 1rem/1.4 var(--ui); }
.rpcomment:focus { outline: 3px solid var(--focus); outline-offset: 1px; }
.rpmeta { display: flex; justify-content: space-between; gap: 12px; margin-top: -6px; font-size: .75rem; color: var(--muted); }
.rpmeta #rp-count { flex: none; font-variant-numeric: tabular-nums; }
.rperr { color: var(--red); font-size: .875rem; font-weight: 600; }
.rperr:empty { display: none; }

::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-family .fams { gap: 8px; }
.k-family .fams .ans { min-height: 52px; border-radius: 12px; padding: 4px 10px; gap: 10px; }
.k-family .fams .ans.right { padding: 3.5px 9.5px; }
.k-family .fams .nm { font-size: .9375rem; font-weight: 600; line-height: 1.2; }
.k-family .fams .nm .more { font-weight: 400; color: var(--muted); }
.fic { flex: none; width: 26px; height: 26px; color: var(--ink); }
.k-family.done .prompt, .k-family.done .ans.dim, .k-family.done .fic, .k-family.done .nm .more { display: none; }
.k-family.done .fams .ans { grid-column: auto; min-height: 48px; }
.k-family.done .fams .ans.solo { grid-column: 1 / -1; }
.k-family .fams .ans.wrong { border: 2px solid var(--red); background: var(--red-soft); padding: 3.5px 9.5px; }
.k-family .fams .ans.wrong .nm { color: var(--red); }
.k-family .fams .ans.right .nm { font-weight: 700; }
.k-family .fams .why { display: inline; font-size: .875rem; transform: none; }
.k-family .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-family .fams { gap: 6px; }
  .k-family .fams .ans { min-height: 46px; }
  .k-family.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, .home-more.pad { padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px)); }
/* Présentation et liens repris de index.html (voir screens/home.ts), sous le premier écran de l'accueil : on les voit en
   faisant défiler, sans prendre de hauteur au champignon du jour. */
.home-more { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 16px); }
.home-more .seo-intro { display: grid; gap: 6px; }
.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; }
/* Réviser (dès quelques espèces rencontrées) : toute la largeur, nom à gauche, espèces à revoir à droite */
.tile.review { grid-column: 1 / -1; height: 44px; padding: 0 12px; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
.tile.review .tn { flex: none; }
.tile.review .tr { min-width: 0; text-align: right; }
.tile.review.due .tr { color: var(--ink); font-weight: 700; }
.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-family.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.inedible { 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; }
}

/* ---------- Rétention : pastille de la série, statistiques et défis passés (screens/daily.ts) ---------- */
/* La pastille de l'en-tête de l'accueil est un bouton : il ouvre les statistiques ; sa zone de toucher couvre l'en-tête */
button.streak { position: relative; }
button.streak::after { content: ""; position: absolute; inset: -6px -4px; }
@media (hover: hover) and (pointer: fine) { button.streak:not(.on):hover { background: var(--ink-soft); } }
.dstats .card { gap: 12px; }
.dcells { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; text-align: center; }
.dcell { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px; min-width: 0; }
.dcell dd { margin: 0; font-size: 2rem; }
.dcell dt { font-size: .6875rem; line-height: 1.25; color: var(--muted); overflow-wrap: break-word; hyphens: auto; }
.drest { display: flex; align-items: center; gap: 8px; font-size: .875rem; }
.drest svg { width: 18px; height: 18px; flex: none; color: var(--ink); }
.drest b { font: 700 1.125rem/1 var(--hand); color: var(--ink); }
.dstats .dnote { text-align: left; }
.dhist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.dhist li { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 8px; }
.dhist .hk { font: 700 1rem/1 var(--hand); color: var(--ink); text-align: center; }
.dhist .hk svg { width: 13px; height: 13px; stroke-width: 3; color: var(--muted); }
.hbar { display: flex; align-items: center; gap: 6px; min-height: 22px; }
.hbar i { display: block; height: 18px; min-width: 3px; border-radius: 2px; background: var(--ink); }
.hbar b { font-size: .8125rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.dhist .miss .hbar i { background: var(--mid); }
.dscore { display: flex; flex-direction: column; gap: 2px; }
.dscore .dname { font-size: .9375rem; white-space: normal; }
.dscore .dval { font-size: .875rem; color: var(--muted); }
.dscore .dval b { font: 700 1.25rem/1 var(--hand); color: var(--ink); }
.archive { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; }
.archive h2 { font-size: 1.0625rem; font-weight: 700; }
.alist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.arow { width: 100%; min-height: 52px; border-radius: 10px; padding: 6px 12px; background: var(--card); box-shadow: var(--shadow); display: flex; align-items: center; gap: 10px; text-align: left; }
.arow:active { transform: translate(1px, 1px); }
.atx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adate { font-size: .9375rem; font-weight: 700; line-height: 1.3; }
.ano { font-size: .75rem; line-height: 1.3; color: var(--muted); }
.arest { flex: none; font-size: .9375rem; color: var(--ink); }
.adots { flex: none; display: flex; gap: 5px; }
.adots i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--outline); }
.adots i.on { background: var(--ink); border-color: var(--ink); }
.aday-sheet { display: flex; flex-direction: column; gap: 10px; }
.aday-sheet h2 { font-size: 1.375rem; color: var(--ink); }
.aday-sheet .hand { font-size: 1rem; color: var(--muted); }
.adays { display: flex; flex-direction: column; gap: 8px; }
.dsmall.aday { width: 100%; padding: 0 12px; }
.aday .ago { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: .875rem; font-weight: 700; color: var(--ink); }
.aday .ago svg { width: 15px; height: 15px; }
@media (hover: hover) and (pointer: fine) { .arow:hover, .dsmall.aday:hover { box-shadow: 0 3px 8px rgb(28 38 32 / .22); } }

/* Badges de maîtrise, en bas de l'herbier */
.badges { margin-top: 22px; }
.badges h2:focus { outline: none; }
.blist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.blist li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start; }
.bseal { width: 40px; height: 40px; border-radius: 50%; border: 1.5px dashed var(--outline); display: grid; place-items: center; color: var(--on-ink); transform: rotate(-8deg); }
.bseal svg { width: 18px; height: 18px; stroke-width: 3; }
.blist .done .bseal { border: 2px solid var(--ink); background: var(--ink); }
.btx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bn { font-size: .9375rem; font-weight: 700; }
.blist li:not(.done) .bn { color: var(--muted); }
.bd { font-size: .8125rem; line-height: 1.35; color: var(--muted); }
.bp { font: 400 .9375rem/1.25 var(--hand); color: var(--ink); }
.btx .meter { margin-top: 2px; height: 6px; }

/* Sauvegarder ou transférer la progression (À propos) */
.xout { display: flex; flex-direction: column; gap: 10px; }
.xcode { width: 100%; min-height: 72px; resize: vertical; padding: 8px 10px; border: 1.5px solid var(--outline); border-radius: 6px; background: var(--paper); color: var(--text);
  font: .75rem/1.4 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; overflow-wrap: anywhere; word-break: break-all; }
.xcode:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.xlab { font-size: .875rem; font-weight: 600; padding-top: 6px; }
.qr { margin: 0 auto; width: min(100%, 300px); padding: 6px; background: #fff; border-radius: 4px; box-shadow: var(--shadow); }
.qr svg { display: block; width: 100%; height: auto; }
.xmsg:empty { display: none; }

/* ---------- Contenu pédagogique (manches du mois, grille du champignon du jour, fiche, apprendre, bons réflexes) ---------- */

/* Accueil : « Champignons du mois » et défi thématique, deux demi-tuiles basses sous les jeux */
.seasons { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tile.season { height: 44px; padding: 0 10px; }
.tile.season.done .tr { color: var(--ink); font-weight: 700; }
.homelinks, .hlinks, .splinks { display: flex; flex-wrap: wrap; gap: 0 16px; margin: 0; }

/* Champignon du jour : chaque essai raté suivi de sa ligne de caractères, comparés à la réponse (comme Birdle) */
.mguess.mgrid { flex-direction: column; flex-wrap: nowrap; gap: 4px; }
.mguess.mgrid li { display: flex; align-items: center; gap: 8px; border-radius: 10px; padding: 3px 6px 3px 8px; max-width: 100%; }
.mguess.mgrid .mname { flex: none; display: inline-flex; align-items: center; gap: 6px; max-width: 34%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mcells { flex: 1; min-width: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, #000 88%, transparent); mask-image: linear-gradient(to right, #000 88%, transparent); padding-right: 16px; }
.mcells::-webkit-scrollbar { display: none; }
.mc { flex: none; border-radius: 6px; padding: 0 6px; font-size: .75rem; font-weight: 600; line-height: 1.6; white-space: nowrap; background: var(--card); color: var(--muted); border: 1.5px solid var(--line); }
.mc.same { background: var(--ok-chip-bg); color: var(--ok-chip); border-color: var(--ok-chip); }
.mc.partial { background: var(--same-bg); color: var(--same); border-color: var(--same); }
.mc.different { opacity: .8; }
.mc.unknown { border-style: dashed; color: var(--muted); }

/* Fiche : légende du stade de la photo, calendrier de fructification, mots du glossaire */
.gthumb { position: relative; }
.gstage { position: absolute; left: 0; right: 0; bottom: 0; background: rgb(0 0 0 / .55); color: #fff; font-size: .5625rem; font-weight: 700; line-height: 1.5; text-align: center; overflow: hidden; white-space: nowrap; }
.pstage { position: absolute; right: 8px; bottom: 6px; padding: 0 8px; border-radius: 10px; background: rgb(0 0 0 / .55); color: #fff; font-size: 1rem; line-height: 1.4; }
.fcal { display: flex; flex-direction: column; gap: 6px; }
.fcal .months { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; }
.fcal .months li { display: grid; place-items: center; height: 26px; border-radius: 4px; border: 1.5px solid var(--line); color: var(--muted); font-size: .75rem; font-weight: 700; }
.fcal .months li.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.fcal .months li.now { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--focus, var(--ink)); }
.fcal-txt { font-size: .875rem; font-weight: 600; }
.gterm { display: inline; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-decoration: underline dotted; text-decoration-thickness: 1.5px; text-underline-offset: 3px; cursor: pointer; }
.gterm[aria-expanded="true"] { color: var(--ink); text-decoration-style: solid; }
.gdef { margin: 4px 0; padding: 8px 10px; border-left: 3px solid var(--mid); background: var(--card); font-size: .84rem; line-height: 1.4; font-weight: 400; display: flex; flex-direction: column; gap: 0; }
.gdef .linkbtn { min-height: 36px; }

/* Comparateur sans note : 2 à 4 colonnes, une ligne par caractère ; celles qui diffèrent ressortent */
.compare-sheet { display: flex; flex-direction: column; gap: 10px; }
.compare-sheet h2 { font-size: 1.375rem; color: var(--ink); }
.cmp-heads, .cmp-row { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 4px 8px; }
.cmp-sp { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cmp-sp .badge { align-self: flex-start; max-width: 100%; }
.cmp-open, .cmp-self, .cmp-sp > a { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; background: none; text-align: left; color: inherit; text-decoration: none; }
.cmp-sp img { width: 100%; aspect-ratio: 1; height: auto; object-fit: cover; display: block; background: var(--line); box-shadow: var(--shadow-photo); }
.cmp-sp .n { font-size: .875rem; font-weight: 700; line-height: 1.25; color: var(--ink); overflow-wrap: anywhere; }
.cmp-tip { margin: 0; font-size: .75rem; line-height: 1.35; color: var(--muted); }
.cmp-rows { margin: 0; display: flex; flex-direction: column; }
.cmp-row { padding: 6px 0; border-top: 1px solid var(--line); }
.cmp-row dt { grid-column: 1 / -1; font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cmp-row dd { margin: 0; min-width: 0; font-size: .8125rem; line-height: 1.35; overflow-wrap: break-word; hyphens: auto; }
.cmp-row:not(.same) dd { font-weight: 700; }
.cmp-row.same dd { color: var(--muted); }
.cmp-row .unk { color: var(--muted); font-style: italic; font-weight: 400; }
.cmp-diff { margin-left: 4px; padding: 0 6px; border-radius: 8px; background: var(--same-bg); color: var(--same); letter-spacing: 0; text-transform: none; }
.cmp-row .badge { font-size: .6875rem; padding: 0 5px; white-space: normal; max-width: 100%; }
.cmp-row .badge svg { display: none; }
.rcmp { margin-top: -6px; }

/* Apprendre : leçons, glossaire, syndromes */
.learn, .safety { display: flex; flex-direction: column; gap: 16px; }
.learn .phead .filters, .learn nav.filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.learn nav .fchip { display: inline-flex; align-items: center; text-decoration: none; }
.lsec { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; scroll-margin-top: 12px; }
.lsec h2 { font-size: 1.25rem; color: var(--ink); }
.lsec h2:focus, .gitem:focus { outline: none; }
.llist { display: flex; flex-direction: column; gap: 6px; }
.lrow .lok, .lrow.done .ano { color: var(--ink); }
.lok svg { width: 20px; height: 20px; }
.slong { flex: none; display: inline-block; border-radius: 8px; padding: 0 7px; background: var(--red-soft, var(--card)); color: var(--red); font-size: .75rem; font-weight: 700; line-height: 1.6; }
.glist { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.gitem { padding: 10px 12px; background: var(--card); border-radius: 4px; box-shadow: var(--shadow); scroll-margin-top: 12px; }
.gitem:target, .gitem:focus-within { box-shadow: var(--shadow), inset 3px 0 0 var(--ink); }
.gitem dt { font-family: var(--hand); font-size: 1.25rem; color: var(--ink); line-height: 1.2; }
.gitem dd { margin: 4px 0 0; font-size: .875rem; line-height: 1.45; display: flex; flex-direction: column; gap: 8px; }
.minis { display: flex; flex-wrap: wrap; gap: 8px; }
.msp { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; max-width: 100%; text-align: left; }
.msp .mini img { width: 44px; height: 44px; }
.msp .n { font-size: .8125rem; font-weight: 700; }
.msp .badge { font-size: .6875rem; padding: 0 5px; }
.msp .badge svg { display: none; }
.ltext { gap: 12px; font-size: .9375rem; line-height: 1.55; }
.lesson .btns .note { text-align: center; }
.srclist { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: .8125rem; overflow-wrap: anywhere; }
.srclist a { color: var(--ink); }
.syndrome-sheet { display: flex; flex-direction: column; gap: 10px; }
.syndrome-sheet h2 { font-size: 1.375rem; color: var(--ink); }
.syndrome-sheet .hand { font-size: 1rem; color: var(--muted); }
.sdl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .875rem; }
.sdl dt { color: var(--muted); }
.sdl dd { margin: 0; }
.warn .tosafety { display: inline; min-height: 0; padding: 0; margin-top: 4px; }
.fine .tosafety { min-height: 0; font-size: inherit; }

/* Bilan du défi thématique : calendrier des défis de l'année */
.tcal ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tcal li { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: .875rem; }
.tcal li:first-child { border-top: 0; }
.tcal .tm { color: var(--muted); text-transform: capitalize; }
.tcal .tt { font-weight: 600; }
.tcal li.now .tt, .tcal li.now .tm { color: var(--ink); font-weight: 700; }
.tcal .tnow { color: var(--ink); font-size: 1rem; }
.tcal .tok { color: var(--ink); }
.tcal .tok svg { width: 18px; height: 18px; }

/* Les bons réflexes : numéros d'urgence (bouton d'appel), réflexes, sources */
.country { font-size: .9375rem; font-weight: 700; margin-top: 4px; }
.centers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.center { display: flex; align-items: center; gap: 10px; }
.center .ctx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ckind { font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cname { font-size: .875rem; font-weight: 600; line-height: 1.3; }
.csub { font-size: .75rem; color: var(--muted); line-height: 1.3; }
.btn.call { width: auto; flex: none; min-height: 44px; padding: 0 12px; gap: 6px; font-size: .9375rem; white-space: nowrap; text-decoration: none; }
.reflexes { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: .875rem; line-height: 1.45; }

/* Réglages (À propos) : nom affiché en pastilles, cases à cocher d'une ligne avec leur explication */
.setgrp { display: flex; flex-direction: column; gap: 4px; }
.setgrp .label { padding-top: 4px; }
.setgrp .filters { flex-wrap: wrap; overflow: visible; }
.setrow { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); cursor: pointer; }
.setrow input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); }
.setrow input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.setrow .st { display: flex; flex-direction: column; gap: 1px; }
.setrow .sl { font-size: .9375rem; font-weight: 600; }
.setrow .sd { font-size: .8125rem; color: var(--muted); }
/* Nom secondaire sous un choix (réglage « les deux ») */
.ans .ds.sci { font-style: italic; }

/* Herbier : recherche par nom, nom vernaculaire ou nom latin */
.hsearch { position: relative; padding-top: 4px; }
.hsearch .minput { background: var(--card); }
.spc .via { font: 400 .8125rem/1.2 var(--hand); color: var(--muted); overflow-wrap: anywhere; }
.msug .via { font: 400 .8125rem/1.2 var(--hand); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Quiz sur mesure : sources en pastilles, liste à cocher des espèces, lien à partager */
.custom .card { display: flex; flex-direction: column; gap: 10px; }
.custom .filters { flex-wrap: wrap; overflow: visible; }
.custom select, .custom input[type="text"] { width: 100%; min-height: 44px; border: 1.5px solid var(--outline); border-radius: 10px; padding: 0 12px; background: var(--paper); color: var(--text); font: 500 1rem var(--ui); }
.custom select:focus-visible, .custom input[type="text"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.ccount { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ccount b { font-size: 1rem; color: var(--ink); }
.cpicks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; max-height: 360px; overflow-y: auto; overscroll-behavior: contain; padding: 2px; }
.cpick { min-width: 0; display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 10px; padding: 4px 8px 4px 4px; background: var(--card); text-align: left; }
.cpick img { flex: none; width: 36px; height: 36px; border-radius: 6px; object-fit: cover; background: var(--line); }
.cpick .cn { min-width: 0; font-size: .8125rem; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.cpick .cbox { flex: none; margin-left: auto; width: 20px; height: 20px; border: 1.5px solid var(--outline); border-radius: 5px; display: grid; place-items: center; color: var(--on-ink); }
.cpick .cbox svg { width: 14px; height: 14px; stroke-width: 3; }
.cpick[aria-pressed="true"] { border-color: var(--ink); background: var(--ink-soft); }
.cpick[aria-pressed="true"] .cbox { background: var(--ink); border-color: var(--ink); }
.ctitle { font: 700 1.25rem/1.25 var(--ui); color: var(--ink); overflow-wrap: anywhere; }
.cfam { display: flex; align-items: center; gap: 10px; font-size: .9375rem; font-weight: 600; cursor: pointer; }
.cfam input { width: 22px; height: 22px; margin: 0; accent-color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .cpick:hover { border-color: var(--ink); } }

/* Couleurs pour daltoniens (réglage « contrast », classe « cb » posée par src/settings.ts) : bleu pour juste, vermillon pour faux,
   orange pour presque (palette Okabe-Ito, valeurs de CONTRAST_COLORS dans @mushquiz/core). Le retour garde toujours son
   signe (coche, croix, ≈) et son texte : la couleur n'est jamais seule. Les mises en garde de danger restent en rouge. */
html.cb { --right: var(--cb-right-light); --wrong: var(--cb-wrong-light); --near: var(--cb-near-light); }
@media (prefers-color-scheme: dark) { html.cb:not([data-theme="light"]) { --right: var(--cb-right-dark); --wrong: var(--cb-wrong-dark); --near: var(--cb-near-dark); } }
html.cb[data-theme="dark"] { --right: var(--cb-right-dark); --wrong: var(--cb-wrong-dark); --near: var(--cb-near-dark); }
.cb .ans.right { border-color: var(--right); }
.cb .ans.right .nm, .cb .ans.right .mark, .cb .pans.right .pcap, .cb .pans.right svg.mark { color: var(--right); }
.cb .pans.right { border-color: var(--right); }
.cb .ans.wrong, .cb .pans.wrong { border-color: var(--wrong); }
.cb .ans.wrong .k, .cb .ans .why, .cb .pans.wrong .pcap, .cb .pans.wrong .k, .cb .pans.wrong svg.mark { color: var(--wrong); }
.cb .ans.wrong .nm::after { background: var(--wrong); }
.cb .sheet.ok .sstamp, .cb .sheet.ok .verdict, .cb .panel.ok .verdict { border-color: var(--right); color: var(--right); }
.cb .panel.ok .pstamp { border-color: var(--right); color: var(--right); }
.cb .sheet.ko .sstamp, .cb .panel.ko .pstamp { border-color: var(--wrong); color: var(--wrong); }
.cb .sheet.ko .verdict, .cb .panel.ko .verdict, .cb .cside .clab { color: var(--wrong); }
.cb .cside.good .clab, .cb .cside.good .cn { color: var(--right); }
.cb .xbtn.right { box-shadow: 0 0 0 3px var(--card), 0 0 0 6px var(--right); }
.cb .xbtn.wrong { border-color: var(--wrong); color: var(--wrong); }
.cb .fb-ok .xshot { outline-color: var(--right); }
.cb .fb-ko .xshot { outline-color: var(--wrong); }
.cb .fb-ok .xmark { border-color: var(--right); color: var(--right); }
.cb .fb-ko .xmark, .cb .fb-ko .ginfo #xstreak, .cb .rstamp.ko { border-color: var(--wrong); color: var(--wrong); }
.cb .fb-ko .gbar .bar i { background: var(--wrong); }
.cb .pshot.right { box-shadow: 0 0 0 3px var(--right), var(--shadow-photo); }
.cb .pshot.wrong.mine { box-shadow: 0 0 0 3px var(--wrong), var(--shadow-photo); }
.cb .right .pltr2, .cb .right .pmine { background: var(--right); color: var(--card); }
.cb .wrong .pmine { background: var(--wrong); color: var(--card); }
.cb .k-family .fams .ans.wrong { border-color: var(--wrong); }
.cb .k-family .fams .ans.wrong .nm { color: var(--wrong); }
.cb .mc.same { border-color: var(--right); color: var(--right); background: var(--card); }
.cb .mc.partial, .cb .mguess li.same { border-color: var(--near); color: var(--near); background: var(--card); }
/* Signe de la grille du champignon du jour (coche : identique, ≈ : en partie) */
.mc .mk { margin-right: 3px; font-weight: 700; }
