/* hinoko v2 : ludique et accessible. Corail pour l'action, cyan pour la flamme, titres arrondis très gras.
   Palette, typographie, composants et lecture : DESIGN.md §1 à §4. Rien n'est chargé d'un tiers : Nunito
   (OFL, police variable 200 à 1000, assets/fonts/) est servie par le site ; le japonais garde ses polices
   du système (丸ゴシック par défaut).
   Le thème (data-theme), la police du japonais (data-jpfont) et la taille du texte (--ja-size)
   sont posés sur <html> par assets/boot.js avant le premier rendu. */

/* Vietnamien (ạ ầ ệ ọ ư…, que latin-ext saute : U+1EA0 à U+1EF1) : sous-ensemble officiel de Google Fonts (OFL). */
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap; src: url(fonts/nunito-vietnamese.d107f72673.woff2) format("woff2"); 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; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap; src: url(fonts/nunito-latin-ext.511ce96737.woff2) format("woff2"); 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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap; src: url(fonts/nunito-latin.20fc9b6fc6.woff2) format("woff2"); 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; }

:root {
  color-scheme: light;
  --bg: #FFF7F3;
  --page: #FFFBF8;
  --surface: #FFFFFF;
  --surface-2: #FFF0EA;
  --line: #FBE3DA;
  --ink: #2B1D2E;
  --ink-2: #5B4A5E;
  --ink-3: #76637A;
  --coral: #F2553F;
  --coral-deep: #C93A22;
  --on-coral: #FFFFFF;           /* 3,4:1 sur --coral : seulement des libellés gras de 19 px et plus */
  --coral-text: #C2412D;
  --coral-soft: #FFE7DF;
  --coral-soft-ink: #7A2E1F;
  --cyan: #38C6F4;
  --cyan-soft: #DDF6FD;
  --cyan-soft-ink: #0B5E79;
  --sun: #FFC93C;
  --sun-soft: #FFF1C2;
  --sun-soft-ink: #7A5400;
  --ok: #13643D;
  --ok-soft: #C9F2DC;
  --ko: #A61B3F;
  --ko-soft: #FDE2E7;
  /* Niveaux du JLPT, aux couleurs de leurs badges (assets/badge-n5-96.webp…, bloc b9-badges) : N5 vert, N4 bleu, N3
     violet, N2 orange doré, N1 rouge. --nX : le trait (bordure, barre) ; --nX-soft : le fond ; --nX-ink : le texte sur
     ce fond (de 6,9 à 7,7:1 en clair, de 7,3 à 9,6:1 en sombre, sur la page comme sur les cartes). */
  --n5: #2BB98A;
  --n5-soft: #DCF5EA;
  --n5-ink: #0D5C43;
  --n4: #3C8EF0;
  --n4-soft: #E1EEFD;
  --n4-ink: #1A4F94;
  --n3: #9259E8;
  --n3-soft: #EFE6FC;
  --n3-ink: #5A2A9C;
  --n2: #F2A520;
  --n2-soft: #FFF0CC;
  --n2-ink: #7A4600;
  --n1: #EE4D4D;
  --n1-soft: #FFE4E1;
  --n1-ink: #8F1E24;
  --hover: rgba(43, 29, 46, 0.05);
  --lift: 0 3px 0 var(--line);   /* liseré sous les cartes, en clair seulement */
  --shadow: 0 2px 6px rgba(43, 29, 46, 0.06), 0 18px 40px rgba(43, 29, 46, 0.14);   /* panneaux flottants */

  --round: "Nunito", ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", system-ui, sans-serif;
  --ui: var(--round);
  --w-body: 600;                 /* corps : Nunito SemiBold (DESIGN.md §2) */
  --jp-mincho: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP", "Noto Serif CJK JP", serif;
  --jp-gothic: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, "Noto Sans JP", "Noto Sans CJK JP", sans-serif;
  --jp-maru: "Hiragino Maru Gothic ProN", "Zen Maru Gothic", "Hiragino Sans", "Yu Gothic", YuGothic, "Noto Sans JP", sans-serif;
  --jp: var(--jp-maru);

  --ja-size: 22px;               /* texte des histoires : 22 px, 20 sur téléphone, réglable de 17 à 30 */
  --radius: 20px;

  /* Médailles des badges (DESIGN.md §7) : des dessins, identiques dans les deux thèmes (disque coloré, bord bleu
     nuit, symbole et chiffre bleu nuit sur pastille blanche ; contrastes ≥ 5,9:1). */
  --medal-ink: #1E2A4A;
  --medal-plate: #FFFFFF;
  --medal-streak: #FF8A73;
  --medal-words: #FFD866;
  --medal-perfect: #86E0AE;
  /* Flamme de la carte « Série » (bloc b10-petits) : contour bleu nuit de la mascotte, deux bleus en aplat (le corps,
     le cœur), reflet blanc ; en veille (série à 0), des bleus plus clairs et une étincelle (--sun). */
  --flame-line: #14193A;
  --flame-glint: #FFFFFF;
  --flame-body: #62D9F6;
  --flame-core: #C6F2FB;
  --flame-rest-body: #A9E8F8;
  --flame-rest-core: #E3F9FD;
  --on-cyan: #0F2F3A;            /* texte sur `cyan` plein (pastilles de la semaine) : 7,9:1 et 10:1 */
  --violet-soft: #F1E7FB;        /* groupe 3 des verbes (listes du JLPT) */
  --violet-soft-ink: #5B2D83;
  /* Tableau de prof (pages d'apprentissage) : une ardoise, les mêmes couleurs dans les deux thèmes ; craie ≥ 6:1. */
  --board: #273B40;
  --board-frame: #B98A5E;
  --board-ink: #F6F2E9;
  --board-dim: #C3CFCB;
  --board-coral: #FFA390;
  --board-cyan: #8EDCF5;
  --board-sun: #FFD866;
  --scrim: rgba(43, 29, 46, 0.42);   /* fond derrière la fenêtre « Nouveau badge » */
}

:root[data-jpfont="gothic"] { --jp: var(--jp-gothic); }
:root[data-jpfont="mincho"] { --jp: var(--jp-mincho); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1C1517;
    --page: #201819;
    --surface: #2A2123;
    --surface-2: #352A2D;
    --line: #3A2E31;
    --ink: #F6EDEA;
    --ink-2: #C9BCC0;
    --ink-3: #A3949A;
    --coral: #FF8A73;
    --coral-deep: #D8644F;
    --on-coral: #2A0F0A;
    --coral-text: #FF9B86;
    --coral-soft: rgba(255, 138, 115, 0.16);
    --coral-soft-ink: #FFB9A9;
    --cyan: #7DD8F5;
    --cyan-soft: rgba(125, 216, 245, 0.15);
    --cyan-soft-ink: #9FE3F8;
    --sun: #FFD866;
    --sun-soft: rgba(255, 216, 102, 0.15);
    --sun-soft-ink: #FFE08A;
    --violet-soft: rgba(196, 160, 245, 0.16);
    --violet-soft-ink: #DCC7F9;
    --ok: #86E0AE;
    --ok-soft: rgba(134, 224, 174, 0.15);
    --ko: #FF9DB4;
    --ko-soft: rgba(255, 157, 180, 0.15);
    --flame-body: #7DD8F5;
    --flame-core: #CFF3FC;
    --flame-rest-body: #A3E2F6;
    --flame-rest-core: #DDF6FC;
    --n5: #5ED6A6;
    --n5-soft: rgba(94, 214, 166, 0.15);
    --n5-ink: #95EBC8;
    --n4: #78B4F7;
    --n4-soft: rgba(120, 180, 247, 0.16);
    --n4-ink: #B3D4FB;
    --n3: #B68DF3;
    --n3-soft: rgba(182, 141, 243, 0.17);
    --n3-ink: #DAC6FA;
    --n2: #FFC555;
    --n2-soft: rgba(255, 197, 85, 0.15);
    --n2-ink: #FFDB8F;
    --n1: #FF8080;
    --n1-soft: rgba(255, 128, 128, 0.15);
    --n1-ink: #FFB8B3;
    --hover: rgba(246, 237, 234, 0.06);
    --lift: none;
    --shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 18px 40px rgba(0, 0, 0, 0.5);
    --scrim: rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1C1517;
  --page: #201819;
  --surface: #2A2123;
  --surface-2: #352A2D;
  --line: #3A2E31;
  --ink: #F6EDEA;
  --ink-2: #C9BCC0;
  --ink-3: #A3949A;
  --coral: #FF8A73;
  --coral-deep: #D8644F;
  --on-coral: #2A0F0A;
  --coral-text: #FF9B86;
  --coral-soft: rgba(255, 138, 115, 0.16);
  --coral-soft-ink: #FFB9A9;
  --cyan: #7DD8F5;
  --cyan-soft: rgba(125, 216, 245, 0.15);
  --cyan-soft-ink: #9FE3F8;
  --sun: #FFD866;
  --sun-soft: rgba(255, 216, 102, 0.15);
  --sun-soft-ink: #FFE08A;
  --violet-soft: rgba(196, 160, 245, 0.16);
  --violet-soft-ink: #DCC7F9;
  --ok: #86E0AE;
  --ok-soft: rgba(134, 224, 174, 0.15);
  --ko: #FF9DB4;
  --ko-soft: rgba(255, 157, 180, 0.15);
  --flame-body: #7DD8F5;
  --flame-core: #CFF3FC;
  --flame-rest-body: #A3E2F6;
  --flame-rest-core: #DDF6FC;
  --n5: #5ED6A6;
  --n5-soft: rgba(94, 214, 166, 0.15);
  --n5-ink: #95EBC8;
  --n4: #78B4F7;
  --n4-soft: rgba(120, 180, 247, 0.16);
  --n4-ink: #B3D4FB;
  --n3: #B68DF3;
  --n3-soft: rgba(182, 141, 243, 0.17);
  --n3-ink: #DAC6FA;
  --n2: #FFC555;
  --n2-soft: rgba(255, 197, 85, 0.15);
  --n2-ink: #FFDB8F;
  --n1: #FF8080;
  --n1-soft: rgba(255, 128, 128, 0.15);
  --n1-ink: #FFB8B3;
  --hover: rgba(246, 237, 234, 0.06);
  --lift: none;
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 18px 40px rgba(0, 0, 0, 0.5);
  --scrim: rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: var(--w-body) 16px/1.6 var(--ui);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Interligne du japonais : de la place pour les furigana, plus serré sans eux. */
  --lh: 2.1;
}
body.no-furi { --lh: 1.7; }
body.reading { background: var(--page); }

a { color: inherit; }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--coral-text); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--coral-soft); color: var(--ink); }

/* Un seul cadre pour la barre du haut, les pages et le pied de page (1 072 px de contenu) : les bords du contenu tombent
   sous le logo et sous « Se connecter ». Les paragraphes de ces pages le remplissent aussi (2 ou 3 lignes en général,
   564 caractères au plus) ; seule l'accroche de l'accueil, à côté de la mascotte, garde 34em. Les textes longs gardent
   leur colonne étroite, centrée (.narrow : histoires, lecteur, 30 caractères japonais par ligne à 22 px). */
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 728px; }    /* colonne de lecture : 680 px */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- Barre du haut ------------------------------------------------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--line);
}
body.reading .top { position: relative; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.top .wrap { max-width: 1120px; display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; min-width: 44px; height: 44px; text-decoration: none; flex: none; border-radius: 12px; }
.brand img { width: 32px; height: 32px; display: block; margin: 0 auto; }
.brand b { font: 900 23px/1 var(--round); letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 6px; font-size: 15px; min-width: 0; }
.nav > a {
  display: inline-flex; align-items: center; height: 44px; padding: 0 14px; border-radius: 999px;
  color: var(--ink-2); font-weight: 800; text-decoration: none; white-space: nowrap;
}
.nav > a[aria-current] { background: var(--coral-soft); color: var(--coral-soft-ink); }
.count {
  display: inline-block; min-width: 24px; height: 24px; padding: 0 7px; margin-left: 7px; border-radius: 12px;
  background: var(--coral-text); color: var(--on-coral); font: 900 13px/24px var(--round); text-align: center;
}
.icon-btn {
  display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0;
  border: 2px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink);
  font: 900 16px/1 var(--round); cursor: pointer;
}
.icon-btn[aria-expanded="true"] { background: var(--coral-soft); border-color: var(--coral); color: var(--coral-soft-ink); }
.lang-select { position: relative; display: inline-flex; flex: none; }
.lang-select select {
  appearance: none; -webkit-appearance: none; height: 44px; padding: 0 32px 0 14px;
  border: 2px solid var(--line); border-radius: 999px; background: var(--surface);
  font: 800 14.5px/1 var(--round); color: var(--ink); cursor: pointer;
}
.lang-select::after {
  content: ""; position: absolute; right: 15px; top: 50%; width: 6px; height: 6px; margin-top: -5px;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); pointer-events: none;
}
/* Code de la langue, montré à la place du nom sur un téléphone étroit (le menu reste le vrai <select>). */
.lang-select .code { display: none; }

/* --- Compte dans la barre du haut : « Se connecter » ou le bouton rond (photo ou initiales) --- */
.acct { display: inline-flex; flex: none; }
.acct:empty { display: none; }
.signin {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 44px; padding: 0 16px;
  border: 2px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none;
  font: 800 14.5px/1 var(--round); white-space: nowrap;
}
.signin svg { display: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.avatar {
  display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; overflow: hidden;
  border: 0; border-radius: 50%; background: var(--coral-soft); color: var(--coral-soft-ink);
  font: 900 15px/1 var(--round); letter-spacing: 0.02em; cursor: pointer;
}
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 5px var(--coral); }
@media (hover: hover) {
  .signin:hover { background: var(--surface-2); }
  .avatar:hover { box-shadow: 0 0 0 2px var(--bg), 0 0 0 5px var(--line); }
  .avatar[aria-expanded="true"]:hover { box-shadow: 0 0 0 2px var(--bg), 0 0 0 5px var(--coral); }
}

/* Panneau du compte (même carte que les réglages) */
.panel.account { width: 340px; }
.acct-head { display: flex; align-items: center; gap: 12px; }
.avatar.lg { width: 52px; height: 52px; font-size: 18px; cursor: default; }
.acct-head .who { display: flex; flex-direction: column; min-width: 0; }
.acct-head .who b { font: 800 17px/1.35 var(--round); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-head .who span { font-size: 14px; line-height: 1.4; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-sync {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin-top: 16px; padding: 12px 14px;
  border-radius: 14px; background: var(--surface-2); font-size: 13.5px; line-height: 1.45; color: var(--ink-2);
}
.acct-sync .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); transform: translateY(-1px); }
.acct-sync[data-phase="syncing"] .dot, .acct-sync[data-phase="idle"] .dot { background: var(--cyan); }
.acct-sync[data-phase="pending"] .dot, .acct-sync[data-phase="offline"] .dot { background: var(--ink-3); }
.acct-sync[data-phase="error"] .dot { background: var(--ko); }
.acct-sync .txt { flex: 1; min-width: 0; }
.acct-sync .link { display: block; margin-top: 4px; font-size: 13.5px; }
.acct-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-top: 16px; }
.acct-danger { margin-top: 16px; padding-top: 10px; border-top: 2px solid var(--line); }
.acct-confirm { margin-top: 14px; padding-top: 14px; border-top: 2px solid var(--line); font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.acct-confirm p { margin: 0 0 6px; }
.acct-confirm .acct-q { color: var(--ink); font-weight: 800; }
.acct-confirm .acct-actions { justify-content: flex-end; margin-top: 14px; }
.acct-busy { margin: 16px 0 0; font-size: 14px; color: var(--ink-2); }
.acct-msg { margin: 12px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--ko); }

/* --- Éléments communs ---------------------------------------------- */
h1 { font: 900 clamp(36px, 6vw, 54px)/1.08 var(--round); letter-spacing: -0.015em; margin: 0 0 20px; }
.label { font: 800 13px/1.4 var(--round); letter-spacing: 0.06em; text-transform: uppercase; color: var(--coral-text); }

/* Boutons (DESIGN.md §2 bis) : secondaire = surface, bord et relief `line` ; principal = corail, relief
   `coralDeep` de 4 px ; à l'appui, le bouton descend de 2 px. Un seul principal par écran. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 24px;
  border: 2px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink);
  box-shadow: 0 3px 0 var(--line); text-align: center; text-decoration: none; cursor: pointer;
  font: 900 19px/1.2 var(--round); -webkit-tap-highlight-color: transparent;
  transition: transform .08s, box-shadow .08s;   /* pas la couleur : le changement de thème reste instantané */
}
.btn:active:not([disabled]) { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.btn.solid { background: var(--coral); border-color: var(--coral); color: var(--on-coral); box-shadow: 0 4px 0 var(--coral-deep); }
.btn.solid:active:not([disabled]) { transform: translateY(2px); box-shadow: 0 2px 0 var(--coral-deep); }
/* Petits boutons (fiche d'un mot, compte) : 44 px ; le principal y passe en corail doux (texte de 16 px). */
.btn.small { min-height: 44px; padding: 6px 16px; border-radius: 14px; font-size: 16px; }
.btn.solid.small { background: var(--coral-soft); border-color: var(--coral); color: var(--coral-soft-ink); box-shadow: 0 3px 0 var(--coral); }
.btn.solid.small:active:not([disabled]) { box-shadow: 0 1px 0 var(--coral); }
.btn.wide { width: 100%; }
.btn.danger { background: var(--ko); border-color: var(--ko); color: var(--surface); box-shadow: 0 3px 0 color-mix(in srgb, var(--ko) 68%, #000); }
.btn.danger:active:not([disabled]) { box-shadow: 0 1px 0 color-mix(in srgb, var(--ko) 68%, #000); }
/* Bouton qui se lit comme un lien (actions secondaires) */
.link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--coral-text); font: 800 14px/1.4 var(--round); text-align: left;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.link.danger { color: var(--ko); }
.link[disabled] { color: var(--ink-3); text-decoration: none; cursor: default; }
.btn svg { width: 11px; height: 11px; flex: none; color: var(--coral-text); }
.btn.solid svg { color: inherit; }
.btn[disabled] { opacity: .45; cursor: default; }
.chip {
  display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 999px;
  background: var(--surface-2); font: 700 13px/1.6 var(--round); color: var(--ink-2);
}
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font: 800 13px/1 var(--round); white-space: nowrap; }
.badge.lvl { background: var(--n5-soft); color: var(--n5-ink); }   /* le N5 ; les autres niveaux : [data-level], bloc b2-niveaux */

.jp { font-family: var(--jp); }
ruby { ruby-position: over; }
rt { font-family: var(--jp); font-size: max(0.5em, 9px); line-height: 1; font-weight: 400; letter-spacing: 0; color: var(--ink-2); }
.no-furi rt { display: none; }

footer { margin-top: 96px; border-top: 2px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 0 24px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 36px; font-size: 13.5px; color: var(--ink-3); }
footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); font-weight: 800; text-decoration: none; }

@media (hover: hover) {
  .nav > a:hover { color: var(--ink); background: var(--hover); }
  .nav > a[aria-current="page"]:hover { background: var(--coral-soft); color: var(--coral-soft-ink); }
  .icon-btn:hover, .lang-select select:hover { background: var(--surface-2); }
  .icon-btn[aria-expanded="true"]:hover { background: var(--coral-soft); }
  .btn:hover { background: var(--surface-2); }
  .btn.solid:hover { background: color-mix(in srgb, var(--coral) 88%, var(--coral-deep)); }
  .btn.solid.small:hover { background: color-mix(in srgb, var(--coral-soft) 70%, var(--coral) 12%); }
  .btn.danger:hover { background: color-mix(in srgb, var(--ko) 88%, #000); }
  .btn[disabled]:hover { background: var(--surface); }
  .btn.solid[disabled]:hover { background: var(--coral); }
  .link:not([disabled]):hover { text-decoration-thickness: 3px; }
  footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .story-card, .choice, .grade { transition: none; }
}

/* --- Réglages (apparence, police, taille, voix) ---------------------- */
.panel {
  position: fixed; z-index: 40; width: 340px; max-width: calc(100vw - 24px); padding: 20px 20px 22px;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.panel .field + .field { margin-top: 18px; }
.panel .lab { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 8px; font: 800 14px/1.3 var(--round); color: var(--ink-2); }
.panel .val { font: 900 15px/1 var(--round); color: var(--ink); }
.panel .lab .sub { font: 700 13px/1.3 var(--round); color: var(--ink-3); text-align: right; }
.size-row { display: flex; align-items: center; gap: 12px; }
.size-row input { flex: 1; min-width: 0; height: 44px; margin: 0; accent-color: var(--coral); cursor: pointer; }
.size-row .a-sm { font-size: 14px; color: var(--ink-2); }
.size-row .a-lg { font-size: 24px; color: var(--ink-2); }
/* Choix en pilules : le choisi a un anneau corail (pas seulement une couleur). */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); }
.seg button {
  min-height: 44px; padding: 0 6px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2);
  font: 800 14.5px/1.2 var(--round); white-space: nowrap; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--coral-soft-ink); box-shadow: inset 0 0 0 2px var(--coral); }
.seg .f-mincho { font-family: var(--jp-mincho); }
.seg .f-gothic { font-family: var(--jp-gothic); }
.seg .f-maru { font-family: var(--jp-maru); }
@media (hover: hover) { .seg button:hover:not([aria-pressed="true"]) { color: var(--ink); background: var(--hover); } }

/* --- Accueil -------------------------------------------------------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) clamp(220px, 30vw, 400px); gap: clamp(40px, 5vw, 64px); align-items: center; padding: 64px 0 52px; }
.eyebrow { font-size: 15px; font-weight: 700; color: var(--ink-2); margin: 0 0 18px; }
.eyebrow .jp { color: var(--coral-text); font-weight: 700; }
.lede { max-width: 34em; color: var(--ink-2); font-size: 18px; line-height: 1.6; margin: 0 0 30px; }
.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-art img { display: block; width: 100%; height: auto; }
/* Sous les boutons : trois chiffres (couverture du JLPT en corail, histoires, langues), puis les langues du site. */
.hero-facts { display: grid; grid-template-columns: repeat(3, minmax(0, max-content)); gap: 12px 36px; margin: 30px 0 0; padding: 0; list-style: none; }
.hero-facts li, .hero-facts a { display: flex; flex-direction: column; gap: 5px; }
.hero-facts a { color: inherit; text-decoration: none; }
.hero-facts b { font: 900 32px/1 var(--round); color: var(--ink); letter-spacing: -0.01em; white-space: nowrap; }
.hero-facts .cov b { color: var(--coral-text); }
.hero-facts span { max-width: 10.5em; font: 800 14px/1.3 var(--round); color: var(--ink-2); }
@media (hover: hover) { .hero-facts a:hover span { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; } }
.hero-langs { margin: 18px 0 0; font: 700 14px/1.8 var(--round); color: var(--ink-3); }
.hero-langs a { color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.hero-langs a[aria-current] { color: var(--ink); font-weight: 900; }
@media (hover: hover) { .hero-langs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; } }

.section { padding-top: 40px; margin-top: 16px; border-top: 2px solid var(--line); scroll-margin-top: 64px; }   /* ancre #histoires : sous la barre collante */
.section-title { font: 900 32px/1.15 var(--round); letter-spacing: -0.01em; margin: 0; }
/* En-tête de la liste : titre, « Bonjour {prénom} ! », mascotte « lecture » (cachée tant que la grande
   mascotte du haut est à l'écran : jamais deux mascottes visibles ensemble). */
.shelf-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.shelf-head .hello { margin: 4px 0 0; font: 800 16px/1.35 var(--round); color: var(--ink-2); }
.shelf-art { display: block; flex: none; width: 64px; height: 64px; }
.shelf-art.off { visibility: hidden; }

/* Niveaux en pilules : choisi = corail (libellé de 19 px très gras), autres = corail doux ; le nombre
   d'histoires dans une pastille blanche ; « bientôt » grisé. */
.levels { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 8px 0 18px;
  border: 0; border-radius: 999px; background: var(--coral-soft); color: var(--coral-soft-ink);
  font: 900 19px/1 var(--round); white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.pill .n {
  display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 9px; border-radius: 999px;
  background: var(--surface); color: var(--coral-soft-ink); font: 800 14px/1 var(--round);
}
.pill.soon { background: var(--surface-2); color: var(--ink-3); }
.pill.soon .n { color: var(--ink-3); font-weight: 700; }
a.pill { text-decoration: none; }
/* Pilule choisie : aria-pressed (bouton), aria-current (lien), ou, avant le JavaScript, le niveau de <html data-level>
   (assets/boot.js) dans la bibliothèque et les histoires proposées de l'accueil. Sans niveau choisi, aucune pilule
   dans la bibliothèque (tous les niveaux s'affichent), le N5 dans l'accueil. */
.pill[aria-pressed="true"], .pill[aria-current],
:root:not([data-level]) #sampleLevels .pill[data-level="N5"],
:root[data-level="N5"] :is(#levels, #sampleLevels) .pill[data-level="N5"],
:root[data-level="N4"] :is(#levels, #sampleLevels) .pill[data-level="N4"],
:root[data-level="N3"] :is(#levels, #sampleLevels) .pill[data-level="N3"],
:root[data-level="N2"] :is(#levels, #sampleLevels) .pill[data-level="N2"],
:root[data-level="N1"] #levels .pill[data-level="N1"],
:root[data-level="N1"] #sampleLevels .pill[data-level="N5"] { background: var(--coral); color: var(--on-coral); box-shadow: 0 3px 0 var(--coral-deep); }
.pill[aria-pressed="true"] .n, .pill[aria-current] .n,
:root:not([data-level]) #sampleLevels .pill[data-level="N5"] .n,
:root[data-level="N5"] :is(#levels, #sampleLevels) .pill[data-level="N5"] .n,
:root[data-level="N4"] :is(#levels, #sampleLevels) .pill[data-level="N4"] .n,
:root[data-level="N3"] :is(#levels, #sampleLevels) .pill[data-level="N3"] .n,
:root[data-level="N2"] :is(#levels, #sampleLevels) .pill[data-level="N2"] .n,
:root[data-level="N1"] #levels .pill[data-level="N1"] .n,
:root[data-level="N1"] #sampleLevels .pill[data-level="N5"] .n { color: var(--coral-text); }
@media (hover: hover) { .pill:hover:not([aria-pressed="true"]):not([aria-current]) { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--coral) 55%, transparent); } }

.theme { margin-top: 36px; }
.theme-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.theme-head h3 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 12px; margin: 0; font-weight: 400; }
.theme-head .ja-t { font: 700 21px/1.9 var(--jp); color: var(--ink); }
.theme-head .tr { font: 800 17px/1.4 var(--round); color: var(--ink-2); }
.theme-head .n-read { flex: none; font: 800 14px/1 var(--round); color: var(--ink-3); }

/* Histoires en cartes (DESIGN.md §4) : titre japonais gras, traduction, badge de niveau, minutes ; ✓ si lue. */
.story-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 10px; }
.story-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px 14px 18px;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--lift);
  color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; transition: transform .08s;
}
.story-card .body { flex: 1; min-width: 0; }
.story-card .t { font: 700 20px/1.85 var(--jp); color: var(--ink); }
.story-card .tr { font: 800 15.5px/1.35 var(--round); color: var(--ink-2); }
.story-card .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 8px; font: 700 13px/1.4 var(--round); color: var(--ink-3); }
.story-card:active { transform: translateY(2px); }
.check {
  display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--ok-soft); color: var(--ok); font: 900 17px/1 var(--round);
}
@media (hover: hover) { .story-card:hover { border-color: color-mix(in srgb, var(--coral) 50%, var(--line)); } }
.empty-level {
  margin-top: 22px; padding: 22px 24px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--lift); color: var(--ink-2); font-size: 16px; font-weight: 700;
}

/* --- Lecteur ---------------------------------------------------------- */
.story-head { padding: 44px 0 30px; }
.story-head h1 { font: 700 clamp(30px, 5.4vw, 40px)/1.85 var(--jp); letter-spacing: 0.02em; margin: 0; }
.story-head .title-tr { font: 800 21px/1.35 var(--round); color: var(--ink-2); margin: 4px 0 0; }
.story-head .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 16px; font: 700 14px/1.4 var(--round); color: var(--ink-3); }
.focus { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 12px; font: 700 13.5px/1.4 var(--round); color: var(--ink-3); }
.focus > span:first-child { margin-right: 4px; }
.focus .chip { font-family: var(--jp); font-weight: 400; font-size: 14px; }

.toolbar-bar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--page) 92%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
}
/* Trop étroit (allemand sur un petit téléphone) : « Aa » et « Écouter » passent à la ligne, rien ne déborde. */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; min-height: 60px; }
.toolbar .toggles { display: flex; gap: 4px; flex: none; }
.toolbar .sep { flex: 1; }
/* Interrupteurs : allumé = corail doux et anneau corail (la forme change, pas seulement la couleur). */
.toggle {
  height: 44px; padding: 0 13px; border: 0; border-radius: 999px; background: transparent;
  font: 800 14px/1 var(--round); color: var(--ink-2); cursor: pointer; white-space: nowrap;
}
.toggle[aria-pressed="true"] { background: var(--coral-soft); color: var(--coral-soft-ink); box-shadow: inset 0 0 0 2px var(--coral); }
.play-all {
  display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px 0 14px;
  border: 2px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink);
  font: 800 14px/1 var(--round); cursor: pointer; white-space: nowrap;
}
.play-all svg { width: 11px; height: 11px; color: var(--coral-text); }
.play-all[aria-pressed="true"] { background: var(--coral-soft); border-color: var(--coral); color: var(--coral-soft-ink); }
.play-all[aria-pressed="true"] svg { color: inherit; }
@media (hover: hover) {
  .toggle:hover:not([aria-pressed="true"]) { background: var(--hover); color: var(--ink); }
  .play-all:hover:not([aria-pressed="true"]) { background: var(--surface-2); }
}

.reader { padding: 32px 0 8px; }
.para + .para { margin-top: calc(var(--ja-size) * 1.2); }
.sent { position: relative; scroll-margin-top: 80px; }
.sent .say {
  position: absolute; left: -48px; top: calc(var(--ja-size) * var(--lh) / 2 - 15px);
  width: 30px; height: 30px; padding: 0; display: grid; place-items: center; cursor: pointer;
  border: 2px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink-3);
}
.sent .say::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; }   /* cible de 44 px */
.sent .say svg { width: 10px; height: 10px; margin-left: 1px; }
.sent.playing .say { color: var(--cyan-soft-ink); border-color: var(--cyan); background: var(--cyan-soft); }
@media (hover: hover) { .sent .say:hover { color: var(--coral-text); border-color: var(--coral); } }
.no-voice .sent .say { display: none; }

.ja { font: 400 var(--ja-size)/var(--lh) var(--jp); color: var(--ink); }
.sent.playing .ja { background: var(--cyan-soft); box-shadow: 0 0 0 6px var(--cyan-soft); border-radius: 6px; }
.ja .w { cursor: pointer; border-radius: 6px; transition: background-color .12s; }
/* Mot gardé : un trait cyan dessous. */
.ja .w.saved { background: linear-gradient(transparent 80%, var(--cyan) 80%, var(--cyan) 90%, transparent 90%); }
.ja .w.active { background: var(--coral-soft); box-shadow: 0 0 0 3px var(--coral-soft); }
@media (hover: hover) { .ja .w:hover:not(.active) { background-color: var(--hover); } }
/* Un groupe de mots (bunsetsu) ne se coupe pas en fin de ligne ; plus long qu'une ligne entière,
   il passe à la ligne à l'intérieur au lieu de déborder de la colonne. */
.b { display: inline-block; max-width: 100%; }
.sp { display: none; }
.spaces .sp { display: inline; word-spacing: 0.22em; }
.ja .p { color: var(--ink); }
.tl { display: none; margin: -0.2em 0 0.85em; font: var(--w-body) 16px/1.55 var(--round); color: var(--ink-2); }
.show-tl .tl { display: block; }

.after { margin-top: 64px; padding-top: 36px; border-top: 2px solid var(--line); }
.after h2 { font: 900 30px/1.2 var(--round); letter-spacing: -0.01em; margin: 6px 0 22px; }
.q { padding: 20px 22px 18px; margin-bottom: 16px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--lift); }
.q .qja { font-size: calc(var(--ja-size) * 0.9); }
.q .qtl { display: none; margin-top: -0.1em; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.show-tl .q .qtl { display: block; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.choice {
  display: flex; gap: 12px; align-items: center; min-height: 52px; padding: 6px 14px 6px 10px; text-align: left; cursor: pointer;
  border: 2px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink);
  box-shadow: 0 3px 0 var(--line); -webkit-tap-highlight-color: transparent; transition: transform .08s, box-shadow .08s;
  font: 400 max(16px, calc(var(--ja-size) * 0.8))/1.95 var(--jp);
}
.choice:active:not([disabled]) { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.choice .n {
  display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface-2); color: var(--ink-2); font: 900 14px/1 var(--round);
}
/* Réponse : juste = vert et ✓, fausse = framboise et ✗ (jamais la couleur seule). */
.choice.right { border-color: var(--ok); background: var(--ok-soft); box-shadow: 0 3px 0 var(--ok); }
.choice.wrong { border-color: var(--ko); background: var(--ko-soft); box-shadow: 0 3px 0 var(--ko); }
.choice.right .n { background: var(--ok); color: var(--surface); font-size: 16px; }
.choice.wrong .n { background: var(--ko); color: var(--surface); font-size: 16px; }
.choice[disabled] { cursor: default; color: var(--ink); }
.choice .cwrap { display: flex; flex-direction: column; min-width: 0; }
.choice .ctl { display: none; margin-bottom: 4px; font: var(--w-body) 13.5px/1.45 var(--round); color: var(--ink-2); }
.show-tl .choice .ctl, .choice.right .ctl { display: block; }
@media (hover: hover) { .choice:hover:not([disabled]) { border-color: color-mix(in srgb, var(--coral) 50%, var(--line)); background: var(--surface-2); } }
.verdict { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; min-height: 24px; font: 800 15px/1.45 var(--round); }
.verdict .vi { flex: none; font-weight: 900; }
.verdict.ok { color: var(--ok); }
.verdict.ko { color: var(--ko); }

.finish {
  display: flex; gap: 20px; align-items: center; padding: 20px 24px 22px; margin-top: 24px;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--lift);
}
.finish img { width: 96px; height: 96px; flex: none; }
.finish h3 { margin: 0 0 4px; font: 800 22px/1.3 var(--round); }
.finish p { margin: 0 0 16px; color: var(--ink-2); font-size: 15.5px; }
.finish .actions { gap: 12px; }

details.vocab { margin-top: 28px; }
details.vocab summary { display: flex; align-items: center; gap: 10px; min-height: 48px; cursor: pointer; font: 800 16px/1.3 var(--round); color: var(--ink-2); }
.vocab-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); column-gap: 28px; border-top: 2px solid var(--line); }
.vocab-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 2px solid var(--line); }
.vocab-item .vj { font: 700 18px/1.75 var(--jp); }
.vocab-item .vm { font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.add-mini {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border-radius: 50%;
  border: 2px solid var(--line); background: var(--surface); color: var(--ink-2); font: 900 18px/1 var(--round); cursor: pointer;
}
.add-mini[aria-pressed="true"] { background: var(--cyan-soft); border-color: var(--cyan); color: var(--cyan-soft-ink); }
@media (hover: hover) { .add-mini:hover:not([aria-pressed="true"]) { border-color: var(--coral); color: var(--coral-text); } }

/* --- Fiche d'un mot -------------------------------------------------- */
.pop {
  position: absolute; z-index: 30; width: 340px; padding: 16px 18px 18px; background: var(--surface);
  border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.pop .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pop .word { font: 700 30px/1.6 var(--jp); }
.pop .kana { font: 400 15px/1.3 var(--jp); color: var(--ink-2); }
.pop .close {
  flex: none; margin: -6px -8px 0 0; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent;
  cursor: pointer; font: 400 26px/1 var(--round); color: var(--ink-3);
}
.pop .tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 10px; }
.pop .mean { margin: 0; font-size: 16.5px; line-height: 1.5; font-weight: 700; color: var(--ink); }
.pop .form, .pop .note { margin: 10px 0 0; padding-top: 10px; border-top: 2px solid var(--line); font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.pop .form .jp { color: var(--ink); }
.pop .row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pop .row .btn { flex: 1 1 auto; padding: 6px 12px; }
.pop .btn.added { background: var(--cyan-soft); border-color: var(--cyan); color: var(--cyan-soft-ink); box-shadow: 0 3px 0 var(--cyan); }
@media (hover: hover) {
  .pop .close:hover { color: var(--ink); background: var(--hover); }
  .pop .btn.added:hover { background: var(--cyan-soft); }
}

/* --- Mots gardés et révision ------------------------------------------ */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding: 52px 0 26px; }
.page-head h1 { margin: 0; font-size: clamp(34px, 5vw, 46px); }
.stats { display: flex; gap: 10px; }
.stat { min-width: 120px; padding: 12px 18px 14px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--line); box-shadow: var(--lift); }
.stat.due { background: var(--coral-soft); border-color: transparent; }
.stat b { display: block; font: 900 30px/1.15 var(--round); letter-spacing: -0.01em; color: var(--ink); }
.stat span { font: 700 13.5px/1.4 var(--round); color: var(--ink-2); }
.stat.due b, .stat.due span { color: var(--coral-soft-ink); }

.study { margin-top: 6px; padding: 40px 32px 26px; text-align: center; background: var(--surface); border: 2px solid var(--line); border-radius: 24px; box-shadow: var(--lift); }
.study .progress { font: 800 14px/1 var(--round); color: var(--ink-3); }
.study .front { font: 700 52px/1.5 var(--jp); margin: 18px 0 6px; }
.study .ctx { max-width: 560px; margin: 0 auto; font: 400 calc(var(--ja-size) * 0.9)/2.1 var(--jp); color: var(--ink-2); }
.study .ctx mark { background: linear-gradient(transparent 58%, color-mix(in srgb, var(--cyan) 45%, transparent) 58%, color-mix(in srgb, var(--cyan) 45%, transparent) 94%, transparent 94%); color: var(--ink); }
.study .back { margin-top: 20px; padding-top: 20px; border-top: 2px solid var(--line); }
.study .reading { font: 400 22px/1.5 var(--jp); }
.study .meaning { margin: 6px 0 4px; font: 800 18px/1.4 var(--round); }
.study .ctx-tl { font-size: 15px; color: var(--ink-2); }
.study .say-btn { margin-top: 14px; }
.study .show-row { justify-content: center; margin-top: 28px; }
.grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 580px; margin: 26px auto 0; }
.grade {
  min-height: 60px; padding: 8px 6px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface);
  box-shadow: 0 3px 0 var(--line); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .08s, box-shadow .08s;
}
.grade:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.grade b { display: block; font: 900 16px/1.3 var(--round); }
.grade span { font: 700 13px/1.5 var(--round); color: var(--ink-2); }
.grade.again b { color: var(--ko); }
.keys { margin-top: 16px; font-size: 13px; font-weight: 700; color: var(--ink-3); }
@media (hover: hover) { .grade:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--coral) 50%, var(--line)); } }
.empty { display: flex; gap: 24px; align-items: center; margin-top: 6px; padding: 26px 30px; background: var(--surface); border: 2px solid var(--line); border-radius: 24px; box-shadow: var(--lift); }
.empty img { width: 104px; height: 104px; flex: none; }
.empty h2 { margin: 0 0 6px; font: 800 23px/1.25 var(--round); }
.empty p { margin: 0 0 18px; color: var(--ink-2); font-size: 15.5px; }

.list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 52px; }
.list-head h2 { margin: 0; font: 900 28px/1.2 var(--round); letter-spacing: -0.01em; }
table.words { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 15px; }
table.words th { padding: 0 12px 10px 0; border-bottom: 2px solid var(--line); text-align: left; font: 800 12px/1.4 var(--round); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
table.words td { padding: 9px 12px 9px 0; border-bottom: 2px solid var(--line); vertical-align: middle; }
table.words td.wj { font: 700 19px/1.8 var(--jp); white-space: nowrap; }
table.words td.wk { font: 400 14px/1.5 var(--jp); color: var(--ink-2); white-space: nowrap; }
table.words td.due { white-space: nowrap; color: var(--ink-2); font-size: 14px; }
table.words td:last-child { padding-right: 0; text-align: right; }
table.words .rm { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; color: var(--ink-3); font: 400 22px/1 var(--round); }
@media (hover: hover) { table.words .rm:hover { color: var(--ko); background: var(--ko-soft); } }

/* --- Connexion (connexion.html) --------------------------------------- */
.auth-wrap { max-width: 476px; }
.auth { padding: 44px 0 8px; }
.auth-art { display: block; width: 88px; height: 88px; margin: 0 0 12px; }
.auth h1 { font-size: clamp(32px, 5vw, 40px); margin: 0 0 12px; }
.auth .lede { margin: 0 0 24px; font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.auth .lede b { font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
.auth-note { margin: -8px 0 20px; padding: 12px 16px; border-radius: 16px; background: var(--sun-soft); font-size: 15px; line-height: 1.5; color: var(--ink); }
.auth-card { padding: 22px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--lift); }
.field-lab { display: block; margin: 0 0 8px; font: 800 14px/1.3 var(--round); color: var(--ink-2); }
.input {
  display: block; width: 100%; height: 52px; padding: 0 16px; border: 2px solid var(--line); border-radius: 16px;
  background: var(--surface-2); color: var(--ink); font: 700 16px/1.2 var(--round);   /* 16 px : pas de zoom sur iPhone */
}
.input::placeholder { color: var(--ink-3); font-weight: var(--w-body); }
.input:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 4px var(--coral-soft); }
.input.otp { height: 60px; text-align: center; font: 900 28px/1 var(--round); letter-spacing: 0.35em; padding: 0 0 0 0.35em; }
.form-error { min-height: 0; margin: 8px 0 0; font-size: 14px; font-weight: 700; line-height: 1.45; color: var(--ko); }
.form-error:empty, .form-note:empty { display: none; }
.form-note { margin: 8px 0 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.auth-card form .btn { margin-top: 16px; }
.or { display: flex; align-items: center; gap: 12px; margin: 20px 0; font: 800 13px/1 var(--round); color: var(--ink-3); }
.or::before, .or::after { content: ""; flex: 1; height: 2px; background: var(--line); }
.providers { display: grid; gap: 12px; }
.provider { gap: 10px; font-size: 17px; }
.provider svg { width: 20px; height: 20px; flex: none; color: var(--ink); }
.hint { margin: 16px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-3); }
.auth-links { display: flex; justify-content: space-between; gap: 0 16px; flex-wrap: wrap; margin-top: 8px; }
.auth-working { margin: 8px 0 0; font-size: 17px; font-weight: 700; color: var(--ink-2); }
.auth > .btn.wide { margin-top: 4px; }

/* --- Mode app Android (assets/boot.js : <html data-app="android"> ; assets/appmode.js, android/README.md) ----- */
/* Règles de paiement de Google Play : rien qui vende Premium ni mène à un achat. Disparaissent : ce qui porte
   data-offer (entrées de l'offre, CGV du pied de page), les boutons des magasins, la présentation de l'accueil (elle
   vend Premium) ; d'une histoire premium ne reste que « Cette histoire fait partie de Premium ». */
:root[data-app] [data-offer], :root[data-app] .stores, :root[data-app] .landing { display: none !important; }
:root[data-app] .premium-box > :not(h2) { display: none; }
:root[data-app] .premium-box h2 { margin: 0; }
:root[data-app] .read-cta:has(> [data-offer]:only-child) { display: none; }

/* --- Aujourd'hui (accueil d'un visiteur qui a une progression ou un compte ; DESIGN.md §7) ----------- */
/* data-returning (assets/boot.js, puis index.html) : « Aujourd'hui » et les badges remplacent la présentation. */
:root[data-returning] .hero { display: none; }
:root:not([data-returning]) .today, :root:not([data-returning]) .badges { display: none; }

.today { display: grid; gap: 14px; padding: 40px 0 4px; }
.today-head { display: flex; align-items: center; gap: 18px; margin-bottom: 8px; }
.today-art { display: block; flex: none; width: 96px; height: 96px; }
.today-date { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0 0 6px; font: 800 15px/1.4 var(--round); color: var(--ink-2); }
.today-title { margin: 0; font: 900 clamp(30px, 4.6vw, 40px)/1.12 var(--round); letter-spacing: -0.01em; }

.today .card { padding: 16px 20px 18px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--lift); }
.card-label { margin: 0; font: 800 13px/1.4 var(--round); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }

/* Objectif du jour : « n / objectif », barre cyan ; atteint : carte okSoft, barre verte et ✓. */
.goal-top, .streak-top { display: flex; align-items: center; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; margin-top: -8px; }
.goal-main { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 12px; }
.goal-n { font: 900 22px/1 var(--round); color: var(--ink-2); }
.goal-n b { font-size: 36px; font-weight: 900; color: var(--ink); }
.goal-unit { font: 800 17px/1.3 var(--round); color: var(--ink-2); }
.goal-main .check { align-self: center; margin-left: auto; }
.bar { height: 14px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar > span { display: block; height: 100%; min-width: 0; border-radius: inherit; background: var(--cyan); }
.today .goal.done { background: var(--ok-soft); border-color: transparent; box-shadow: none; }
.goal.done .bar { background: color-mix(in srgb, var(--ok) 18%, transparent); }
.goal.done .bar > span { background: var(--ok); }
.goal.done .check { background: var(--ok); color: var(--surface); }
.goal.done .link { color: var(--ok); }   /* corail sur okSoft : 4,2:1 ; vert : 5,9:1 (clair) et 7:1 (sombre) */

/* Histoire du jour : grande carte et le bouton principal de l'écran. */
.daily { display: flex; align-items: center; gap: 16px 24px; }
.daily-body { flex: 1; min-width: 0; }
.daily .card-label { display: inline-flex; padding: 3px 12px; border-radius: 999px; background: var(--coral-soft); color: var(--coral-soft-ink); }
.daily .t { margin-top: 8px; font: 700 28px/1.75 var(--jp); color: var(--ink); }
.daily .tr { font: 800 18px/1.35 var(--round); color: var(--ink-2); }
.daily .sum { margin: 8px 0 0; font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.daily .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 10px; font: 700 13.5px/1.4 var(--round); color: var(--ink-3); }
.daily > .btn { flex: none; }

.today-others .card-label { margin: 4px 0 0; }
.today-others .story-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Reprendre, révisions : petites cartes côte à côte, bouton secondaire. */
.today-minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.today .mini { display: flex; flex-direction: column; align-items: flex-start; }
.mini-t { margin-top: 4px; font: 700 20px/1.75 var(--jp); }
.mini-s { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.mini-big { margin: 6px 0 0; font: 800 17px/1.35 var(--round); color: var(--ink-2); }
.mini-big b { font: 900 34px/1 var(--round); color: var(--ink); }
.mini .btn { margin-top: auto; }
.mini .mini-s + .btn, .mini .mini-big + .btn { margin-top: 14px; }

/* Série (carte cyanSoft) : en cours, meilleure, et les sept jours de la semaine. */
.today .streak { background: var(--cyan-soft); border-color: transparent; box-shadow: none; }
.streak .card-label { color: var(--cyan-soft-ink); }
.streak-body { display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; margin-top: 4px; }
.streak-main { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 12px; }
.streak-main p { margin: 0; }
.streak-main p:first-of-type { font: 800 16px/1.2 var(--round); color: var(--cyan-soft-ink); }
.streak-n { font: 900 40px/1 var(--round); color: var(--ink); }
.streak-best { font: 700 14px/1.4 var(--round); color: var(--cyan-soft-ink); }
.week { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.week li { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 34px; }
.week .wd { font: 800 12.5px/1 var(--round); color: var(--cyan-soft-ink); }
.week .dot {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--cyan) 55%, transparent); background: var(--surface);
  font: 900 15px/1 var(--round); color: var(--on-cyan);
}
.week .on .dot { background: var(--cyan); border-color: var(--cyan); }
.week .now .dot { box-shadow: 0 0 0 2px var(--cyan-soft), 0 0 0 4px var(--coral); }
.week .later .dot { border-style: dashed; }

/* Grand écran : le tableau de bord sur deux colonnes, dans le cadre de la barre du haut. À gauche l'objectif, l'histoire
   du jour et les autres histoires (la largeur d'avant) ; à droite la série et les petites cartes, l'une sous l'autre. */
@media (min-width: 1024px) {
  .today { grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "head head" "goal streak" "daily minis" "others minis"; column-gap: 20px; }
  .today-head { grid-area: head; }
  .today .goal { grid-area: goal; display: flex; flex-direction: column; }
  .today .goal .bar { margin-top: auto; }   /* la carte prend la hauteur de la série : la barre en bas, comme les jours */
  .today .streak { grid-area: streak; }
  .today .daily { grid-area: daily; }
  .today-others { grid-area: others; }
  .today-minis { grid-area: minis; grid-template-columns: 1fr; align-self: start; }
}

/* --- Badges (section de l'accueil) et médailles -------------------------------------------------- */
.badges-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; }
.badges-count { font: 800 15px/1.3 var(--round); color: var(--ink-3); }
.badge-fam { margin: 28px 0 12px; font: 800 19px/1.3 var(--round); }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.badge-grid.level { grid-template-columns: repeat(3, minmax(0, 1fr)); }   /* une ligne par niveau : 1, 10, tout */
.badge-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 12px 14px; text-align: center;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--lift);
}
.badge-tile b { margin-top: 4px; font: 800 15px/1.3 var(--round); color: var(--ink); }
.badge-tile .sub { font: 700 13px/1.4 var(--round); color: var(--ink-3); }
.badge-tile:not(.earned) { background: transparent; border-style: dashed; box-shadow: none; }
.badge-tile:not(.earned) b { color: var(--ink-2); }
.badge-tile:not(.earned) .medal { filter: grayscale(1); opacity: 0.45; }

/* Médaille : dessin (ou image assets/medal-<famille>.webp) et pastille avec le chiffre ou le niveau. */
.medal { position: relative; display: inline-block; flex: none; width: var(--m, 64px); height: var(--m, 64px); }
.medal > svg, .medal > img { display: block; width: 100%; height: 100%; }
.medal .disc { fill: var(--medal-c); stroke: var(--medal-ink); stroke-width: 3; }
.medal .ring { fill: none; stroke: var(--medal-plate); stroke-opacity: 0.6; stroke-width: 2; }
.medal .sym { fill: var(--medal-ink); stroke: var(--medal-ink); stroke-width: 1.2; stroke-linejoin: round; }
.medal .sym .hi { fill: var(--medal-plate); stroke: none; }
.medal-streak { --medal-c: var(--medal-streak); }
.medal-words { --medal-c: var(--medal-words); }
.medal-perfect { --medal-c: var(--medal-perfect); }
.medal-n {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); padding: 0 0.45em;
  border: 2px solid var(--medal-ink); border-radius: 999px; background: var(--medal-plate); color: var(--medal-ink);
  font: 900 calc(var(--m, 64px) * 0.19)/1.3 var(--round); white-space: nowrap;
}

/* Fenêtre « Nouveau badge » : mascotte « fier », médailles, « Continuer ». Aucune animation. */
dialog.sheet {
  width: min(440px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); overflow: auto;
  padding: 22px 24px 24px; border: 2px solid var(--line); border-radius: 24px;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow); text-align: center;
}
dialog.sheet::backdrop { background: var(--scrim); }
.sheet-art { display: block; width: 112px; height: 112px; margin: 0 auto 4px; }
.sheet h2 { margin: 0 0 18px; font: 900 28px/1.2 var(--round); letter-spacing: -0.01em; }
.sheet-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 14px; margin: 0 0 24px; padding: 0; list-style: none; }
.sheet-badges li { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 118px; }
.sheet-badges b { font: 800 16px/1.3 var(--round); }
/* Une seule mascotte à l'écran : celles de la page se cachent pendant que la fenêtre est ouverte. */
.sheet-open :is(.today-art, .shelf-art, .hero-art, .finish img, .empty img) { visibility: hidden; }

/* --- hinoko Premium (assets/premium.js, premium.html) ------------------------------------------------- */
/* Histoire verrouillée : une pastille cadenas sobre (fond doux, texte secondaire) ; la carte reste lisible. */
.lock {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px 0 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2); font: 800 12.5px/1 var(--round); white-space: nowrap;
}
.lock .lock-i { width: 12px; height: 12px; flex: none; }
.btn .lock-i { width: 15px; height: 15px; }
.load-error { padding: 22px 24px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--lift); }
.load-error p { margin: 0 0 16px; font-size: 17px; font-weight: 700; line-height: 1.5; color: var(--ink-2); }

/* Menu du compte : la formule (fond soleil) ou l'entrée vers l'offre. */
.acct-premium {
  display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--surface-2); color: var(--ink); text-decoration: none;
}
.acct-premium .txt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.acct-premium b { font: 800 15px/1.35 var(--round); }
.acct-premium .txt > span { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.acct-premium .go { flex: none; font: 900 18px/1 var(--round); color: var(--coral-text); }
.acct-premium.on { background: var(--sun-soft); }
.acct-premium.on .txt > span { color: var(--sun-soft-ink); font-weight: 700; }
.acct-premium.on .txt > .note { margin-top: 4px; color: var(--ink); font-weight: 600; }
.acct-premium .link { min-height: 40px; font-size: 13.5px; }
@media (hover: hover) { a.acct-premium:hover { background: color-mix(in srgb, var(--surface-2) 70%, var(--line)); } }
.acct-withdraw { display: flex; width: fit-content; min-height: 40px; margin-top: 4px; font-size: 13.5px; }

/* Rétractation en ligne (retractation.html) : formulaire de la page de connexion, déclaration en encadré. */
textarea.input { height: auto; min-height: 96px; padding: 12px 16px; line-height: 1.45; resize: vertical; }
.wd-form .field-lab:not(:first-child) { margin-top: 16px; }
.wd-statement { margin: 18px 0 0; padding: 12px 16px; border-radius: 16px; background: var(--surface-2); font-size: 15px; line-height: 1.5; color: var(--ink); }
.wd-statement b { display: block; margin-bottom: 2px; font: 800 13px/1.3 var(--round); color: var(--ink-2); }
.wd-done { padding: 18px 20px; border-radius: var(--radius); background: var(--ok-soft); }
.wd-done p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink); }
.wd-done p + p { margin-top: 8px; color: var(--ink-2); }
.wd-more { margin: 18px 0 0; font-size: 14px; line-height: 1.55; color: var(--ink-3); }
.wd-more a { color: var(--ink-2); font-weight: 800; text-underline-offset: 3px; }

/* Écran d'offre : une colonne, la mascotte « fier » (ou « joie »), les formules en cartes à cocher. */
.offer-wrap { max-width: 640px; }
.offer { padding: 40px 0 8px; }
.offer-art { display: block; width: 88px; height: 88px; margin: 0 0 12px; }
.offer h1 { font-size: clamp(34px, 5.4vw, 46px); margin: 0 0 12px; }
.offer .lede { margin: 0 0 24px; font-size: 18px; line-height: 1.6; color: var(--ink-2); }
.offer > .btn.wide { margin-top: 8px; }

.offer-story {
  margin: 0 0 26px; padding: 14px 18px 16px; background: var(--surface); border: 2px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--lift);
}
.offer-story .t { margin-top: 6px; font: 700 22px/1.8 var(--jp); color: var(--ink); }
.offer-story .tr { font: 800 16px/1.35 var(--round); color: var(--ink-2); }
.offer-story .sum { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.offer-story .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; }

.perks { display: grid; gap: 10px; margin: 0 0 32px; padding: 0; list-style: none; }
.perks li { display: flex; align-items: center; gap: 12px; font: 800 17px/1.35 var(--round); }
.perks .tick {
  display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--cyan-soft); color: var(--cyan-soft-ink); font: 900 15px/1 var(--round);
}

.plans { display: grid; gap: 12px; min-width: 0; margin: 0; padding: 0; border: 0; }
.plans legend { margin: 0 0 12px; padding: 0; font: 800 13px/1.4 var(--round); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.plan {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 2px 14px;
  padding: 14px 18px 16px 16px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--lift); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
/* Le vrai bouton radio reste dans la page (clavier, lecteur d'écran) ; la pastille le dessine. */
.plan input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; opacity: 0; }
.plan .dot {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--ink-3); background: var(--surface);
}
.plan-main { display: flex; flex-direction: column; min-width: 0; }
.plan-name { font: 900 19px/1.3 var(--round); color: var(--ink); }
.plan-name .tag {
  display: inline-flex; align-items: center; height: 24px; margin-left: 4px; padding: 0 10px; border-radius: 999px;
  background: var(--sun-soft); color: var(--sun-soft-ink); font: 800 12.5px/1 var(--round); vertical-align: 2px; white-space: nowrap;
}
.plan-sub { margin-top: 2px; font: 700 14px/1.4 var(--round); color: var(--ink-2); }
.plan-price { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.plan-price b { font: 900 24px/1.15 var(--round); color: var(--ink); white-space: nowrap; }
.plan-price span { font: 700 13px/1.35 var(--round); color: var(--ink-3); }
.plan-note { grid-column: 2 / -1; margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
/* Choisie : bord et relief corail, fond corail très doux, pastille pleine avec ✓ (pas seulement la couleur). */
.plan:has(input:checked) {
  border-color: var(--coral); box-shadow: 0 3px 0 var(--coral);
  background: color-mix(in srgb, var(--coral-soft) 45%, var(--surface));
}
.plan:has(input:checked) .dot { border-color: var(--coral); background: var(--coral); }
.plan:has(input:checked) .dot::after { content: "✓"; color: var(--on-coral); font: 900 14px/1 var(--round); }
.plan:has(input:focus-visible) { outline: 3px solid var(--coral-text); outline-offset: 2px; }
@media (hover: hover) { .plan:hover:not(:has(input:checked)) { border-color: color-mix(in srgb, var(--coral) 50%, var(--line)); } }
.plans-note { margin: -2px 2px 4px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }

.consent {
  display: flex; align-items: flex-start; gap: 12px; margin-top: 20px; padding: 14px 16px;
  border: 2px solid var(--line); border-radius: 16px; background: var(--surface-2);
}
.consent input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--coral); cursor: pointer; }
.consent label { font-size: 15px; font-weight: 700; line-height: 1.5; color: var(--ink); cursor: pointer; }
.consent a { color: var(--coral-text); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.buy .form-error { margin-top: 10px; }
.buy > .btn { margin-top: 20px; }
/* « Bientôt disponible » (pas encore de lien d'achat) : fond doux et texte lisible, comme le bouton principal
   désactivé de l'app, plutôt qu'un corail délavé. */
.buy .btn.solid[disabled] { opacity: 1; background: var(--surface-2); border-color: var(--line); color: var(--ink-3); box-shadow: 0 3px 0 var(--line); }
.offer-hint { margin: 12px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); text-align: center; }
.offer-legal { margin: 22px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--ink-3); text-align: center; }
.offer-legal a { color: var(--ink-2); font-weight: 800; text-underline-offset: 3px; }

/* Premium ouvert : la formule et où la gérer. */
.premium-status { margin-top: 22px; padding: 14px 16px; border-radius: 16px; background: var(--sun-soft); color: var(--sun-soft-ink); }
.premium-status p { margin: 0; font-size: 15px; line-height: 1.5; font-weight: 700; }
.premium-status p + p { margin-top: 4px; color: var(--ink); font-weight: 600; }
.premium-status b { font-weight: 900; color: var(--ink); }
.premium-status .link { display: flex; width: fit-content; }
.premium-status .link { min-height: 40px; }

/* --- Colonne étroite : le bouton d'écoute rentre dans la colonne ------ */
@media (max-width: 819px) {
  .sent { padding-left: 42px; }
  .sent .say { left: 0; }
  .no-voice .sent { padding-left: 0; }
}

/* --- Téléphone -------------------------------------------------------- */
@media (max-width: 720px) {
  :root { --ja-size: 20px; }
  .wrap { padding: 0 20px; }
  .top .wrap { height: 60px; gap: 8px; }
  .brand b { display: none; }
  .nav { gap: 4px; }
  .nav > a { padding: 0 12px; }
  .nav .hide-sm { display: none; }
  .lang-select select { padding: 0 28px 0 12px; font-size: 14px; }
  .lang-select::after { right: 13px; }
  .signin { width: 44px; padding: 0; color: var(--ink-2); }
  .signin svg { display: block; }
  .signin .lbl { display: none; }
  .auth { padding-top: 28px; }
  .auth-card { padding: 18px; }
  h1 { font-size: 36px; }
  /* Au téléphone, d’après Hugo (17/11) : la définition et le titre, la scène centrée, puis le texte, tout centré.
     Le bloc de texte s’efface (display: contents) pour que la scène se glisse entre le titre et le texte. */
  .hero { grid-template-columns: 1fr; gap: 0; padding: 16px 0 36px; text-align: center; }
  .hero > div:first-child { display: contents; }
  .hero .eyebrow, .hero h1 { order: -2; }
  .hero h1 { margin-bottom: 16px; }
  .hero-art { order: -1; width: min(240px, 60vw); justify-self: center; margin: 0 0 16px; }
  .hero .lede { margin-inline: auto; }
  .hero .actions { justify-content: center; }
  .hero-facts { justify-content: center; }
  .hero-facts li, .hero-facts a { align-items: center; }
  .lede { font-size: 17px; }
  .actions .btn { flex: 1 1 auto; }
  .hero-facts { gap: 12px 20px; margin-top: 24px; }
  .hero-facts b { font-size: 27px; }
  .hero-facts span { font-size: 13.5px; }
  .section-title { font-size: 28px; }
  .shelf-art { width: 56px; height: 56px; }
  .levels { gap: 8px; }
  .theme-head .ja-t { font-size: 20px; }
  .story-list { grid-template-columns: 1fr; }
  .story-card .t { font-size: 20px; }

  .story-head { padding: 28px 0 24px; }
  .story-head .title-tr { font-size: 19px; }
  .toolbar-bar .wrap { padding: 0 12px; }
  .toolbar { gap: 0 4px; min-height: 56px; }
  .toolbar .toggles { gap: 2px; }
  .toggle { padding: 0 10px; font-size: 13.5px; }
  .play-all { width: 44px; padding: 0; }
  .play-all .lbl { display: none; }
  .sent { padding-left: 40px; }
  .sent .say { width: 28px; height: 28px; top: calc(var(--ja-size) * var(--lh) / 2 - 14px); }
  .sent .say::after { inset: -8px; }
  .tl { font-size: 15.5px; }
  .after { margin-top: 48px; }
  .after h2 { font-size: 26px; }
  .q { padding: 16px 16px 14px; }
  .choices { grid-template-columns: 1fr; }
  .finish { flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px 18px 20px; }
  .finish img { width: 80px; height: 80px; }
  .finish .actions { width: 100%; }

  .pop, .panel {
    position: fixed; left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto; max-width: none;
    border-radius: 24px 24px 0 0; border-width: 2px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }
  .panel.account { width: auto; }

  .page-head { padding: 34px 0 22px; }
  .stat { min-width: 0; flex: 1; }
  .stats { width: 100%; }
  .study { padding: 28px 18px 22px; }
  .study .front { font-size: 42px; }
  .study .show-row .btn { width: 100%; }
  .grades { grid-template-columns: repeat(2, 1fr); }
  .empty { flex-direction: column; text-align: center; padding: 26px 20px; }
  .empty img { width: 96px; height: 96px; }
  .empty .btn { width: 100%; }
  table.words td.due, table.words th.due { display: none; }
}
/* Téléphone court : la scène rapetisse pour que « Commencer à lire » reste dans le premier écran (17/11). */
@media (max-width: 720px) and (max-height: 760px) { .hero-art { width: min(180px, 50vw); } }
@media (max-width: 720px) and (max-height: 680px) { .hero-art { width: 140px; } }

/* Téléphone étroit : la barre du haut garde le compte sans déborder (« Minhas palavras » + compteur) ;
   le menu des langues montre le code (FR, EN…) au lieu du nom. */
@media (max-width: 420px) {
  .top .wrap { padding: 0 12px; gap: 4px; }
  .nav { gap: 4px; }
  .nav > a { padding: 0 10px; font-size: 14.5px; }
  .count { margin-left: 5px; padding: 0 6px; min-width: 22px; height: 22px; line-height: 22px; font-size: 12.5px; }
  .lang-select select { width: 44px; padding: 0; color: transparent; }
  .lang-select select option { color: var(--ink); background: var(--surface); }
  .lang-select::after { display: none; }
  .lang-select .code {
    display: grid; place-items: center; position: absolute; inset: 0; pointer-events: none;
    font: 900 13.5px/1 var(--round); color: var(--ink); letter-spacing: 0.02em;
  }
}

@media (max-width: 420px) {
  .toggle { padding: 0 8px; font-size: 12.5px; }
  .toolbar .sep { display: none; }
  .toolbar [data-settings] { margin-left: auto; }
}

/* Aujourd'hui et badges sur téléphone */
@media (max-width: 720px) {
  .today { padding-top: 24px; gap: 12px; }
  .today-head { gap: 14px; }
  .today-art { width: 72px; height: 72px; }
  .today-title { font-size: 28px; }
  .today .card { padding: 14px 16px 16px; }
  .daily { flex-direction: column; align-items: stretch; }
  .daily .t { font-size: 24px; }
  .daily > .btn { width: 100%; }
  .today-others .story-list, .today-minis { grid-template-columns: 1fr; }
  .mini .btn { align-self: stretch; }
  .streak-body { flex-direction: column; align-items: stretch; }
  .week { justify-content: space-between; }
  .badge-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }
  .badge-tile { padding: 12px 6px 10px; gap: 4px; }
  .badge-tile b { font-size: 13.5px; }
  .badge-tile .sub { font-size: 12.5px; }
  dialog.sheet {
    width: 100%; max-height: calc(100dvh - 24px); margin: auto 0 0; border-width: 2px 0 0; border-radius: 24px 24px 0 0;
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }

  /* Écran d'offre sur téléphone */
  .offer { padding-top: 28px; }
  .offer h1 { font-size: 36px; }
  .offer .lede { font-size: 17px; }
  .offer-story .t { font-size: 20px; }
  .perks li { font-size: 16px; }
  .plan { gap: 2px 12px; padding: 12px 14px 14px 12px; }
  .plan-name { font-size: 18px; }
  .plan-price b { font-size: 21px; }
}

/* --- Pages publiées : accueil, Histoires, niveaux, histoires, 404 (tools/build_site.mjs) ---------------------- */

/* Accueil : la présentation pour tous ; un compte connecté voit « Aujourd'hui » et ses badges à la place (le HTML
   de la présentation reste dans la page pour les robots). */
:root[data-returning] .landing { display: none; }

/* Niveau choisi (<html data-level>, assets/boot.js) : seul lui s'affiche dans la bibliothèque et dans les histoires
   proposées de l'accueil. Sans choix (Google, un premier passage, pas de JavaScript), la bibliothèque montre tout et
   l'accueil propose le N5. N1, sans histoire : l'accueil propose le N5. */
:root:not([data-level]) #sample .lib-level:not([data-level="N5"]),
:root[data-level="N5"] :is(#stories, #sample) .lib-level:not([data-level="N5"]),
:root[data-level="N4"] :is(#stories, #sample) .lib-level:not([data-level="N4"]),
:root[data-level="N3"] :is(#stories, #sample) .lib-level:not([data-level="N3"]),
:root[data-level="N2"] :is(#stories, #sample) .lib-level:not([data-level="N2"]),
:root[data-level="N1"] #stories .lib-level:not([data-level="N1"]),
:root[data-level="N1"] #sample .lib-level:not([data-level="N5"]) { display: none; }

.page-title { font-size: clamp(34px, 5vw, 46px); margin: 0 0 12px; }
.section-lede { margin: 10px 0 0; color: var(--ink-2); font-size: 17px; line-height: 1.6; }
.page-intro { padding: 4px 0 4px; }
.page-intro .shelf-art { align-self: flex-start; }

/* Fil d'Ariane : liens de 44 px de haut, la page courante en gris. */
.crumbs { padding-top: 18px; font: 800 14px/1.4 var(--round); color: var(--ink-3); }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none; }
.crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.crumbs li + li::before { content: "›"; margin: 0 8px; color: var(--ink-3); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); text-decoration: none; }
.crumbs [aria-current] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
@media (hover: hover) { .crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; } }

/* Magasins : les badges officiels de l'App Store et de Google Play (assets/stores/, tels que fournis, 52 px de haut
   visibles comme les boutons). L'image de Google Play porte une marge transparente : on l'agrandit et on la compense
   par une marge négative (badges : 192 px visibles sur 250 ; anglais : 168 sur 250 avec 41 px tout autour). L'écart
   entre les deux badges (14 px) respecte l'espace libre demandé par Google (un quart de la hauteur). */
.store-badge { display: inline-flex; flex: none; border-radius: 10px; -webkit-tap-highlight-color: transparent; }
.store-badge img { display: block; width: auto; height: 52px; }
.store-badge:focus-visible { outline: 3px solid var(--coral-text); outline-offset: 3px; }
.store-badge.play img { height: 67.7px; margin: -7.85px 0; }
.store-badge.play-en img { height: 77.4px; margin: -12.7px; }
/* En haut de l'accueil : le bouton puis les deux badges, 14 px entre les badges (l'espace libre de Google). */
.hero .actions { column-gap: 14px; }
/* Téléphone étroit : les deux badges (164 + 14 + 175 px) ne tiennent plus côte à côte ; à 46 px de haut (Apple
   demande 40 au moins), ils restent sur une ligne. Mêmes rapports de marge que ci-dessus. */
@media (max-width: 400px) {
  .store-badge img { height: 46px; }
  .store-badge.play img { height: 59.9px; margin: -6.95px 0; }
  .store-badge.play-en img { height: 68.45px; margin: -11.23px; }
}
.stores { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 16px; }

/* Pourquoi hinoko : six cartes. */
.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0 0; padding: 0; list-style: none; }
.feats li { padding: 18px 20px 20px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--lift); }
.feats h3 { margin: 0 0 6px; font: 800 19px/1.3 var(--round); }
.feats p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }

.lib-more { margin: 14px 0 0; }
@media (min-width: 721px) { #sample .story-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lib-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 0 16px; margin-top: 30px; }
.lib-title { margin: 0; font: 900 24px/1.25 var(--round); }
#stories .lib-head, #sample .lib-head { margin-top: 28px; }
.premium-sec .btn { margin-top: 20px; }

/* Fiches sur deux colonnes (le comparatif des apps, « une par une ») ; les questions des pages sont des volets
   <details> (tools/seo/faq.mjs, bloc b4-accueil). */
.faq { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 28px; margin-top: 18px; }
.qa h3 { margin: 0 0 6px; font: 800 18px/1.35 var(--round); }
.qa p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }

/* Page d'un niveau : titre, chiffres, présentation, premier bouton. */
.level-head { padding: 8px 0 8px; }
.facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font: 800 15px/1.4 var(--round); color: var(--ink-3); }
.level-head .section-lede { margin-top: 14px; }
.level-head .actions { margin-top: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.chips .chip { font: 400 15px/1.7 var(--jp); color: var(--ink); }

/* Page d'une histoire : en-tête comme le lecteur, texte avec furigana, traduction repliable (case à cocher, sans
   JavaScript), vocabulaire, histoires voisines. */
.story-page .story-head { padding-top: 10px; }
.story-head h1 .ja-t { display: block; }
.story-head h1 .title-tr { display: block; margin-top: 4px; font: 800 21px/1.35 var(--round); color: var(--ink-2); letter-spacing: 0; }
.story-head .sum { max-width: 40em; margin: 16px 0 0; color: var(--ink-2); font-size: 17px; line-height: 1.6; }
.read-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 22px; }
.read-cta .hint { margin: 0; font: 700 14px/1.4 var(--round); color: var(--ink-3); }
.read-cta.end { margin: 36px 0 0; }
.story-head .lock, .story-nav .lock { margin-left: 2px; }
.sw { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
label.toggle { display: inline-flex; align-items: center; user-select: none; -webkit-user-select: none; }
#fu:checked ~ .toolbar-bar [for="fu"], #tl:checked ~ .toolbar-bar [for="tl"] {
  background: var(--coral-soft); color: var(--coral-soft-ink); box-shadow: inset 0 0 0 2px var(--coral);
}
#fu:focus-visible ~ .toolbar-bar [for="fu"], #tl:focus-visible ~ .toolbar-bar [for="tl"] { outline: 3px solid var(--coral-text); outline-offset: 2px; }
#fu:not(:checked) ~ .wrap .story-text { --lh: 1.7; }
#fu:not(:checked) ~ .wrap .story-text rt { display: none; }
#tl:checked ~ .wrap .story-text .tl { display: block; }
.story-text { padding: 28px 0 8px; }
.story-text .sent { padding-left: 0; }
.story-text .ja { margin: 0; }
.story-text .tl { margin: 0 0 0.85em; }
.vocab-sec { margin-top: 48px; }
.vocab-sec h2, .free-same h2 { margin: 0 0 14px; font: 900 26px/1.2 var(--round); }
.vocab-sec h2 .n { font: 800 15px/1 var(--round); color: var(--ink-3); margin-left: 6px; }
.glossary { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); column-gap: 28px; margin: 0; border-top: 2px solid var(--line); }
.glossary > div { padding: 9px 0 10px; border-bottom: 2px solid var(--line); }
.glossary dt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; }
.glossary .vj { font: 700 19px/1.6 var(--jp); }
.glossary .vk { font: 400 15px/1.6 var(--jp); color: var(--ink-2); }
.glossary dd { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.story-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 48px; }
.nav-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 18px 14px;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--lift);
  color: var(--ink); text-decoration: none;
}
.nav-card.next { grid-column: 2; align-items: flex-end; text-align: right; }
.nav-card .dir { font: 800 13px/1.4 var(--round); color: var(--ink-3); }
.nav-card .t { font: 700 19px/1.8 var(--jp); }
.nav-card .tr { font: 800 14.5px/1.35 var(--round); color: var(--ink-2); }
@media (hover: hover) { .nav-card:hover { border-color: color-mix(in srgb, var(--coral) 50%, var(--line)); } }
.premium-box { margin-top: 28px; padding: 22px 22px 20px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--lift); }
.premium-box h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font: 900 22px/1.3 var(--round); }
.premium-box h2 .lock-i { width: 18px; height: 18px; flex: none; color: var(--coral-text); }
.premium-box > p { margin: 0 0 18px; color: var(--ink-2); line-height: 1.6; }
.premium-box .perks { margin-bottom: 14px; }
.premium-box .note { margin: 0; font: 700 14px/1.4 var(--round); color: var(--ink-3); }
.free-same { margin-top: 40px; }
.not-found { padding: 56px 0 8px; }
.not-found img { width: 96px; height: 96px; }
.not-found h1 { margin: 18px 0 0; font-size: clamp(32px, 5vw, 44px); }
.not-found .actions { margin-top: 26px; }

/* Lien « ← Toutes les histoires » en bas des pages d'app, juste au-dessus du pied de page (lui : bloc b4-accueil). */
.back-row { margin-top: 56px; }
.back-row + footer.site-foot { margin-top: 12px; }

@media (max-width: 720px) {
  .crumbs { padding-top: 8px; font-size: 13.5px; }
  .page-title { font-size: 32px; }
  .section-lede { font-size: 16px; }
  .feats, .faq { grid-template-columns: 1fr; }
  .feats { gap: 12px; }
  .stores { gap: 8px 14px; }
  .lib-title { font-size: 21px; }
  .story-head h1 .title-tr { font-size: 19px; }
  .story-nav { grid-template-columns: 1fr; }
  .nav-card.next { grid-column: auto; align-items: flex-start; text-align: left; }
  .vocab-sec h2, .free-same h2 { font-size: 23px; }
  .premium-box { padding: 18px 16px 16px; }
  .read-cta .btn { width: 100%; font-size: 17px; padding: 10px 16px; }
  .glossary { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); column-gap: 18px; }
}
/* Téléphone : « Histoires » et « Mes mots » gardent leur nom en entier dans toutes les langues ; la langue passe
   dans le pied de page, les réglages « Aa » dans la barre de lecture (lecteur et pages des histoires). */
@media (max-width: 560px) {
  .top .lang-select, .top .nav > [data-settings] { display: none; }
  .nav > a { padding: 0 10px; }
}
@media (max-width: 359px) {
  .top .wrap { padding: 0 12px; }
  .nav > a { padding: 0 7px; font-size: 14px; }
}

/* --- Pages d'apprentissage (tools/seo/learn.mjs) : contes, vocabulaire par thème, listes du JLPT, mots ---------- */
.learn-head { padding: 6px 0 2px; }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); column-gap: 28px; border-top: 2px solid var(--line); }
.link-list li { padding: 11px 0 12px; border-bottom: 2px solid var(--line); }
.link-list .link { display: block; min-height: 0; padding: 3px 0; font-size: 15.5px; line-height: 1.45; }
.link-list p { margin: 4px 0 0; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.examples .sent { margin: 0 0 16px; }
.examples .tl, .grammar-list .tl { margin: 2px 0 0; }
a.src { margin-left: 6px; font: 700 13.5px/1.4 var(--round); color: var(--coral-text); white-space: nowrap; }
.glossary .vr { font: 600 13px/1.6 var(--round); color: var(--ink-3); }
.glossary.kanji .kj { font-size: 30px; }
.glossary .kw { margin-left: 6px; color: var(--ink-3); }
.grammar-list .gp { padding: 14px 0 12px; border-bottom: 2px solid var(--line); }
.grammar-list .gp h3 { margin: 0 0 4px; font: 700 20px/1.4 var(--jp); }
.grammar-list .gp > p { margin: 0 0 8px; color: var(--ink-2); }
.word-card { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 8px 0 12px; }
.word-card .wj { font: 700 44px/1.2 var(--jp); }
.word-card .wk { font: 400 22px/1.4 var(--jp); color: var(--ink-2); }
.word-card .wr { font: 700 18px/1.4 var(--round); color: var(--ink-3); }
.answer { margin: 0 0 6px; font: 700 19px/1.55 var(--round); }
/* Fiches de mots fondues dans les thèmes et les guides (refonte du 17/11/2026) : sommaire en pastilles, une section par
   mot (titre, carte, réponse, formes visibles), le détail replié sous « En savoir plus ». */
.entry-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.entry-toc a { display: inline-flex; align-items: baseline; gap: 8px; min-height: 42px; padding: 8px 14px; border: 2px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font: 700 17px/1.2 var(--jp); }
.entry-toc .et-r { font: 700 13.5px/1.2 var(--round); color: var(--ink-3); }
@media (hover: hover) { .entry-toc a:hover { border-color: var(--coral); background: var(--coral-soft); } }
.entry-block { scroll-margin-top: 84px; }
.entry-block .word-card .wj { font-size: 36px; }
.entry-block h3 { margin: 22px 0 6px; font: 800 18px/1.35 var(--round); }
.entry-more { margin-top: 12px; border-top: 2px solid var(--line); }
.entry-more > summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 0; cursor: pointer; list-style: none; font: 800 16px/1.3 var(--round); color: var(--coral-text); }
.entry-more > summary::-webkit-details-marker { display: none; }
.entry-more > summary::before { content: ''; flex: none; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.entry-more[open] > summary::before { transform: rotate(45deg); }
.entry-more .examples { margin-top: 16px; }
/* Visuels des thèmes de vocabulaire (tools/seo/visuals.mjs, refonte du 17/11/2026) : compteurs en images, étiquettes
   en vrai texte, couleurs du site ; les parties du corps : bloc b11-vocab. */
.ct-grid { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.ct-card { padding: 14px 16px 12px; border: 2px solid var(--line); border-radius: 18px; background: var(--surface); }
.ct-ics { display: flex; align-items: flex-end; gap: 2px; min-height: 64px; margin-bottom: 8px; }
.ct-ic { display: block; width: 64px; height: 64px; }
.ct-n2 .ct-ic { width: 52px; height: 52px; }
.ct-n3 .ct-ic { width: 44px; height: 44px; }
.ct-c { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 4px; }
.ct-c > span[lang="ja"] { font: 700 30px/1.1 var(--jp); }
.ct-r { font: 700 13.5px/1.3 var(--round); color: var(--ink-3); }
.ct-m { margin: 0 0 8px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.ct-ex { margin: 0; font: 400 15px/1.5 var(--jp); color: var(--ink); }
.ct-ex .ct-tr { display: block; font: 700 13.5px/1.4 var(--round); color: var(--ink-3); }
.ct-ex .nw { white-space: nowrap; }
table.sd thead th { font: 700 20px/1.4 var(--jp); color: var(--ink); text-transform: none; letter-spacing: 0; }
.sd-title { margin: 26px 0 6px; font: 800 19px/1.3 var(--round); }
.sd-note { margin: 0 0 10px; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
table.sd td, table.sd th { text-align: center; font: 400 17px/1.6 var(--jp); }
table.sd tbody th { font: 800 15px/1.4 var(--round); color: var(--ink-2); }
.sd-q { font: 700 12.5px var(--round); color: var(--ink-3); }
.sd-p { color: var(--coral-text); font-weight: 700; }
.sd-b { color: var(--cyan-soft-ink); font-weight: 700; }
.sd-p sup, .sd-b sup { font: 800 10px var(--round); margin-left: 1px; }
.ic-line { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.ic-fill { fill: var(--coral-soft); }
.ic-fill2 { fill: var(--sun-soft); }
.ic-paper { fill: var(--surface); }
.ic-ink, .ic-arrow { fill: var(--ink); }
.ic-leaf { fill: var(--ok-soft); stroke: var(--ink); stroke-width: 2; }
.ic-beak { fill: var(--sun); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.ic-steam { fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; }
.ic-win { fill: var(--cyan-soft); stroke: var(--ink); stroke-width: 2; }
.ic-flame { fill: var(--coral); }
/* Test de lecture au format du JLPT, en tête des pages de niveau (refonte du 17/11/2026) : chaque texte dans une carte,
   le japonais en grand sur fond doux, les choix en grandes cases ; vert la bonne réponse, rouge l'erreur. */
.rtest .rt-text { margin: 22px 0 0; padding: 20px 22px 6px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.rt-label { margin: 0 0 8px; font: 800 13px/1.2 var(--round); letter-spacing: .06em; text-transform: uppercase; color: var(--coral-text); }
.rt-ctx { margin: 0 0 10px; font: 400 16px/1.9 var(--jp); color: var(--ink-2); }
.rt-passage { padding: 14px 18px; border-radius: 14px; background: var(--surface-2); }
.rt-passage p { margin: 0 0 6px; font: 400 var(--ja-size)/2.1 var(--jp); }
.rt-passage p:last-child { margin-bottom: 0; }
.rtest .nw { white-space: nowrap; }
.rt-tools { margin: 6px 0 0; }
.rt-fu { min-height: 40px; padding: 6px 16px; border: 2px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-3); font: 800 14px/1 var(--round); cursor: pointer; }
.rt-fu[aria-pressed="true"] { border-color: var(--coral); background: var(--coral-soft); color: var(--coral-text); }
.rtest.no-fu .rt-text rt { visibility: hidden; }
.rt-more { margin: 8px 0 0; }
.rt-more > summary, .rt-why > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; list-style: none; font: 800 15px/1.3 var(--round); color: var(--coral-text); }
.rt-more > summary::-webkit-details-marker, .rt-why > summary::-webkit-details-marker { display: none; }
.rt-more > summary::before, .rt-why > summary::before { content: ''; flex: none; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.rt-more[open] > summary::before, .rt-why[open] > summary::before { transform: rotate(45deg); }
.rt-romaji p, .rt-tr p { margin: 4px 0 8px; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.rt-qs { list-style: none; margin: 16px 0 0; padding: 0; }
.rt-q { margin: 0 0 18px; }
.rt-qt { display: flex; gap: 12px; align-items: baseline; margin: 0 0 10px; font: 400 18px/1.9 var(--jp); }
.rt-qn { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: var(--page); font: 800 14px/1 var(--round); }
.rt-choices { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rt-c { display: flex; width: 100%; gap: 12px; align-items: baseline; padding: 9px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--page); color: var(--ink); text-align: left; font: 400 17px/1.9 var(--jp); cursor: pointer; }
.rt-c[disabled], .rt-c[aria-disabled="true"] { cursor: default; }
.rt-n { flex: none; font: 800 15px/1 var(--round); color: var(--ink-3); }
.rt-c.is-right { border-color: var(--ok); background: var(--ok-soft); }
.rt-c.is-wrong { border-color: var(--ko); background: var(--ko-soft); }
@media (hover: hover) { .rt-q:not(.is-done) .rt-c:not([disabled]):hover { border-color: var(--coral); background: var(--coral-soft); } }
.rt-why p { margin: 4px 0 6px; font-size: 15.5px; line-height: 1.6; }
.rt-pdf { margin: 18px 0 0; font-weight: 800; }
.rt-score { margin: 18px 0 0; padding: 14px 18px; border-radius: 14px; background: var(--sun-soft); color: var(--sun-soft-ink); font: 800 16px/1.5 var(--round); }
.tale-intro { margin: 26px 0 0; padding: 18px 20px 8px; border: 2px solid var(--line); border-radius: 18px; background: var(--surface); }
.tale-intro h2 { margin: 0 0 8px; font: 900 22px/1.25 var(--round); }
.tale-intro p { margin: 0 0 10px; line-height: 1.6; color: var(--ink-2); }
/* Note sous un tableau ou des chiffres (la couverture de l'accueil, ses cartes : bloc b4-accueil). */
.cover-note { margin: 12px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-3); }
/* Comparatif des apps de lecture (tools/seo/learn.mjs, appsPage) : le tableau défile sur un téléphone ; la ligne de
   hinoko porte « notre app », comme l'annonce l'introduction. */
.table-scroll { margin-top: 18px; overflow-x: auto; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.compare { width: 100%; min-width: 820px; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
table.compare th, table.compare td { padding: 12px 14px; border-bottom: 2px solid var(--line); text-align: left; vertical-align: top; }
table.compare thead th { font: 800 12px/1.4 var(--round); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
table.compare tbody th { font: 800 16px/1.35 var(--round); white-space: nowrap; }
table.compare tbody th a { color: var(--ink); text-underline-offset: 3px; }
table.compare tbody tr:last-child > * { border-bottom: 0; }
table.compare tr.is-ours > * { background: color-mix(in srgb, var(--coral-soft) 60%, transparent); }
.ours { display: inline-block; margin-left: 4px; padding: 2px 8px; border-radius: 999px; background: var(--coral-soft); color: var(--coral-soft-ink); font: 800 11.5px/1.4 var(--round); vertical-align: 2px; white-space: nowrap; }
.choose { margin: 14px 0 0; padding-left: 1.2em; color: var(--ink-2); font-size: 17px; line-height: 1.6; }
.choose li + li { margin-top: 8px; }
@media (max-width: 720px) {
  /* Téléphone : une fiche par app (l'en-tête de chaque colonne devant sa valeur) plutôt qu'un tableau à faire défiler. */
  .table-scroll { overflow: visible; }
  table.compare { min-width: 0; }
  table.compare thead { display: none; }
  table.compare tbody, table.compare tr, table.compare tbody th, table.compare td { display: block; }
  table.compare tr { padding: 14px 16px; border-bottom: 2px solid var(--line); }
  table.compare tbody tr:last-child { border-bottom: 0; }
  table.compare tbody th, table.compare td { padding: 0; border: 0; white-space: normal; }
  table.compare tbody th { margin-bottom: 6px; }
  table.compare td { display: flex; gap: 10px; padding: 2px 0; }
  table.compare td::before { content: attr(data-label); flex: none; width: 8.5em; font: 800 11.5px/1.9 var(--round); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
  table.compare tr.is-ours { background: color-mix(in srgb, var(--coral-soft) 60%, transparent); }
  table.compare tr.is-ours > * { background: none; }
}

/* --- Pages d'apprentissage, refonte du 31/10/2026 : colonne de lecture, encadré de l'app, tableaux, cartes,
   tableaux de prof. ------------------------------------------------------------------------------------------- */
/* Colonne de lecture (760 px au plus) et, sur un ordinateur, l'app à droite, qui reste en place quand on descend ; sur
   un téléphone, l'encadré vient en fin de page ; caché dans l'app Android. */
.learn-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.learn-main { min-width: 0; max-width: 760px; }
.learn-aside { max-width: 760px; margin-top: 48px; }
@media (min-width: 1080px) {
  .learn-grid { grid-template-columns: minmax(0, 1fr) 300px; column-gap: 56px; align-items: start; }
  .learn-aside { position: sticky; top: 88px; margin-top: 26px; }
}
:root[data-app] .learn-aside { display: none; }
.app-card { padding: 20px 20px 16px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--lift); }
.app-card > img { display: block; width: 88px; height: 88px; margin: -4px 0 4px; }
.app-card__t { margin: 0 0 12px; font: 900 21px/1.25 var(--round); }
.app-card__perks { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 15px; line-height: 1.4; }
.app-card__perks li { position: relative; padding-left: 28px; }
.app-card__perks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--cyan-soft); color: var(--cyan-soft-ink); font: 900 12px/20px var(--round); text-align: center; }
.app-card .stores { margin-top: 16px; }
.app-card__free { margin: 12px 0 0; font: 800 14px/1.4 var(--round); color: var(--ink-3); }
.app-card .link { min-height: 40px; font-size: 14.5px; }

/* Listes du JLPT en tableau : un index des syllabes, puis des lignes larges, le mot en grand. */
.kana-index { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 18px; }
.kana-index a { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; min-height: 42px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: 700 19px/1 var(--jp); text-decoration: none; }
@media (hover: hover) { .kana-index a:hover { border-color: var(--coral); background: var(--coral-soft); } }
.vt-wrap { border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--lift); overflow: clip; }
table.vt { width: 100%; border-collapse: collapse; }
table.vt thead th { position: sticky; top: 64px; z-index: 1; padding: 11px 14px; background: var(--surface-2); border-bottom: 2px solid var(--line); text-align: left; font: 800 12.5px/1.3 var(--round); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
table.vt td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.vt tbody tr:not(.vt-h):nth-child(odd) td { background: color-mix(in srgb, var(--surface-2) 40%, var(--surface)); }
table.vt tbody:last-child tr:last-child td { border-bottom: 0; }
tr.vt-h th { padding: 16px 14px 8px; border-bottom: 2px solid var(--line); background: var(--surface); text-align: left; scroll-margin-top: 120px; }
tr.vt-h th span { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; background: var(--coral-soft); color: var(--coral-soft-ink); font: 800 23px/1 var(--jp); }
table.vt tbody { scroll-margin-top: 110px; }
.vt-n { width: 1%; padding-right: 4px !important; color: var(--ink-3); font: 800 13px/1 var(--round); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.vt-w { font: 700 26px/1.3 var(--jp); color: var(--ink); word-break: keep-all; }
.vt-r { min-width: 7em; }
.vt-k { display: block; font: 500 17px/1.45 var(--jp); color: var(--ink-2); }
.vt-ro { display: block; font: 700 13.5px/1.4 var(--round); color: var(--ink-3); }
.vt-m { font-size: 16px; line-height: 1.5; }
.vt-m a.src { margin-left: 6px; font-size: 13px; white-space: normal; }
.vt-g { width: 1%; text-align: center; white-space: nowrap; }
.vg { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 30px; padding: 0 8px; border-radius: 10px; font: 900 15px/1 var(--round); }
.vg-1 { background: var(--cyan-soft); color: var(--cyan-soft-ink); }
.vg-2 { background: var(--sun-soft); color: var(--sun-soft-ink); }
.vg-3 { background: var(--violet-soft); color: var(--violet-soft-ink); }
.vt-legend { margin: 10px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
table.vt-plain { margin-top: 0; }
.section .vt-wrap { margin-top: 18px; }
.section .kana-index + .vt-wrap { margin-top: 0; }
table.kt .kt-k { width: 1%; padding: 10px 18px; font: 700 40px/1.1 var(--jp); text-align: center; }
table.kt .kt-on, table.kt .kt-kun, table.kt .kt-w { font: 500 16.5px/1.55 var(--jp); color: var(--ink-2); }
table.kt .kt-w { color: var(--ink); }
table.kt .nw { white-space: nowrap; }
@media (max-width: 640px) {
  /* Téléphone : une fiche par mot, sans tableau à faire défiler : le mot et sa lecture, puis le sens. */
  table.vt thead { display: none; }
  table.vt, table.vt tbody, table.vt tr, table.vt th, table.vt td { display: block; }
  table.vt tr:not(.vt-h) { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  table.vt tbody tr:not(.vt-h):nth-child(odd) { background: color-mix(in srgb, var(--surface-2) 40%, var(--surface)); }
  table.vt td { padding: 0; border: 0; background: none !important; }
  table.vt .vt-n { grid-row: 1 / span 3; padding-top: 9px; }
  table.vt .vt-w { grid-column: 2; font-size: 24px; }
  table.vt .vt-r { grid-column: 2; }
  table.vt .vt-k, table.vt .vt-ro { display: inline; margin-right: 8px; }
  table.vt .vt-m { grid-column: 2 / -1; margin-top: 4px; font-size: 15.5px; }
  table.vt .vt-g { grid-column: 3; grid-row: 1; align-self: start; }
  table.kt tr:not(.vt-h) { grid-template-columns: auto minmax(0, 1fr); }
  table.kt .kt-k { grid-row: 1 / span 4; align-self: start; padding: 2px 6px 0 0; }
  table.kt td:not(.kt-k) { grid-column: 2; }
}

/* Accueils des mots et de la grammaire : une carte par entrée, le japonais en grand. */
.entry-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.entry-card { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 16px 18px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--lift); color: var(--ink); text-decoration: none; }
.entry-card .ec-ja { font: 700 30px/1.3 var(--jp); }
.entry-card .ec-ro { font: 800 14px/1.3 var(--round); color: var(--ink-3); }
.entry-card .ec-t { margin-top: 10px; font: 800 15px/1.4 var(--round); color: var(--coral-text); }
@media (hover: hover) { .entry-card:hover { border-color: color-mix(in srgb, var(--coral) 50%, var(--line)); } }

/* Grammaire des listes du JLPT : chaque point avec son étiquette, plus d'air entre les points. */
.grammar-list .gp { padding: 20px 0 16px; }
.grammar-list .gp h3 { display: inline-block; margin: 0 0 8px; padding: 3px 14px; border-radius: 14px; background: var(--coral-soft); color: var(--coral-soft-ink); font: 700 21px/1.45 var(--jp); }
.grammar-list .gp > p { font-size: 16.5px; line-height: 1.55; }

/* Tableau de prof : une ardoise dans un cadre de bois, le japonais à la craie, les signes en jaune, ce qui change en
   corail (ce qu'on quitte) et en cyan (ce qu'on obtient). Du texte, pas une image : lisible, traduisible, net. */
.board { margin: 24px 0 6px; padding: 22px 24px 18px; background: var(--board); color: var(--board-ink); border: 7px solid var(--board-frame); border-radius: 18px; }
.bd-title { margin: 0 0 14px; font: 900 14px/1.3 var(--round); letter-spacing: 0.06em; text-transform: uppercase; color: var(--board-sun); text-align: center; }
.board figcaption { margin-top: 16px; font: 700 15px/1.5 var(--round); color: var(--board-dim); text-align: center; }
.bd-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; }
.bd-compare { gap: 14px 34px; }
.bd-part { display: inline-flex; flex-direction: column; align-items: center; min-width: 60px; text-align: center; }
.bd-k { font: 700 54px/1.15 var(--jp); color: var(--board-ink); }
.bd-r { font: 500 16px/1.4 var(--jp); color: var(--board-dim); }
.bd-m { max-width: 9em; font: 800 14px/1.3 var(--round); color: var(--board-dim); }
.bd-result .bd-k { color: var(--board-cyan); }
.bd-op { font: 900 34px/1 var(--round); color: var(--board-sun); }
.bd-conj { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 28px; margin: 0; padding: 0; list-style: none; }
.bd-conj li { display: flex; align-items: baseline; gap: 10px; font: 700 26px/1.35 var(--jp); }
.bd-conj b { font-weight: inherit; }
.bd-arrow { font: 900 20px/1 var(--round); color: var(--board-sun); }
.bd-from { color: var(--board-coral); }
.bd-to { color: var(--board-cyan); }
.bd-sent { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 14px 4px; }
.bd-chunk { display: inline-flex; flex-direction: column; align-items: center; }
.bd-w { font: 700 34px/1.25 var(--jp); }
.bd-chunk.is-p .bd-w { color: var(--board-coral); }
.bd-chunk.is-p { margin-right: 16px; }   /* un groupe de mots finit sur sa particule : 私は　図書館で… */
.bd-chunk.is-p:last-child { margin-right: 0; }
.bd-role { margin-top: 6px; padding-top: 4px; border-top: 2px dashed var(--board-dim); font: 800 13px/1.25 var(--round); color: var(--board-dim); text-align: center; }
.bd-tr { margin: 16px 0 0; font: 700 15.5px/1.45 var(--round); color: var(--board-ink); text-align: center; }
@media (max-width: 640px) {
  .board { padding: 16px 14px 14px; border-width: 5px; }
  .bd-k { font-size: 42px; }
  .bd-w { font-size: 26px; }
  .bd-conj { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
  .bd-conj li { gap: 5px; font-size: 19px; }
  .bd-arrow { font-size: 15px; }
  .bd-op { font-size: 28px; }
}

/* Accueil, hinoko Premium (31/10/2026, « beaucoup mieux, plus belle ») : une carte avec la mascotte « fier », les trois
   atouts, les trois formules (l'annuel au milieu, mis en avant avec son essai et son prix par mois), le bouton d'essai et
   la règle de renouvellement. Les formules mènent à l'offre avec la formule choisie (/premium?plan=…). */
.pm { padding: 30px 30px 24px; border: 2px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: var(--lift); }
.pm-intro { display: flex; align-items: center; gap: 22px; }
.pm-art { flex: none; width: 112px; height: 112px; }
.pm-intro .section-lede { margin-top: 8px; }
.pm .perks { margin: 24px 0 28px; }
.pm-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pm-plan { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 20px 18px 16px; border: 2px solid var(--line); border-radius: 20px; background: var(--page); color: var(--ink); text-decoration: none; box-shadow: 0 4px 0 var(--line); }
.pm-plan.is-best { border-color: var(--coral); background: var(--coral-soft); box-shadow: 0 4px 0 var(--coral); }
.pm-tag { position: absolute; top: -13px; left: 16px; padding: 3px 11px; border-radius: 999px; background: var(--sun); color: #2B1D2E; font: 900 12.5px/1.35 var(--round); white-space: nowrap; }
.pm-name { font: 900 15px/1.3 var(--round); color: var(--ink-2); }
.pm-price { margin-top: 2px; font: 900 32px/1.1 var(--round); color: var(--ink); font-variant-numeric: tabular-nums; }
.pm-per { font: 700 13.5px/1.35 var(--round); color: var(--ink-3); }
.pm-plan.is-best .pm-name, .pm-plan.is-best .pm-per { color: var(--coral-soft-ink); }
@media (hover: hover) { .pm-plan:hover { border-color: var(--coral); } }
.pm-plan:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--line); }
.pm-plan.is-best:active { box-shadow: 0 2px 0 var(--coral); }
.pm-plan:focus-visible { outline: 3px solid var(--coral-text); outline-offset: 3px; }
.pm-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 28px; }
.pm-cta .link { font-size: 15px; }
.pm-note { margin: 10px 0 0; font: 700 13.5px/1.45 var(--round); color: var(--ink-3); }
@media (max-width: 720px) {
  .pm { padding: 22px 16px 18px; border-radius: 24px; }
  .pm-intro { flex-direction: column; align-items: flex-start; gap: 8px; }
  .pm-art { width: 84px; height: 84px; }
  .pm-plans { grid-template-columns: 1fr; gap: 18px; }
  .pm-plan { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 10px; }
  .pm-name { flex-basis: 100%; }
  .pm-price { font-size: 28px; }
  .pm-cta .btn { width: 100%; }
}

/* Écritures (pages hiragana, katakana, alphabet ; tools/seo/kana.mjs) : une case par caractère, le kana en grand et son
   rōmaji dessous ; dans le tableau de l'alphabet, le katakana du même son à côté. Touché, il se fait entendre
   (assets/pages.js : .can-say seulement avec une voix japonaise). */
.kana-wrap { overflow-x: auto; margin: 14px -4px 4px; padding: 0 4px; }
table.kana-chart { border-collapse: separate; border-spacing: 6px; margin: 0; }
.kana-chart th { font: 800 12px/1 var(--round); color: var(--ink-3); padding: 2px 4px; text-align: center; }
.kana-chart tbody th { text-align: right; padding-right: 6px; }
.kana-chart td { width: 64px; }
.kana-chart td, .kana-list li { min-width: 64px; height: 70px; text-align: center; vertical-align: middle; background: var(--surface); border-radius: 14px; padding: 6px 4px; }
.kana-chart td.kana-gap { background: transparent; border-color: transparent; box-shadow: none; }
.kana-chart .kc, .kana-list .kc { display: block; font: 500 28px/1.1 var(--jp); color: var(--ink); }
.kana-chart.is-both .kc { display: inline; }
.kana-chart .kc2 { font: 500 17px/1.1 var(--jp); color: var(--ink-2); margin-left: 4px; }
.kana-chart .kr, .kana-list .kr { display: block; margin-top: 4px; font: 700 13px/1.2 var(--round); color: var(--coral-text); }
.kana-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; padding: 0; margin: 14px 0 4px; }
.kana-note { display: none; margin: 4px 0 0; font-size: 14px; color: var(--ink-3); }
.can-say .kana-note { display: block; }
.can-say [data-say] { cursor: pointer; }
@media (hover: hover) { .can-say [data-say]:hover { box-shadow: inset 0 0 0 2px var(--coral); } }
.can-say [data-say]:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }
table.compare.scripts { min-width: 0; }
@media (max-width: 520px) {
  table.kana-chart { border-spacing: 4px; }
  .kana-chart td { width: 52px; }
  .kana-chart td, .kana-list li { min-width: 52px; height: 60px; border-radius: 12px; padding: 4px 2px; }
  .kana-chart .kc, .kana-list .kc { font-size: 24px; }
  .kana-chart .kc2 { font-size: 14px; margin-left: 2px; }
  .kana-chart .kr, .kana-list .kr { font-size: 12px; }
}

/* Guides (tools/seo/learn.mjs, topicPage) : une carte par entrée, le nom en kanji en grand, sa lecture à côté. */
.topic-items { display: grid; gap: 10px; margin-top: 14px; }
.topic-item { background: var(--surface); border-radius: 18px; padding: 14px 18px; }
.topic-item h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 6px; }
.topic-item .ti-ja { font: 600 26px/1.2 var(--jp); color: var(--ink); }
.topic-item .ti-r { font: 700 14px/1.3 var(--round); color: var(--coral-text); }
.topic-item p { margin: 0; color: var(--ink-2); line-height: 1.6; }
.topic-steps { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.topic-step { background: var(--surface); border-radius: 18px; padding: 14px 18px; }
.topic-step h3 { margin: 0 0 6px; font: 800 18px/1.3 var(--round); }
.topic-step p { margin: 0 0 8px; color: var(--ink-2); line-height: 1.6; }

/* === b2-niveaux === */
/* Pages de niveau (tools/seo/levelguide.mjs) : le sommaire « Sur cette page », puis sous les histoires l'épreuve de
   lecture, kanji et mots avec l'échelle N5 → N2, rōmaji et furigana, « ce niveau est-il le bon ? », la FAQ. Une couleur
   par niveau, celle de son badge (jetons --n5… de :root, bloc b9-badges), la même que dans le gabarit d'histoire : N5
   vert, N4 bleu, N3 violet, N2 orange doré ; le nom du niveau reste toujours écrit dans la pastille. Les cartes de la
   liste (#levelStories) prennent la couleur de la page. */
.badge.lvl[data-level="N4"], #levelStories[data-level="N4"] .badge.lvl { background: var(--n4-soft); color: var(--n4-ink); }
.badge.lvl[data-level="N3"], #levelStories[data-level="N3"] .badge.lvl { background: var(--n3-soft); color: var(--n3-ink); }
.badge.lvl[data-level="N2"], #levelStories[data-level="N2"] .badge.lvl { background: var(--n2-soft); color: var(--n2-ink); }
.badge.lvl[data-level="N1"] { background: var(--n1-soft); color: var(--n1-ink); }
.lv-sec, .lv-step { --lv-soft: var(--n5-soft); --lv-ink: var(--n5-ink); --lv-edge: var(--n5); }
:is(.lv-sec, .lv-step)[data-level="N4"] { --lv-soft: var(--n4-soft); --lv-ink: var(--n4-ink); --lv-edge: var(--n4); }
:is(.lv-sec, .lv-step)[data-level="N3"] { --lv-soft: var(--n3-soft); --lv-ink: var(--n3-ink); --lv-edge: var(--n3); }
:is(.lv-sec, .lv-step)[data-level="N2"] { --lv-soft: var(--n2-soft); --lv-ink: var(--n2-ink); --lv-edge: var(--n2); }
.lv-sec > .section-lede, #list > .lv-list-lede { max-width: 46em; }
/* Les liens ferment la section : un filet au-dessus de chaque lien, aucun dessous (le filet de la section suivante
   ferme la liste, sans double trait). Deux ou quatre liens sur deux colonnes, trois sur trois, un seul sur toute la
   largeur : jamais de lien orphelin sur sa ligne. */
.lv-sec > .link-list { margin-top: 22px; border-top: 0; }
.lv-sec > .link-list li { border-top: 2px solid var(--line); border-bottom: 0; }
.lv-sec > .link-list[data-n="1"] { grid-template-columns: minmax(0, 1fr); }
.lv-sec > .link-list:is([data-n="2"], [data-n="4"]) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lv-sec > .link-list[data-n="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
:is(.lv-sec, .level-head, .rtest .section-lede) .jp { white-space: nowrap; }   /* une tournure (〜ばかりでなく, たら, 読解) ne se coupe pas en fin de ligne */
/* Lien dans une réponse de la FAQ (le PDF du N5) et dans le chapeau du test (vers #exam) : comme les liens .link du site. */
:is(.lv-sec .qa, .rtest .section-lede) a { color: var(--coral-text); font-weight: 800; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* En tête de page : le badge et la ligne de faits côte à côte, même à 375 px (la ligne de faits revient à la ligne
   à côté du badge au lieu de passer seule dessous). */
.level-head .facts { flex-wrap: nowrap; align-items: baseline; }
.level-head .facts > .badge { flex: none; }
/* Le bouton « Lire la première histoire », sous le chapeau de la liste des histoires (après le test). */
#list > .lv-list-start { margin-top: 18px; }

/* Test de lecture (ici et sur la page Histoires, mêmes classes .rt-c) : la bonne réponse et l'erreur marquées d'un
   signe, pas seulement par la couleur, comme .sq-c sur la page d'histoire. Furigana masqués (N3, N2 au départ) : les
   lectures sortent de la ligne (display, pas visibility) pour ne pas laisser de trou dans les mots (住民, 作業中). */
.rt-c.is-right::after, .rt-c.is-wrong::after { flex: none; align-self: center; margin-left: auto; font: 900 19px/1 var(--round); }
.rt-c.is-right::after { content: '\2713'; color: var(--ok); }   /* ✓ */
.rt-c.is-wrong::after { content: '\2717'; color: var(--ko); }   /* ✗ */
.rtest.no-fu .rt-text rt { display: none; }

/* Sommaire « Sur cette page », entre le test et les histoires : les pastilles du sommaire des fiches de mots
   (.entry-toc), avec la police de l'interface. Les sections ont déjà leur scroll-margin-top (sous la barre collante). */
.lv-toc { margin-top: 36px; }
.lv-toc-t { margin: 0; font: 800 14px/1.3 var(--round); color: var(--ink-3); }
.lv-toc .entry-toc { margin: 10px 0 0; }
.lv-toc .entry-toc a { align-items: center; font: 800 15.5px/1.25 var(--round); }
.lv-toc .entry-toc a:focus-visible { outline: 3px solid var(--coral-text); outline-offset: 2px; }

/* 1. L'épreuve de lecture : un tableau propre, le nom japonais de la sorte de question en tête de ligne (avec ses
   lectures au N5 et au N4, et le texte du test du haut qui la fait travailler), puis la longueur et le nombre de
   questions. Sous le tableau, la note et ses sources en liens. */
table.compare.lv-exam { min-width: 0; }
table.compare.lv-exam tbody th { width: 30%; white-space: normal; }
.lv-exam .lv-ja { display: block; font: 700 18px/1.5 var(--jp); color: var(--ink); }
.lv-exam .lv-ja ruby { line-height: 2; ruby-align: center; }   /* les lectures débordent un peu plutôt que d'espacer les kanji */
.lv-exam .lv-tn { display: block; margin-top: 2px; font: 700 13.5px/1.35 var(--round); color: var(--ink-3); }
.lv-exam .lv-intest { display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 999px; background: var(--lv-soft); color: var(--lv-ink); font: 800 12.5px/1.4 var(--round); text-decoration: none; }
.lv-exam .lv-intest:focus-visible { outline: 3px solid var(--coral-text); outline-offset: 2px; }
@media (hover: hover) { .lv-exam .lv-intest:hover { text-decoration: underline; } }
.lv-exam td { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
table.compare.lv-exam td:is(.lv-len, .lv-items) { width: 1%; white-space: nowrap; font-weight: 800; color: var(--ink); }
table.compare.lv-exam td.lv-items { text-align: center; font-variant-numeric: tabular-nums; }
.lv-sec .cover-note a { color: var(--ink-2); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* 2. L'échelle N5 → N2 : quatre cartes de même hauteur. Dans chacune, tous les mots du N5 jusqu'au niveau : le nombre,
   puis une barre à l'échelle du plus grand cumul (en gris les mots des niveaux d'en dessous, à la couleur du niveau
   ceux qu'il ajoute) ; puis ses mots nouveaux, ses points de grammaire et ses histoires. Celle de la page en couleur. */
.lv-ladder { margin: 28px 0 0; }
.lv-ladder .cover-note { margin-top: 12px; }
.lv-ladder + .section-lede { margin-top: 24px; }
.lv-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.lv-step { display: flex; }
.lv-card {
  flex: 1; display: flex; flex-direction: column; padding: 14px 16px 16px;
  border: 2px solid var(--line); border-top: 6px solid var(--lv-edge); border-radius: 16px;
  background: var(--surface); color: var(--ink); text-decoration: none;
}
.lv-step.is-here .lv-card { background: var(--lv-soft); border-color: var(--lv-edge); }
.lv-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.lv-here { font: 800 12.5px/1.3 var(--round); color: var(--lv-ink); }
.lv-total { font: 700 13.5px/1.35 var(--round); color: var(--ink-3); }
.lv-step.is-here .lv-total { color: var(--ink-2); }   /* sur le fond de couleur, --ink-3 tombait sous 4,5:1 (4,30 à 4,49) */
.lv-total b { display: block; font: 900 26px/1.15 var(--round); color: var(--ink); font-variant-numeric: tabular-nums; }
.lv-bar { display: flex; height: 10px; margin: 8px 0 12px; border-radius: 999px; overflow: hidden; background: color-mix(in srgb, var(--ink-3) 16%, transparent); }
.lv-bar > span { flex: none; }
.lv-bar-prev { background: color-mix(in srgb, var(--ink-3) 50%, transparent); }
.lv-bar-new { background: var(--lv-edge); }
.lv-nums { display: grid; gap: 3px; }
.lv-num { font: 700 14.5px/1.4 var(--round); color: var(--ink-2); }
.lv-num b { font: 900 17px/1.3 var(--round); color: var(--ink); font-variant-numeric: tabular-nums; }
@media (hover: hover) { a.lv-card:hover { border-color: var(--lv-edge); } }
a.lv-card:focus-visible { outline: 3px solid var(--coral-text); outline-offset: 2px; }

/* 3. Rōmaji et furigana : deux encadrés côte à côte. 4. Ce qu'on sait faire, puis deux portes : le niveau d'en dessous
   et celui d'au-dessus. */
.lv-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.lv-box { padding: 18px 20px 20px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.lv-box h3 { margin: 0 0 8px; font: 800 19px/1.3 var(--round); }
.lv-box p { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.6; }
.lv-check { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; max-width: 46em; }
.lv-check li { position: relative; padding-left: 36px; color: var(--ink-2); font-size: 16.5px; line-height: 1.55; }
.lv-check li::before {
  content: "✓"; position: absolute; left: 0; top: 0; width: 25px; height: 25px; border-radius: 50%;
  background: var(--lv-soft); color: var(--lv-ink); font: 900 13px/25px var(--round); text-align: center;
}
.lv-moves { margin-top: 24px; }
.lv-move {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 18px 16px;
  border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--lift);
  color: var(--ink); text-decoration: none;
}
.lv-move.up { grid-column: 2; align-items: flex-end; text-align: right; }
.lv-move-k { font: 800 13px/1.4 var(--round); color: var(--ink-3); }
.lv-move-t { font: 800 17px/1.4 var(--round); color: var(--coral-text); }
@media (hover: hover) { .lv-move:hover { border-color: color-mix(in srgb, var(--coral) 50%, var(--line)); } }
.lv-move:focus-visible { outline: 3px solid var(--coral-text); outline-offset: 2px; }

/* Tablette : l'échelle sur deux colonnes (deux cartes par ligne, toujours de même hauteur). */
@media (max-width: 960px) {
  .lv-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  /* Le tableau devient une fiche par sorte de question (table.compare) : plus de largeurs de colonnes, et la longueur
     revient à la ligne (« sekitar 600 karakter seluruhnya » débordait à 375 px). */
  table.compare.lv-exam tbody th, table.compare.lv-exam td:is(.lv-len, .lv-items) { width: auto; white-space: normal; text-align: left; }
  .lv-pair { grid-template-columns: 1fr; }
  .lv-move.up { grid-column: auto; align-items: flex-start; text-align: left; }
  .lv-sec > .link-list[data-n] { grid-template-columns: minmax(0, 1fr); }   /* les liens, un par ligne */
}
/* Téléphone : l'échelle devient une liste, une ligne par niveau, la couleur du niveau en bordure gauche. */
@media (max-width: 640px) {
  .lv-steps { grid-template-columns: 1fr; gap: 8px; }
  .lv-card { padding: 12px 14px 13px; border-top: 2px solid var(--line); border-left: 6px solid var(--lv-edge); }
  .lv-top { margin-bottom: 6px; }
  .lv-total b { display: inline; margin-right: 4px; font-size: 21px; }
  .lv-bar { margin: 8px 0 9px; }
  .lv-nums { display: flex; flex-wrap: wrap; gap: 2px 14px; }
  .lv-num b { font-size: 16px; }
}
/* === fin b2-niveaux === */

/* === b2-histoire === */
/* Page d'une histoire gratuite, gabarit v2 (refonte du 17/11/2026, action 2.1 ; tools/seo/pages.mjs, freeStoryPage) :
   badge du niveau en couleur, fiche de faits, espaces entre les groupes de mots, questions corrigées dans des
   <details>, grammaire avec la phrase de l'histoire, histoire suivante. Rien que des jetons du site. */

/* Badges de niveau (visuel 5) : une couleur par niveau, celle de son badge dessiné (jetons --n5…), le texte « N5 »
   toujours écrit (jamais la couleur seule). */
.badge.lvl.lv-n5 { background: var(--n5-soft); color: var(--n5-ink); }
.badge.lvl.lv-n4 { background: var(--n4-soft); color: var(--n4-ink); }
.badge.lvl.lv-n3 { background: var(--n3-soft); color: var(--n3-ink); }
.badge.lvl.lv-n2 { background: var(--n2-soft); color: var(--n2-ink); }
.badge.lvl.lv-n1 { background: var(--n1-soft); color: var(--n1-ink); }

.story-v2 .story-head .meta { margin-top: 14px; font-size: 14.5px; }
.story-v2 .story-head .badge.lvl { height: 28px; padding: 0 12px; font-size: 14px; letter-spacing: 0.02em; }
.story-v2 .story-head .sum { margin-top: 12px; }
/* Titres : quand la lecture est plus large que les kanji (雪女, ゆきおんな), les kanji restent serrés, centrés sous elle
   (sinon le navigateur les écarte : « 雪　女 »). */
.story-v2 .story-head h1 ruby, .next-card .t ruby { ruby-align: center; }

/* Fiche de faits (visuel 6) : cinq cases égales, pictogramme, chiffre, libellé. */
.story-facts {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 22px 0 0; padding: 0; list-style: none;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--lift);
}
.story-facts li { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 14px 6px 12px; text-align: center; }
.story-facts li + li { border-left: 2px solid var(--line); }
.story-facts svg { width: 22px; height: 22px; margin-bottom: 4px; fill: none; stroke: var(--coral-text); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.story-facts svg .guide { stroke-width: 1.4; stroke-dasharray: 1.5 2.1; }
.story-facts b { font: 900 24px/1.15 var(--round); color: var(--ink); }
/* Libellé : un libellé sur deux lignes (« palabra N4 », « N4-Wörter » sur un petit téléphone) et les autres se centrent
   sur la même hauteur, les cinq cases restent symétriques ; sans libellé long, rien ne change. */
.story-facts span {
  flex: 1 0 auto; display: flex; align-items: center; justify-content: center; max-width: 100%;
  font: 700 13px/1.3 var(--round); color: var(--ink-3); overflow-wrap: break-word; hyphens: auto;
}

/* L'illustration de l'histoire (action 2.9) : bloc b24-illus, à la fin de la feuille. */

/* Japonais des choix, des réponses et des exemples de grammaire : il suit le réglage « Aa » (--ja-size) ; 18 px avec la
   taille par défaut, sur ordinateur (22 px × 0,82) comme sur téléphone (20 px × 0,9). */
.story-v2 { --ja-s: calc(var(--ja-size) * 0.82); }

/* Titres des sections : la barre de lecture collante (64 px) ne les cache pas quand on y arrive par un lien (#quizTitle). */
.story-v2 main h2[id] { scroll-margin-top: 84px; }

/* Interrupteur « Espaces » : allumé, une espace entre les groupes de mots (texte, questions, grammaire). Furigana et
   traduction valent aussi pour les questions ; la grammaire montre toujours la traduction de sa phrase. */
#sp:checked ~ .toolbar-bar [for="sp"] { background: var(--coral-soft); color: var(--coral-soft-ink); box-shadow: inset 0 0 0 2px var(--coral); }
#sp:focus-visible ~ .toolbar-bar [for="sp"] { outline: 3px solid var(--coral-text); outline-offset: 2px; }
#sp:checked ~ .wrap .sp { display: inline; word-spacing: 0.22em; }
#fu:not(:checked) ~ .wrap .story-quiz, #fu:not(:checked) ~ .wrap .story-grammar { --lh: 1.7; }
#fu:not(:checked) ~ .wrap .story-quiz rt, #fu:not(:checked) ~ .wrap .story-grammar rt { display: none; }
#tl:checked ~ .wrap .story-quiz .tl, #tl:checked ~ .wrap .story-quiz .sq-ct { display: block; }

/* Sections après le texte : même titre, même respiration. */
.story-quiz, .story-grammar, .story-next { margin-top: 56px; }
.story-quiz h2, .story-grammar h2, .story-next h2 { margin: 0 0 16px; font: 900 26px/1.2 var(--round); }
.story-v2 .read-cta.end { margin-top: 32px; }
.story-v2 .tale-intro { margin-top: 56px; }
.story-v2 .vocab-sec { margin-top: 56px; }
.story-grammar .more, .story-next .more, .vocab-sec .more { margin: 10px 0 0; }
.vocab-sec .glossary + .more { margin-top: 18px; }

/* Questions : une carte par question, les choix numérotés comme à l'examen. Chaque choix est un bouton, désactivé sans
   JavaScript (la réponse reste dans le <details>) ; avec, on le touche (assets/pages.js) : la bonne réponse prend ✓ et
   le vert, une fausse ✗ et le rouge, jamais la couleur seule. */
.sq-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.sq { padding: 18px 20px 4px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--lift); }
.sq-q { display: flex; align-items: baseline; gap: 12px; margin: 0; }
.sq-q .ja { font-size: calc(var(--ja-size) * 0.9); }
.sq-n { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: var(--page); font: 800 14px/1 var(--round); }
.story-quiz .sq > .tl { margin: 0 0 2px 40px; font-size: 15px; }
.sq-choices { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
/* Choix courts : deux colonnes quand le plus large des quatre y tient sur une ligne, même marqué ✓ ou ✗ une fois la
   réponse donnée ; sinon une seule (téléphone, réglage « Aa » agrandi). --sq-w : sa largeur en em de son japonais
   (--ja-s), calculée par tools/seo/pages.mjs (choiceWidth) ; 80 px : numéro, marges, bord et marque. Jamais trois
   colonnes ni plus : chacune fait au moins la moitié de la largeur (moins 5 px, pour l'écart de 8 px et l'arrondi). */
.sq-choices.short { grid-template-columns: repeat(auto-fit, minmax(max(min(100%, calc(var(--ja-s) * var(--sq-w, 7) + 80px)), calc(50% - 5px)), 1fr)); }
.sq-choices li { display: flex; min-width: 0; }
.sq-c {
  display: flex; align-items: baseline; gap: 10px; width: 100%; min-width: 0; margin: 0; padding: 4px 14px;
  border: 2px solid var(--line); border-radius: 14px; background: var(--page); color: var(--ink);
  font: inherit; text-align: left; cursor: pointer;
}
.sq-c[disabled], .sq-c[aria-disabled="true"] { cursor: default; }
.sq-c:focus-visible { outline: 3px solid var(--coral-text); outline-offset: 2px; }
@media (hover: hover) { .sq:not(.is-done) .sq-c:not([disabled]):hover { border-color: var(--coral); background: var(--coral-soft); } }
.sq-c.is-right { border-color: var(--ok); background: var(--ok-soft); }
.sq-c.is-wrong { border-color: var(--ko); background: var(--ko-soft); }
.sq-c.is-right::after, .sq-c.is-wrong::after { flex: none; align-self: center; margin-left: auto; font: 900 19px/1 var(--round); }
.sq-c.is-right::after { content: '\2713'; color: var(--ok); }   /* ✓ */
.sq-c.is-wrong::after { content: '\2717'; color: var(--ko); }   /* ✗ */
.sq-cn { flex: none; font: 800 14px/1 var(--round); color: var(--ink-3); }
.sq-cb { min-width: 0; }
.sq-cb .ja { display: block; font-size: var(--ja-s); }
.sq-ct { display: none; margin: -4px 0 6px; font: 700 14px/1.4 var(--round); color: var(--ink-2); }
.sq-ans { margin: 6px 0 0; }
.sq-ans > summary { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; list-style: none; font: 800 15px/1.3 var(--round); color: var(--coral-text); }
.sq-ans > summary::-webkit-details-marker { display: none; }
.sq-ans > summary::before { content: ''; flex: none; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.sq-ans[open] > summary::before { transform: rotate(45deg); }
.sq-sol { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; margin: 0 0 14px; padding: 4px 14px; border-radius: 14px; background: var(--ok-soft); }
.sq-sol b { font: 800 15px/1.4 var(--round); color: var(--ok); }
.sq-sol .ja { font-size: var(--ja-s); }
.sq-st { font: 700 15px/1.4 var(--round); color: var(--ink-2); }

/* Grammaire : le point en grand, son explication, puis la phrase de l'histoire qui l'emploie. Deux points qui n'ont
   qu'une phrase en commun partagent la même entrée : deux lignes de tête, une seule phrase. */
.sg-list { margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--line); }
.sg { padding: 14px 0 16px; border-bottom: 2px solid var(--line); }
.sg-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 0; }
.sg-head + .sg-head { margin-top: 8px; }
.sg-ja { flex: none; max-width: 100%; font: 700 22px/1.5 var(--jp); color: var(--ink); }
/* L'explication sous le point, sur ordinateur comme sur téléphone : toutes commencent au même bord, quelle que soit la
   longueur du point (あります, 〜ずにはいられない). */
.sg-m { flex: 1 1 100%; min-width: 0; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.sg-ex { margin: 10px 0 0; padding: 0 0 0 16px; border-left: 3px solid color-mix(in srgb, var(--coral) 40%, var(--line)); }
.sg-ex .ja { margin: 0; font-size: var(--ja-s); }
.sg-tl { margin: 0 0 2px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }

/* Vocabulaire : le badge du niveau au-dessus, à côté des mots qui en viennent. */
.glossary .badge.lvl { align-self: center; height: 20px; padding: 0 7px; font-size: 11.5px; }

/* Histoire suivante : une seule carte, la gratuite suivante du même niveau. */
.next-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 20px 16px;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--lift);
  color: var(--ink); text-decoration: none;
}
.next-card .t { font: 700 22px/1.85 var(--jp); }
.next-card .tr { font: 800 16px/1.35 var(--round); color: var(--ink-2); }
.next-card .sum { margin-top: 6px; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.next-card .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; width: 100%; margin-top: 12px; font: 700 13.5px/1.4 var(--round); color: var(--ink-3); }
.next-card .go { margin-left: auto; font: 900 20px/1 var(--round); color: var(--coral-text); }
@media (hover: hover) { .next-card:hover { border-color: color-mix(in srgb, var(--coral) 50%, var(--line)); } }
@media (prefers-reduced-motion: reduce) { .sq-ans > summary::before { transition: none; } }

@media (max-width: 720px) {
  .story-v2 { --ja-s: calc(var(--ja-size) * 0.9); }
  .story-quiz, .story-grammar, .story-next, .story-v2 .tale-intro, .story-v2 .vocab-sec { margin-top: 44px; }
  .story-quiz h2, .story-grammar h2, .story-next h2 { font-size: 24px; }
  .sq { padding: 14px 14px 2px; }
  .story-quiz .sq > .tl { margin-left: 0; }
  .sq-c { padding: 4px 12px; }
  .next-card { padding: 12px 16px 14px; }
}
@media (max-width: 420px) {
  .story-facts li { padding: 12px 2px 10px; }
  .story-facts svg { width: 20px; height: 20px; }
  .story-facts b { font-size: 20px; }
  .story-facts span { font-size: 12px; }
}
/* === fin b2-histoire === */

/* === b2-histoires === */
/* Page Histoires (tools/seo/stories.mjs, refonte du 17/11/2026). Sous le titre, une ligne qui mène aussi aux autres
   niveaux, puis une histoire à lire en entier, dans une carte : titre, interrupteurs, le texte (chaque phrase s'ouvre
   sur sa traduction), trois questions au balisage des tests de lecture (.rt-*, chaque question s'ouvre aussi sur sa
   traduction), puis le lecteur. Ensuite trois conseils de lecture (le guide résumé), puis chaque niveau : ses histoires
   gratuites, puis ses histoires Premium en cartes sans lien (<div class="story-card">), repliées dans un <details>. */
.stories-intro .section-lede { max-width: 44em; }
.stories-intro .section-lede a { color: var(--coral-text); font-weight: 800; white-space: nowrap; text-decoration-thickness: 2px; text-underline-offset: 3px; }

.try { margin-top: 24px; padding: 26px 32px 28px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--lift); }
.try-title { margin: 0; font-weight: 400; }
.try-title .ja-t { display: block; font: 700 clamp(28px, 3.6vw, 34px)/1.7 var(--jp); color: var(--ink); letter-spacing: 0.02em; }
.try-title .try-tr { display: block; font: 800 19px/1.35 var(--round); color: var(--ink-2); }
.try-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 12px 0 0; font: 700 14px/1.4 var(--round); color: var(--ink-3); }

/* Interrupteurs : furigana et espaces (cases à cocher, sans JavaScript), traduction de tout (bouton, avec JavaScript). */
.try-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 20px 0 0; padding: 6px 0; border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); }
.try-bar .toggles { display: flex; gap: 4px; flex: none; }
.try-hint { margin: 0; font: 700 14px/1.4 var(--round); color: var(--ink-3); }
/* La consigne : « Touche » au doigt ; à la souris, « Clique » (data-click), sans JavaScript ni texte en double. */
@media (hover: hover) and (pointer: fine) {
  .try-hint[data-click] > span { display: none; }
  .try-hint[data-click]::before { content: attr(data-click); }
}
#tryFu:checked ~ .try-bar [for="tryFu"], #trySp:checked ~ .try-bar [for="trySp"] { background: var(--coral-soft); color: var(--coral-soft-ink); box-shadow: inset 0 0 0 2px var(--coral); }
#tryFu:focus-visible ~ .try-bar [for="tryFu"], #trySp:focus-visible ~ .try-bar [for="trySp"] { outline: 3px solid var(--coral-text); outline-offset: 2px; }
#tryFu:not(:checked) ~ .try-text { --lh: 1.7; }
#tryFu:not(:checked) ~ * rt { display: none; }
/* Espaces entre les groupes de mots (texte, questions, choix, réponses), comme .spaces .sp dans le lecteur. */
#trySp:checked ~ .try-text .sp, #trySp:checked ~ .try-quiz .sp { display: inline; word-spacing: 0.22em; }

/* Le texte : une phrase par <details> ; ouverte, elle passe sur un fond doux avec sa traduction dessous. */
.try-text { max-width: 720px; padding: 20px 0 6px; }
.try-s > summary { display: block; list-style: none; cursor: pointer; border-radius: 8px; -webkit-tap-highlight-color: transparent; }
.try-s > summary::-webkit-details-marker { display: none; }
.try-s[open] { margin: 6px -12px; padding: 6px 12px 10px; border-radius: 14px; background: var(--surface-2); }
.try-tl { margin: 0; font: var(--w-body) 16px/1.55 var(--round); color: var(--ink-2); }
@media (hover: hover) { .try-s:not([open]) > summary:hover { background: var(--hover); box-shadow: 0 0 0 4px var(--hover); } }
/* « Traduction » allumé : toutes les phrases ouvertes, sans fond, la traduction sous chacune (comme la page d'une histoire). */
.try.show-tl .try-s[open] { margin: 0; padding: 0; background: none; }
.try.show-tl .try-tl { margin: 0 0 0.85em; }

/* Les questions : une colonne ; trois côte à côte sur un grand écran, choix alignés d'une question à l'autre (la
   question, sa traduction comprise, les choix, la réponse : trois rangées partagées). Une question se touche comme
   une phrase : sa traduction s'ouvre dessous, la réponse reste fermée. */
.try-quiz { margin-top: 24px; padding-top: 22px; border-top: 2px solid var(--line); }
.try-quiz-title { margin: 0 0 16px; font: 900 22px/1.25 var(--round); }
.try-quiz .rt-qs { margin: 0; }
.try-q { margin: 0 0 10px; }
.try-q > summary { list-style: none; margin: 0; cursor: pointer; border-radius: 8px; -webkit-tap-highlight-color: transparent; }
.try-q > summary::-webkit-details-marker { display: none; }
.try-q[open] { margin: 0 -12px 10px; padding: 0 12px 8px; border-radius: 14px; background: var(--surface-2); }
.try-qtl { margin: -2px 0 0; padding-left: 40px; font: var(--w-body) 15px/1.5 var(--round); color: var(--ink-2); }
@media (hover: hover) { .try-q:not([open]) > summary:hover { background: var(--hover); box-shadow: 0 0 0 4px var(--hover); } }
.try.show-tl .try-q[open] { margin: 0 0 10px; padding: 0; background: none; }
/* Juste ou faux : la couleur ET un symbole (✓, ✗), comme les questions de la page d'une histoire (.sq-c) ; le nom
   accessible du choix finit par ce symbole. Les règles .rt-c de base, partagées avec les tests des niveaux, ne
   changent pas. */
.try-quiz .rt-c.is-right::after, .try-quiz .rt-c.is-wrong::after { flex: none; align-self: center; margin-left: auto; font: 900 19px/1 var(--round); }
.try-quiz .rt-c.is-right::after { content: '\2713'; color: var(--ok); }   /* ✓ */
.try-quiz .rt-c.is-wrong::after { content: '\2717'; color: var(--ko); }   /* ✗ */
@media (min-width: 1000px) {
  .try-quiz .rt-qs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; }
  .try-quiz .rt-q { display: grid; grid-row: span 3; grid-template-rows: subgrid; align-content: start; margin: 0; }
}

/* Après les questions : l'histoire gratuite suivante (la carte de la page d'une histoire, .next-card, à la largeur du
   texte), puis le lecteur interactif et la page de l'histoire (son vocabulaire). */
.try-end { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 22px; padding-top: 22px; border-top: 2px solid var(--line); }
.try-end .hint { margin: 0; font: 700 14px/1.4 var(--round); color: var(--ink-3); }
.try-end .link { margin-left: auto; }
.try-next { flex: 1 1 100%; margin-bottom: 14px; }   /* toute la ligne : le lecteur passe dessous */
.try-next-title { margin: 0 0 14px; font: 900 22px/1.25 var(--round); }
.try-next .next-card { max-width: 720px; }

/* Le guide de lecture résumé : trois conseils numérotés, côte à côte sur un grand écran, puis le lien vers le guide. */
.read-tips { margin-top: 40px; }
.read-tips-title { margin: 0; font: 900 22px/1.25 var(--round); }
.read-tips-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 28px; counter-reset: tip; }
.read-tips-list li { position: relative; padding-left: 40px; counter-increment: tip; color: var(--ink-2); font-size: 16px; line-height: 1.55; }
.read-tips-list li::before {
  content: counter(tip); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: 8px; background: var(--coral-soft); color: var(--coral-soft-ink); font: 900 14px/1 var(--round);
}
.read-tips-list b { color: var(--ink); font-weight: 800; }
.read-tips > .link { margin-top: 4px; }

/* Bibliothèque : gratuites d'abord, puis les Premium repliées (un cadenas, le nombre, une flèche). La carte de
   l'histoire la sépare déjà du haut de la page : pas de filet en plus ; de l'air entre deux niveaux. */
.stories-lib { margin-top: 40px; padding-top: 0; border-top: 0; }
.stories-lib > .section-lede { max-width: 46em; margin-top: 0; }
#stories .lib-level + .lib-level > .lib-head { margin-top: 48px; }
.lib-sub { margin: 16px 0 0; font: 800 15px/1.4 var(--round); color: var(--ink-2); }
.lib-premium { margin-top: 16px; border: 2px solid var(--line); border-radius: var(--radius); }
.lib-premium > summary {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 20px; cursor: pointer; list-style: none;
  border-radius: calc(var(--radius) - 2px); font: 800 16px/1.35 var(--round); color: var(--ink); -webkit-tap-highlight-color: transparent;
}
.lib-premium > summary::-webkit-details-marker { display: none; }
.lib-premium > summary .lock-i { width: 14px; height: 14px; flex: none; color: var(--coral-text); }
.lib-premium > summary::after {
  content: ""; flex: none; width: 8px; height: 8px; margin-left: auto; color: var(--ink-3);
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s;
}
.lib-premium[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
@media (hover: hover) { .lib-premium > summary:hover { background: var(--hover); } }
.lib-premium > .story-list { margin: 0; padding: 4px 16px 0; }
.lib-offer { margin: 0; padding: 4px 20px 8px; }
.lib-premium.is-unlocked > summary .lock-i, .lib-premium.is-unlocked .lib-offer { display: none; }
/* Carte sans lien (histoire Premium) : à plat, sans effet au survol ni au toucher. */
div.story-card { background: transparent; box-shadow: none; cursor: default; }
div.story-card:active { transform: none; }
@media (hover: hover) { div.story-card:hover { border-color: var(--line); } }
@media (prefers-reduced-motion: reduce) { .lib-premium > summary::after { transition: none; } }

/* Guide de lecture : ses liens (les tests des niveaux, le PDF) sur deux colonnes au plus, et un dernier lien seul sur
   toute la largeur : jamais de lien orphelin sur sa ligne (ni trois puis deux, ni deux, deux, puis un). */
#guide > .link-list > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 721px) { #guide > .link-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Niveau N1 choisi avant le 17/11 (plus de rubrique N1) : la page montre le N5, sa pilule allumée. */
:root[data-level="N1"] #stories .lib-level[data-level="N5"] { display: block; }
:root[data-level="N1"] #levels .pill[data-level="N5"] { background: var(--coral); color: var(--on-coral); box-shadow: 0 3px 0 var(--coral-deep); }
:root[data-level="N1"] #levels .pill[data-level="N5"] .n { color: var(--coral-text); }

@media (max-width: 720px) {
  .stories-intro .shelf-art { display: none; }
  .try { margin-top: 16px; padding: 14px 16px 20px; }
  .try-title .ja-t { font-size: 26px; }
  .try-title .try-tr { font-size: 17px; }
  .try-meta { margin-top: 8px; }
  .try-bar { margin-top: 12px; padding: 4px 0 6px; gap: 0 16px; }
  .try-text { padding-top: 14px; }
  .try-end .btn { flex: 1 1 auto; }
  .try-end .link { margin-left: 0; }
  .read-tips { margin-top: 32px; }
  .read-tips-list { grid-template-columns: 1fr; gap: 12px; }
  /* Pilules des niveaux : deux par ligne, de même largeur (quatre côte à côte n'entrent pas sous 400 px). */
  .stories-lib .levels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stories-lib .pill { justify-content: center; }
  .lib-premium > summary { padding: 8px 16px; font-size: 15.5px; }
  .lib-premium > .story-list { padding: 4px 12px 0; }
  .lib-offer { padding: 4px 16px 8px; }
}
@media (min-width: 460px) and (max-width: 720px) { .stories-lib .levels { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* === fin b2-histoires === */

/* === b2-kana === */
/* Pages des écritures (tools/seo/kana.mjs, kanapractice.mjs, kanalike.mjs ; assets/kanapractice.js).
   1. Les tableaux remplissent la colonne : 5 colonnes égales (3 pour les combinaisons), l'étiquette de ligne (k-, s-…)
      étroite à gauche ; les cases s'alignent sur le texte (marges négatives de la largeur de l'espacement). */
.kana-wrap { margin: 16px -8px 4px; padding: 0; }
table.kana-chart { width: 100%; table-layout: fixed; border-spacing: 8px; }
.kana-chart thead th { padding: 0 0 2px; font-size: 13px; }
.kana-chart thead th:first-child { width: 28px; }
.kana-chart tbody th { padding: 0 2px 0 0; font-size: 13px; }
.kana-chart td { width: auto; min-width: 0; height: 96px; border-radius: 16px; padding: 6px 2px; }
.kana-chart .kc, .kana-list .kc { font-size: 38px; }
.kana-chart .kc2 { font-size: 22px; margin-left: 6px; }
.kana-chart .kr, .kana-list .kr { margin-top: 6px; font-size: 14px; }
.kana-list { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-top: 16px; }
.kana-list li { height: 96px; border-radius: 16px; }
/* Les deux notes de la voix, au-dessus du tableau (assets/pages.js) : « touchez un caractère » avec une voix japonaise
   (.can-say), « pas de son » sans (.no-say, au bout de 2,5 s). Elles occupent la même case, dont la place (celle de la
   plus haute) est gardée dès le chargement : le tableau ne bouge plus quand l'une d'elles apparaît. Chacune tient sur
   une ligne à 375 px. Sans JavaScript, ni note ni place. */
.kana-nosay { display: none; font-size: 14px; color: var(--ink-3); }
.kana-voice { display: grid; margin: 4px 0 0; }
.kana-voice > p { grid-area: 1 / 1; margin: 0; }
.kana-voice > .kana-note, .kana-voice > .kana-nosay { display: block; visibility: hidden; }
.can-say .kana-voice > .kana-note, .no-say .kana-voice > .kana-nosay { visibility: visible; }
@media (scripting: none) { .kana-voice { display: none; } }
/* Hiragana et katakana : le tableau d'abord, son explication dessous (tools/seo/learn.mjs, kanaPage). */
.kana-wrap + .kana-after { margin-top: 18px; }
@media (max-width: 520px) {
  .kana-wrap { margin: 12px -5px 4px; }
  table.kana-chart { border-spacing: 5px; }
  .kana-chart thead th:first-child { width: 20px; }
  .kana-chart thead th, .kana-chart tbody th { font-size: 12px; }
  .kana-chart td { width: auto; min-width: 0; height: 64px; border-radius: 12px; padding: 4px 1px; }
  .kana-chart .kc, .kana-list .kc { font-size: 27px; }
  .kana-chart .kc2 { font-size: 15px; margin-left: 2px; }
  .kana-chart .kr, .kana-list .kr { margin-top: 3px; font-size: 12px; }
  .kana-list { grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 5px; }
  .kana-list li { height: 64px; border-radius: 12px; }
}

/* 2. « S'entraîner » : une carte blanche ; en haut les lignes (une pastille par ligne, coche verte quand tous ses
      caractères sont reconnus) et l'exercice ; au milieu la carte ou la question ; en bas la progression. Sans
      JavaScript : une liste de mots à lire, la lecture dans un <details>. */
.kp .kp-app { margin-top: 20px; padding: 18px 18px 12px; border: 2px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--lift); }
.kp-bar { display: grid; gap: 14px; }
/* Les dix lignes du tableau en grille régulière : une rangée de dix sur un ordinateur, deux rangées de cinq sur un
   téléphone (comme les colonnes du tableau). Puis les 46, les sons voisés, les combinaisons et, en katakana, les sons
   étrangers, tous de la même largeur : une ligne centrée sur un ordinateur ; sur un téléphone, toute la largeur, trois
   côte à côte, ou deux rangées de deux quand il y en a quatre (data-n, assets/kanapractice.js). */
.kp-rows { display: grid; gap: 8px; }
.kp-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.kp-extra { display: grid; grid-auto-flow: column; grid-auto-columns: 128px; justify-content: center; gap: 6px; }
@media (max-width: 640px) {
  .kp-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .kp-extra { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kp-extra[data-n="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.kp-row {
  position: relative; min-width: 44px; height: 44px; padding: 0 9px; border: 2px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink); font: 700 19px/1 var(--jp); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.kp-row.kp-all { padding: 0 14px; font: 800 15px/1 var(--round); }
.kp-row.kp-more { font-size: 16px; }
.kp-extra > .kp-row { min-width: 0; padding: 0 6px; }   /* la case donne la largeur */
.kp-row[aria-pressed="true"] { border-color: var(--coral); background: var(--coral-soft); color: var(--coral-soft-ink); }
.kp-row.is-known::after {
  content: '✓'; position: absolute; top: -7px; right: -7px; display: grid; place-items: center; width: 18px; height: 18px;
  border-radius: 50%; background: var(--ok); color: var(--surface); font: 900 11px/1 var(--round);
}
@media (hover: hover) { .kp-row:hover:not([aria-pressed="true"]) { border-color: color-mix(in srgb, var(--coral) 50%, var(--line)); } }
.kp-modes { width: 100%; max-width: 420px; margin: 0 auto; }
.kp-novoice { margin: 14px 0 0; padding: 9px 14px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); font: 700 13.5px/1.5 var(--round); text-align: center; }
.kp-stage { margin-top: 16px; }
.kp-hint { margin: 0 0 10px; font: 700 15px/1.45 var(--round); color: var(--ink-2); text-align: center; }
.kp-card {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 236px; padding: 34px 16px 18px; border: 2px solid var(--line); border-radius: 20px; background: var(--page); text-align: center;
}
.kp-card[data-act] { cursor: pointer; }
.kp-count { position: absolute; top: 12px; left: 16px; font: 800 13px/1 var(--round); color: var(--ink-3); }
.kp-big { font: 500 96px/1.1 var(--jp); color: var(--ink); }
.kp-big.is-r { font: 900 60px/1.1 var(--round); letter-spacing: -0.01em; }
.kp-word[data-len="s"] { font-size: 76px; }
.kp-word[data-len="m"] { font-size: 60px; }
.kp-word[data-len="l"] { font-size: 46px; }
.kp-word[data-len="xl"] { font-size: 36px; }
.kp-ans { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.kp-ans:empty { display: none; }   /* avant de retourner la carte : le kana seul, au centre */
.kp-r { font: 900 30px/1.2 var(--round); color: var(--coral-text); }
.kp-alt { font: 700 14px/1.4 var(--round); color: var(--ink-3); }
.kp-alt [lang="ja"] { font: 500 20px/1 var(--jp); color: var(--ink-2); }
.kp-mean { max-width: 30em; font: 700 16px/1.45 var(--round); color: var(--ink-2); }
.kp-src { font: 800 14px/1.4 var(--round); color: var(--coral-text); text-underline-offset: 3px; }
.kp-say {
  position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--coral-text); cursor: pointer;
}
@media (hover: hover) { .kp-say:hover { background: var(--coral-soft); } }
.kp-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }
.kp-actions:empty { display: none; }
.kp-actions .btn { min-width: 168px; }
.kp-qhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.kp-dir { min-width: 220px; }
.kp-dir button { font-size: 15px; }
/* Pastilles de la partie : grises, celle en cours cerclée de corail ; une réponse juste devient verte avec ✓, une
   fausse framboise avec ✗ (jamais la couleur seule). La rangée garde la hauteur des pastilles répondues. */
.kp-dots { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 14px; margin: 0; padding: 0; list-style: none; }
.kp-dots li { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.kp-dots li.is-now { box-shadow: 0 0 0 2px var(--coral); background: var(--surface); }
.kp-dots li.is-ok { background: var(--ok); }
.kp-dots li.is-ko { background: var(--ko); }
.kp-dots li.is-ok, .kp-dots li.is-ko { display: grid; place-items: center; width: 14px; height: 14px; }
.kp-dots li.is-ok::after, .kp-dots li.is-ko::after { color: var(--surface); font: 900 9px/1 var(--round); }
.kp-dots li.is-ok::after { content: '\2713'; }   /* ✓ */
.kp-dots li.is-ko::after { content: '\2717'; }   /* ✗ */
.kp-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.kp-c {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: 66px; padding: 8px 12px;
  border: 2px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); font: 500 34px/1.1 var(--jp);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.kp-c.is-r { font: 900 24px/1.1 var(--round); }
.kp-n { position: absolute; top: 7px; left: 10px; font: 800 12px/1 var(--round); color: var(--ink-3); }
.kp-c[aria-disabled="true"] { cursor: default; }
/* Réponse : la bonne prend le vert et ✓, la fausse choisie la framboise et ✗, en haut à droite (comme .sq-c des
   histoires : jamais la couleur seule) ; le numéro reste à gauche, la réponse au centre. */
.kp-c.is-right { border-color: var(--ok); background: var(--ok-soft); }
.kp-c.is-wrong { border-color: var(--ko); background: var(--ko-soft); }
.kp-c.is-right::after, .kp-c.is-wrong::after { position: absolute; top: 6px; right: 10px; font: 900 16px/1 var(--round); }
.kp-c.is-right::after { content: '\2713'; color: var(--ok); }   /* ✓ */
.kp-c.is-wrong::after { content: '\2717'; color: var(--ko); }   /* ✗ */
@media (hover: hover) { .kp-c:not([aria-disabled]):hover { border-color: var(--coral); background: var(--coral-soft); } }
.kp-fb { min-height: 22px; margin: 12px 0 0; font: 800 16px/1.4 var(--round); text-align: center; }
.kp-fb.is-ok { color: var(--ok); }
.kp-fb.is-ko { color: var(--ko); }
.kp-done { min-height: 190px; }
.kp-score, .kp-result { max-width: 22em; margin: 0; font: 900 26px/1.3 var(--round); color: var(--ink); }
.kp-msg { margin: 8px 0 0; font: 700 16px/1.5 var(--round); color: var(--ink-2); }
.kp-missed { font: 500 26px/1.4 var(--jp); color: var(--coral-text); }
.kp-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; margin-top: 16px; padding-top: 6px; border-top: 2px solid var(--line); }
.kp-progress { margin: 0; font: 700 14px/1.4 var(--round); color: var(--ink-3); }
.kp-static { margin-top: 18px; }
.kp-static-t { margin: 0; font: 800 19px/1.3 var(--round); }
.kp-static-h { margin: 4px 0 12px; font-size: 15px; color: var(--ink-3); }
.kp-sw { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.kp-sw details { height: 100%; padding: 8px 12px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); }
.kp-sw summary { font: 500 24px/1.4 var(--jp); cursor: pointer; list-style: none; }
.kp-sw summary::-webkit-details-marker { display: none; }
.kp-sw p { margin: 2px 0 2px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.kp-sr { font-weight: 800; color: var(--coral-text); }
@media (max-width: 520px) {
  .kp .kp-app { margin-left: -6px; margin-right: -6px; padding: 14px 12px 10px; border-radius: 20px; }
  .kp-card { min-height: 204px; padding-top: 30px; }
  .kp-big { font-size: 80px; }
  .kp-big.is-r { font-size: 50px; }
  .kp-word[data-len="s"] { font-size: 64px; }
  .kp-word[data-len="m"] { font-size: 50px; }
  .kp-word[data-len="l"] { font-size: 38px; }
  .kp-word[data-len="xl"] { font-size: 29px; }
  .kp-c { min-height: 60px; font-size: 30px; }
  .kp-c.is-r { font-size: 22px; }
  .kp-actions .btn { flex: 1; min-width: 0; padding: 10px 12px; font-size: 17px; }
  .kp-qhead { justify-content: center; }
}

/* 3. Planche des sosies : l'ardoise du tableau de prof (.board) ; chaque groupe dans un cadre à peine plus clair, deux
      par rangée (un groupe de trois prend la rangée), les kana dessinés à la craie, le trait qui compte en corail. */
.lk-plate { margin-top: 22px; }
.lk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lk-group { padding: 14px 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--board-ink) 6%, transparent); }
.lk-wide { grid-column: 1 / -1; }
.lk-items { display: flex; justify-content: center; gap: 18px; }
.lk-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lk-g { display: block; width: 92px; height: 92px; color: var(--board-ink); overflow: visible; }
.lk-g .k { stroke: var(--board-coral); }
.lk-label { display: flex; align-items: baseline; gap: 6px; }
.lk-k { font: 500 20px/1 var(--jp); color: var(--board-ink); }
.lk-r { font: 800 14px/1 var(--round); color: var(--board-dim); }
.lk-note { max-width: 32em; margin: 10px auto 0; font: 700 14.5px/1.5 var(--round); color: var(--board-dim); text-align: center; }
.lk-note .jp { color: var(--board-ink); }
@media (max-width: 520px) {
  .lk-grid { grid-template-columns: minmax(0, 1fr); }
  .lk-g { width: 78px; height: 78px; }
}
/* === fin b2-kana === */

/* === b2-schemas === */
/* Schémas des pages cœur (tools/seo/schemas.mjs) : la phrase colorée par écriture (alphabet), furigana et okurigana,
   la carte des suffixes de politesse. Dessins en SVG dont le texte est traduit ; couleurs prises dans les jetons du
   site, donc justes dans les deux thèmes. Téléphone d'abord : 360 unités de large, au plus 1,4 fois agrandies.
   Les tailles du texte sont dans le SVG (attribut font-size, posé par schemas.mjs qui mesure les étiquettes) : ici,
   seulement la police, la graisse et la couleur. */
.sc { margin: 18px 0 22px; }
.section .sc { margin-top: 18px; }
.sc-box { display: flex; align-items: center; padding: 16px 10px 12px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.sc-svg { display: block; width: 100%; max-width: 504px; height: auto; margin: 0 auto; overflow: visible; }   /* 360 × 1,4 */
.sc-box--rule .sc-svg { max-width: 288px; }   /* la règle (250 de large) : à l'échelle de la carte sur un téléphone */
.sc-duo { display: grid; gap: 14px; }
@media (min-width: 721px) { .sc-duo { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: center; } }
.sc-cap { margin: 12px 2px 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }
.sc-cap .jp { white-space: nowrap; }   /* きょう, 山田です : jamais coupés en fin de ligne */
@media (max-width: 720px) { .sc-box { padding: 12px 2px 10px; } }   /* le dessin plus large : 12 px de texte latin même à 360 px */

.sc-svg text { font-family: var(--round); font-weight: 700; }
.sc-svg .sc-ja { font-family: var(--jp); }
.sc-ro { fill: var(--ink-3); }
.sc-bubble .sc-ro, .sc-me .sc-ro { fill: var(--ink-2); }   /* sur ok-soft, ko-soft et coral-soft : AA dans les deux thèmes */
.sc-role, .sc-read { fill: var(--ink-2); }
.sc-ro-b { font-weight: 800; fill: var(--ink); }
.sc-svg .sc-tag, .sc-svg .sc-axis { font-weight: 800; letter-spacing: 0.08em; fill: var(--ink-3); }
.sc-arrow { fill: var(--ink-3); }
.sc-sep { fill: none; stroke: var(--line); stroke-width: 2; }

/* 11. Alphabet : une couleur par écriture, la même dans la phrase et dans la légende ; chaque texte dans l'encre de son
   fond (kanji en coral-soft-ink sur coral-soft, katakana en cyan-soft-ink sur cyan-soft). La tuile des hiragana ne
   dépend pas de color-mix (sans lui, un vieux navigateur la peindrait en noir). */
.sc-t-kanji { fill: var(--coral-soft); }
.sc-t-hiragana { fill: var(--hover); }
.sc-t-katakana { fill: var(--cyan-soft); }
.sc-c-kanji { fill: var(--coral-soft-ink); }
.sc-c-hiragana { fill: var(--ink); }
.sc-c-katakana { fill: var(--cyan-soft-ink); }
.sc-svg .sc-name { font-weight: 800; fill: var(--ink); }
.sc-svg .sc-jn { font-family: var(--jp); font-weight: 500; fill: var(--ink-3); }

/* 12. Furigana : les petits kana en corail, le mot en grand, l'okurigana à taille normale. */
.sc-big { fill: var(--ink); }
.sc-furi { fill: var(--coral-text); }
.sc-brace, .sc-lead { fill: none; stroke: var(--coral); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sc-dot { fill: var(--coral); }
.sc-under { fill: none; stroke: var(--ink-3); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sc-svg .sc-tag-fu { fill: var(--coral-text); }

/* 13. Suffixes : わたし au centre, le suffixe en corail ; la règle « 山田です ✓ / 山田さんです ✗ ». */
.sc-card rect { fill: var(--surface); stroke: var(--line); stroke-width: 2; }
.sc-me rect { fill: var(--coral-soft); stroke: var(--coral); }
.sc-who { fill: var(--ink); }
.sc-suf { fill: var(--coral-text); }
.sc-link { fill: none; stroke: var(--ink-3); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 0.5 5; }
.sc-svg .sc-rule-t { font-weight: 800; fill: var(--ink); }
.sc-bubble rect { stroke-width: 2; }
.sc-ok rect { fill: var(--ok-soft); stroke: color-mix(in srgb, var(--ok) 35%, transparent); }
.sc-ko rect { fill: var(--ko-soft); stroke: color-mix(in srgb, var(--ko) 35%, transparent); }
.sc-bubble circle { fill: var(--surface); stroke-width: 2; }
.sc-ok circle, .sc-ok .sc-icon { stroke: var(--ok); }
.sc-ko circle, .sc-ko .sc-icon { stroke: var(--ko); }
.sc-icon { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.sc-say { fill: var(--ink); }
.sc-strike { fill: var(--ko); }
.sc-cross { stroke: var(--ko); stroke-width: 2; stroke-linecap: round; }
/* === fin b2-schemas === */

/* === typo-ja === */
/* Typographie japonaise de tout le site (vérification de k2-kana, puis mesure du 16/11/2026) : aucune ligne ne commence
   par un petit kana ni par ー (« コ / ーヒー », « ち / ゃん », « エレベ / ーター »). Sur la racine, car le japonais
   apparaît aussi sans lang="ja" dans les paragraphes des autres langues ; sans effet sur le texte latin. */
:root { line-break: strict; }
/* === fin typo-ja === */

/* === entete === */
/* Barre du haut entre 721 et 800 px (vérification de b2-schemas, 16/11/2026) : en allemand et en espagnol, le libellé
   « Anmelden » ou « Iniciar sesión » la faisait déborder (736 px pour 721). Le bouton du compte passe en icône, comme
   au-dessous de 720 px. */
@media (max-width: 800px) {
  .signin { width: 44px; padding: 0; color: var(--ink-2); }
  .signin svg { display: block; }
  .signin .lbl { display: none; }
}
/* === fin entete === */

/* === b2-listes === */
/* Listes du JLPT (tools/seo/listproof.mjs, jlptListPage de tools/seo/learn.mjs) : le premier écran montre la liste
   (le H1, une accroche, la source, le reste de l'introduction replié, les chiffres sur une ligne, les autres listes du
   niveau) ; une ligne ou un point visé par un lien (#w-会う, #g-てから) s'éclaire sous la barre du haut ; la colonne
   « Dans nos histoires » : la phrase d'une histoire gratuite, le mot surligné, sa traduction et le lien ; le titre
   d'une gratuite ; le titre d'une Premium, avec un cadenas, sans lien ; « seulement dans une question » ; ou un mot que
   nos histoires n'emploient pas, avec la raison. */
table.vt tr[id] { scroll-margin-top: 124px; }
table.vt tr:target td { background: var(--sun-soft) !important; }
table.vt tr:target .vg { box-shadow: inset 0 0 0 2px currentColor; }   /* la pastille 2 (sunSoft) reste dessinée */
.grammar-list .gp { scroll-margin-top: 84px; }
.grammar-list .gp:target h3 { box-shadow: 0 0 0 3px var(--sun); }

/* Sous le H1 : l'accroche, la source (petite), le reste de l'introduction replié. */
.vs-head .section-lede { margin-top: 6px; }
.vs-src { margin: 8px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-3); }
.vs-src a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.vs-more { margin-top: 6px; }
.vs-more > summary { display: inline-flex; align-items: center; gap: 9px; min-height: 40px; cursor: pointer; list-style: none; font: 800 15px/1.3 var(--round); color: var(--coral-text); }
.vs-more > summary::-webkit-details-marker { display: none; }
.vs-more > summary::before { content: ''; flex: none; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.vs-more[open] > summary::before { transform: rotate(45deg); }
.vs-more .section-lede:first-of-type { margin-top: 2px; }

/* Les chiffres sur une ligne, puis les autres listes du niveau. */
.vs-figs { margin: 12px 0 0; padding: 10px 14px; list-style: none; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); font: 700 14.5px/1.55 var(--round); color: var(--ink-2); }
.vs-figs li { display: inline; }
.vs-figs li + li::before { content: "·"; margin: 0 8px; color: var(--ink-3); }
.vs-figs b { font: 900 16.5px/1 var(--round); color: var(--ink); }
.vs-figs li:first-child b { color: var(--coral-text); }
.vs-lists { margin: 8px 0 0; font: 700 14.5px/1.5 var(--round); color: var(--ink-3); }
.vs-lists a { display: inline-block; padding: 4px 0; color: var(--coral-text); text-decoration: none; }
@media (hover: hover) { .vs-lists a:hover { text-decoration: underline; text-underline-offset: 3px; } }

/* Le tableau sur toute la largeur, sous le texte (tools/seo/learn.mjs, page() avec `wide`) ; l'app vient APRÈS le
   tableau et les autres listes, sur toute taille d'écran (elle couvrait la colonne « Dans nos histoires » et l'index au
   bureau). Les pages de grammaire et de kanji gardent l'app à droite ; le vocabulaire par thème la met après tout son
   contenu (bloc b11-vocab). */
.learn-wide { min-width: 0; }
.vs-table { margin-top: 18px; }
.vs-table .kana-index { margin: 0 0 12px; }
@media (min-width: 1080px) {
  .learn-grid--wide { grid-template-columns: minmax(0, 1fr); }
  .learn-grid--wide > .learn-main, .learn-grid--wide > .learn-wide { grid-column: 1; grid-row: auto; }
  .learn-grid--wide > .learn-main { max-width: none; }   /* le H1, l'accroche et les chiffres sur une ligne */
  .learn-grid--wide .vs-more[open] > :not(summary) { max-width: 760px; }   /* les paragraphes gardent leur colonne */
  .learn-grid--wide > .learn-aside { grid-column: 1; grid-row: auto; position: static; margin-top: 48px; }
}

/* La légende du tableau (son nom), dans la carte. */
table.vt caption.vs-cap { caption-side: top; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); text-align: left; font-size: 13.5px; line-height: 1.5; color: var(--ink-3); }
table.vt caption.vs-cap a.src { margin-left: 4px; font-size: 13px; white-space: nowrap; }
/* Chaque syllabe : un lien vers l'index (la liste N3 fait plus de 400 écrans de téléphone). */
tr.vt-h th a.vs-up { float: right; min-height: 42px; padding: 0 2px; font: 800 13.5px/42px var(--round); color: var(--ink-3); text-decoration: none; }
@media (hover: hover) { tr.vt-h th a.vs-up:hover { color: var(--coral-text); } }

table.vt-proof td.vt-s { width: 36%; min-width: 15em; }
table.vt-proof td.vt-m { min-width: 12em; }
table.vt-proof .vt-k { white-space: nowrap; }
.vs-ja { margin: 0; font: 500 18px/1.95 var(--jp); color: var(--ink); }
.vs-ja .b { display: inline; }   /* le texte coule dans la cellule, sans marches d'escalier */
.vs-ja mark { padding: 1px 2px; border-radius: 4px; background: var(--sun-soft); box-shadow: inset 0 -2px 0 var(--sun); color: inherit; }
.vs-tl { margin: 2px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.vt-s > a.src, .vs-tl a.src, .vs-q a.src { margin-left: 0; font-size: 13.5px; white-space: normal; }
.vs-kind { font: 800 12.5px/1.4 var(--round); letter-spacing: 0.03em; color: var(--ink-3); }
table.vt td.vs-lock, table.vt td.vs-q { font: 700 14.5px/1.45 var(--round); color: var(--ink-3); }
/* Le cadenas, avec son texte pour les lecteurs d'écran (« Premium », le même mot dans les sept langues) ; un navigateur
   qui ne connaît pas `content: … / …` garde la première déclaration : le cadenas, sans texte. */
.vs-lock::before {
  content: ""; content: "" / "Premium";
  display: inline-block; width: 12px; height: 12px; margin-right: 7px; vertical-align: -1px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5.1 7.2V5.4a2.9 2.9 0 0 1 5.8 0v1.8' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round'/%3E%3Crect x='2.7' y='6.7' width='10.6' height='8' rx='2.2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5.1 7.2V5.4a2.9 2.9 0 0 1 5.8 0v1.8' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round'/%3E%3Crect x='2.7' y='6.7' width='10.6' height='8' rx='2.2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.vs-out { display: inline-block; margin: 0 8px 4px 0; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font: 800 12.5px/1.3 var(--round); letter-spacing: 0.04em; text-transform: uppercase; }
.vs-why { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
tr.vt-out .vt-w, tr.vt-out .vt-m { color: var(--ink-3); }

/* Sous 1080 px (tablette et téléphone) : une fiche par mot, comme au téléphone (@media 640 px plus haut), pour
   que la colonne « Dans nos histoires » ne soit jamais coupée ; pas de défilement horizontal (il casserait l'en-tête
   collant). */
@media (max-width: 1079px) {
  table.vt-proof thead { display: none; }
  table.vt-proof, table.vt-proof caption, table.vt-proof tbody, table.vt-proof tr, table.vt-proof th, table.vt-proof td { display: block; }
  table.vt-proof tr:not(.vt-h) { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  table.vt-proof tbody tr:not(.vt-h):nth-child(odd) { background: color-mix(in srgb, var(--surface-2) 40%, var(--surface)); }
  table.vt-proof td { padding: 0; border: 0; background: none !important; }
  table.vt-proof .vt-n { grid-row: 1 / span 3; min-width: 2.6em; padding-top: 9px; }   /* de 1 à 2 140 : les mots restent alignés */
  table.vt-proof .vt-w { grid-column: 2; font-size: 24px; }
  table.vt-proof .vt-r { grid-column: 2; min-width: 0; }
  table.vt-proof .vt-k, table.vt-proof .vt-ro { display: inline; margin-right: 8px; }
  table.vt-proof td.vt-m { grid-column: 2 / -1; min-width: 0; margin-top: 4px; font-size: 15.5px; }
  table.vt-proof .vt-g { grid-column: 3; grid-row: 1; align-self: start; }
  table.vt-proof td.vt-s { grid-column: 2 / -1; width: auto; min-width: 0; margin-top: 8px; }
  table.vt-proof tr:has(> td.vs-lock) { padding-top: 10px; padding-bottom: 10px; }   /* les lignes Premium, plus légères */
  table.vt-proof td.vs-lock { margin-top: 4px; font-size: 13.5px; }
  table.vt-proof tr:target { background: var(--sun-soft) !important; }
  table.vt-proof tr:target td { background: none !important; }
}
@media (max-width: 640px) {
  /* Téléphone : l'index des syllabes sur une seule rangée qui défile ; les chiffres et la légende plus serrés. */
  .vs-table .kana-index { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 6px; scrollbar-width: thin; }
  .vs-table .kana-index a { flex: none; min-width: 40px; min-height: 40px; }
  /* Les autres listes du niveau : une rangée qui défile, elle aussi. */
  .vs-lists { display: flex; align-items: center; gap: 0 8px; overflow-x: auto; overscroll-behavior-x: contain; white-space: nowrap; scrollbar-width: none; }
  .vs-lists::-webkit-scrollbar { display: none; }
  .vs-lists > * { flex: none; }
  .vs-lists > span { padding: 4px 0; }
  .vs-figs { padding: 0; border: 0; background: none; font-size: 14px; }
  tr.vt-h th { padding-top: 12px; padding-bottom: 6px; }
  tr.vt-h th span { width: 38px; height: 38px; font-size: 21px; }
  tr.vt-h th a.vs-up { min-height: 38px; line-height: 38px; }
  .vs-ja { font-size: 17px; }
  table.vt caption.vs-cap { padding: 9px 12px; font-size: 13px; }
}
/* === fin b2-listes === */

/* === b2-contenus === */
/* Comparatif des apps (tools/seo/learn.mjs, appsPage, refonte 2.10) : neuf colonnes ; le nom de l'app reste visible quand
   le tableau défile (tablette), ce que l'app ne dit pas est en gris. Sur un téléphone, une fiche par app (règles de
   table.compare plus haut). */
table.compare.apps { min-width: 1060px; font-size: 14.5px; }
table.compare.apps th, table.compare.apps td { padding: 11px; }
:lang(de) table.compare.apps td { hyphens: auto; }   /* « Fortgeschrittene » se coupe au lieu d'élargir le tableau */
table.compare.apps tbody th { min-width: 9em; white-space: normal; }
table.compare.apps thead th:first-child, table.compare.apps tbody th { position: sticky; left: 0; z-index: 1; background: var(--surface); }
/* La ligne de hinoko n'est pas teintée (comparatif neutre) : la pastille « notre app » suffit. */
table.compare.apps tr.is-ours > td { background: none; }
/* position: relative : le texte pour lecteurs d'écran (.sr, en position absolue) reste dans sa cellule, sinon il élargit
   la page à la tablette (défilement horizontal de 721 à 1 024 px). */
.ft-none { position: relative; color: var(--ink-3); }
/* Au bureau, la prose du comparatif garde des lignes d'environ 72 caractères (le tableau, lui, prend toute la largeur). */
main.learn:has(table.compare.apps) :is(.section-lede, .cover-note, .choose) { max-width: 32em; }
.choose a:not(.link) { color: var(--coral-text); font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 3px; }
/* « Comment on a comparé » : les critères en deux colonnes, les mêmes mots que les en-têtes du tableau. */
.criteria { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 16px 0 0; }
.criteria > div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 12px; padding: 11px 0; border-top: 2px solid var(--line); }
.criteria dt { font: 800 12px/1.7 var(--round); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
.criteria dd { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
.src-list { margin: 14px 0 0; }
.src-list > summary, .xf-more > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; list-style: none; font: 800 15px/1.3 var(--round); color: var(--coral-text); }
.src-list > summary::-webkit-details-marker, .xf-more > summary::-webkit-details-marker { display: none; }
.src-list > summary::before, .xf-more > summary::before { content: ''; flex: none; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.src-list[open] > summary::before, .xf-more[open] > summary::before { transform: rotate(45deg); }
.src-list ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; line-height: 1.5; color: var(--ink-3); }
.src-list b { margin-right: 6px; color: var(--ink); }
.src-list a { color: var(--ink-2); overflow-wrap: anywhere; text-underline-offset: 2px; }

/* Guides JLPT (tools/seo/jlptformat.mjs, refonte 2.11) : l'épreuve 問題 par 問題, un tableau par partie, les lignes de
   lecture teintées et, sous la partie qui contient la lecture, un exemple original de chaque question. */
.xf-part { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: 30px 0 0; font: 800 20px/1.3 var(--round); }
.xf-min { font: 800 14px/1.3 var(--round); color: var(--ink-3); }
.xf-wrap { margin-top: 12px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
table.xf-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.xf-table th, .xf-table td { padding: 11px 14px; border-bottom: 2px solid var(--line); text-align: left; vertical-align: top; }
.xf-table thead th { font: 800 12px/1.4 var(--round); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.xf-table thead th[lang="ja"] { font: 700 13px/1.4 var(--jp); letter-spacing: 0; }
.xf-table tbody tr:last-child > * { border-bottom: 0; }
.xf-table .xf-n { width: 3em; font: 900 18px/1.4 var(--round); color: var(--coral-text); }
.xf-table tbody th { width: 38%; font-weight: inherit; }
.xf-ja { display: block; font: 500 17px/1.5 var(--jp); color: var(--ink); }
.xf-name { display: block; margin-top: 2px; font: 700 13.5px/1.35 var(--round); color: var(--ink-3); }
.xf-what { color: var(--ink-2); }
.xf-table tr.is-reading > * { background: color-mix(in srgb, var(--cyan-soft) 60%, transparent); }
.xf-go { display: inline-block; margin-left: 6px; font: 800 13.5px/1.4 var(--round); color: var(--coral-text); white-space: nowrap; }
.xf-ex-title { margin: 30px 0 0; font: 800 20px/1.3 var(--round); }
.xf-ex-lede { margin: 6px 0 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
/* Ce qui sépare les exemples de l'épreuve (N4 : ni espaces ni furigana sur tous les kanji à l'examen). */
.xf-ex-note { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.xf-ex { margin: 16px 0 0; padding: 18px 20px 8px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); scroll-margin-top: 90px; }
.xf-ex-label { margin: 0 0 10px; font: 800 13px/1.5 var(--round); letter-spacing: 0.03em; color: var(--coral-text); }
.xf-ex-label span[lang] { font-family: var(--jp); letter-spacing: 0; }
.xf-ctx { margin: 0 0 8px; font: 400 16px/1.9 var(--jp); color: var(--ink-2); }
.xf-passage { padding: 14px 18px; border-radius: 14px; background: var(--surface-2); }
.xf-passage p { margin: 0 0 6px; font: 400 var(--ja-size)/2.05 var(--jp); }
.xf-passage p:last-child { margin-bottom: 0; }
.xf-passage .xf-pt { text-align: center; font-weight: 700; }
.xf-passage .xf-bl { margin: 12px 0 2px; font: 800 14px/1.4 var(--round); color: var(--ink-3); }
.xf-passage .xf-bl:first-child { margin-top: 0; }
.xf-cut { margin: 8px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-3); }
.xf-q { margin: 16px 0 8px; font: 500 18px/1.9 var(--jp); }
.xf-choices { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.xf-choices li { display: flex; gap: 12px; align-items: baseline; padding: 6px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--page); font: 400 17px/1.9 var(--jp); }
.xf-cn { flex: none; font: 800 15px/1 var(--round); color: var(--ink-3); }
.xf-more { margin: 6px 0 0; }
.xf-more p, .xf-tr p { margin: 4px 0 8px; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.xf .nw { white-space: nowrap; }
.xf-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 22px 0 0; }
.xf-source a { color: inherit; text-underline-offset: 2px; }
@media (max-width: 720px) {
  table.compare.apps { min-width: 0; font-size: 15px; }
  table.compare.apps tbody th { position: static; min-width: 0; padding: 0; background: none; }
  table.compare.apps td { padding: 2px 0; }
  table.compare.apps tr.is-ours, table.compare.apps tr.is-ours > th { background: none; }
  .criteria { grid-template-columns: 1fr; }
  .criteria > div { grid-template-columns: 8.5em minmax(0, 1fr); }
}
@media (max-width: 620px) {
  /* Téléphone : chaque 問題 sur deux lignes (numéro et nom, puis ce qu'on demande), sans en-tête de colonnes. */
  .xf-table thead { display: none; }
  .xf-table, .xf-table tbody { display: block; }
  .xf-table tr { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); column-gap: 8px; padding: 12px 14px; border-bottom: 2px solid var(--line); }
  .xf-table tbody tr:last-child { border-bottom: 0; }
  .xf-table th, .xf-table td { display: block; width: auto; padding: 0; border: 0; }
  .xf-table tbody th { width: auto; }   /* la colonne du nom prend la place libre (38 % au bureau) : noms sur une ligne */
  .xf-table tr.is-reading { background: color-mix(in srgb, var(--cyan-soft) 60%, transparent); }
  .xf-table tr.is-reading > * { background: none; }
  .xf-table .xf-n { grid-row: span 2; }
  .xf-table .xf-what { grid-column: 2; margin-top: 4px; }
  .xf-ex { padding: 14px 14px 6px; }
  .xf-passage { padding: 12px 14px; }
}
/* === fin b2-contenus === */

/* === b3-apropos === */
/* Page « Comment marche hinoko » (tools/seo/about.mjs) et section « Comment ça marche » de l'accueil : captures de
   l'app, couverture N5 → N2, chaîne de fabrication, tableaux façon tableur, crédits. Couleurs : jetons du site seulement. */
.ab-head { padding: 8px 0 8px; }
.ab-lede { max-width: 46em; font-size: 18px; }

/* Ce que couvrent les histoires : une ligne par niveau, la part des mots de la liste en barre, le pourcentage à droite. */
.ab-cov { margin: 26px 0 0; padding: 18px 22px 16px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--lift); }
.ab-cov-t { font: 800 14px/1.3 var(--round); color: var(--ink-3); }
.ab-cov-list { list-style: none; margin: 6px 0 0; padding: 0; }
.ab-cov-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 4px 18px; padding: 14px 0; }
.ab-cov-row + .ab-cov-row { border-top: 2px solid var(--line); }
.ab-cov-row .lv-badge { justify-self: start; }
.ab-cov-words { margin: 0; font: 800 17px/1.35 var(--round); color: var(--ink); }
.ab-bar { display: block; height: 10px; margin: 9px 0 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.ab-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--coral); }
.ab-cov-more { margin: 0; font: 700 14.5px/1.45 var(--round); color: var(--ink-2); }
.ab-cov-pct { width: 3.6em; text-align: right; font: 900 26px/1 var(--round); font-variant-numeric: tabular-nums; color: var(--coral-text); white-space: nowrap; letter-spacing: -0.01em; }
/* Les mots mènent à la liste de vocabulaire du niveau, la grammaire à sa liste de grammaire. */
.ab-cov-main a { color: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--coral); text-underline-offset: 4px; }
@media (hover: hover) { .ab-cov-main a:hover { color: var(--coral-text); } }
.ab-cov .cover-note { margin-top: 6px; }

/* Sommaire : les pastilles des fiches de mots (.entry-toc), dans la police de l'interface. */
.ab-toc { margin-top: 26px; }
.ab-toc-t { margin: 0; font: 800 14px/1.3 var(--round); color: var(--ink-3); }
.ab-toc .entry-toc { margin: 10px 0 0; }
.ab-toc .entry-toc a { align-items: center; font: 800 15.5px/1.25 var(--round); }

/* Étapes, chacune avec un écran de l'app (accueil : trois ; page : quatre). Sur un téléphone, une rangée qu'on fait
   défiler de côté (plus bas, 720 px au plus). */
.ab-steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ab-steps.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ab-step { display: flex; flex-direction: column; gap: 16px; padding: 18px 18px 20px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--lift); }
.ab-shot { margin: 0; display: flex; justify-content: center; }
.ab-shot img { display: block; width: 100%; max-width: 220px; height: auto; border: 2px solid var(--line); border-radius: 26px; background: var(--page); }
.ab-step .n { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--cyan-soft); color: var(--cyan-soft-ink); font: 900 15px/1 var(--round); }
.ab-step h3 { margin: 12px 0 6px; font: 800 19px/1.3 var(--round); }
.ab-step p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.ab-more { margin: 18px 0 0; font-weight: 800; }

/* Du plan à l'histoire en ligne : cinq étapes reliées par des flèches (en colonne sur un écran étroit). */
.ab-flow { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; }
.ab-flow li { position: relative; padding: 14px 14px 16px; background: var(--surface); border: 2px solid var(--line); border-radius: 16px; }
.ab-flow li + li::before { content: "→"; position: absolute; left: -15px; top: 50%; transform: translate(-50%, -50%); color: var(--ink-3); font: 900 18px/1 var(--round); }
.ab-flow b { display: flex; align-items: center; gap: 8px; font: 800 16px/1.3 var(--round); color: var(--ink); }
.ab-flow-n { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--coral-soft); color: var(--coral-soft-ink); font: 900 13px/1 var(--round); }
.ab-flow li > span { display: block; margin-top: 6px; color: var(--ink-2); font-size: 14.5px; line-height: 1.45; }

/* Tableaux façon tableur : lignes fines, en-têtes en petites capitales, la première colonne en gras. */
.ab-h3 { margin: 36px 0 0; font: 900 23px/1.25 var(--round); scroll-margin-top: 84px; }
.ab-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.ab-table th, .ab-table td { padding: 12px 14px; border-bottom: 2px solid var(--line); text-align: left; vertical-align: top; }
.ab-table thead th { font: 800 12px/1.4 var(--round); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); background: var(--surface-2); }
.ab-table tbody th { width: 24%; font: 800 15.5px/1.4 var(--round); color: var(--ink); }
.ab-table td { color: var(--ink-2); }
.ab-table td p { margin: 0; }
.ab-table tbody tr:last-child > * { border-bottom: 0; }
.ab-checks td:nth-child(2) { width: 1%; white-space: nowrap; }
.ab-checks thead th:nth-child(2) { min-width: 11em; }
.ab-state { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font: 800 13.5px/1.4 var(--round); white-space: nowrap; }
.ab-state.is-yes { background: var(--ok-soft); color: var(--ok); }
.ab-state.is-no { background: var(--sun-soft); color: var(--sun-soft-ink); }

/* Mots écartés : le japonais en grand, sa lecture au-dessus, son niveau à côté. */
.ab-left tbody th { width: 30%; }
.ab-words { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 0; padding: 0; list-style: none; }
.ab-words li { display: inline-flex; align-items: center; gap: 8px; padding: 2px 10px 2px 12px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); }
.ab-ja { font: 700 22px/2 var(--jp); color: var(--ink); }

.ab-limits { margin: 14px 0 0; padding-left: 1.2em; color: var(--ink-2); font-size: 17px; line-height: 1.6; }
.ab-limits li + li { margin-top: 8px; }

/* Premium : un encadré, masqué dans l'app Android (data-offer). */
.ab-premium { margin: 16px 0 0; padding: 14px 18px 16px; background: var(--surface); border: 2px solid var(--line); border-radius: 16px; }
.ab-premium p { margin: 0 0 8px; color: var(--ink-2); font-size: 16px; line-height: 1.6; }
.ab-premium .link { font-weight: 800; }

/* Crédits : les adresses de chaque source sous sa ligne ; dans le texte, les liens de l'EDRDG et de sa licence. */
.ab-credits tbody th { width: 30%; }
.ab-cr-links { margin: 6px 0 0 !important; font: 700 14px/1.6 var(--round); }
.ab-cr-links a { color: var(--coral-text); text-underline-offset: 3px; }
.ab-credits td > p:first-child a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
/* Liens dans le texte (pas la classe .link, faite pour un lien seul : 44 px de haut, qui écarterait les lignes). */
.ab-a { color: var(--coral-text); font-weight: 800; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

@media (max-width: 1000px) {
  .ab-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ab-flow { grid-template-columns: minmax(0, 1fr); gap: 26px; max-width: 560px; }
  .ab-flow li + li::before { content: "↓"; left: 50%; top: -14px; }
}
@media (max-width: 720px) {
  .ab-lede { font-size: 16.5px; }
  .ab-cov { padding: 12px 16px 12px; }
  .ab-cov-row { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "badge pct" "main main"; gap: 8px 12px; padding: 12px 0; }
  .ab-cov-row .lv-badge { grid-area: badge; }
  .ab-cov-pct { grid-area: pct; justify-self: end; font-size: 22px; }
  .ab-cov-main { grid-area: main; }
  .ab-cov-words { font-size: 16px; }
  /* Étapes : une rangée qu'on fait défiler de côté, d'un bord de l'écran à l'autre (les 20 px de .wrap), une carte
     par étape qui s'arrête au cran ; l'écran à sa vraie taille (220 px, japonais lisible) au-dessus de son texte
     (232 px), et la carte suivante qui dépasse au bord. La rangée se fait défiler au clavier (tabindex, appshots.mjs). */
  .ab-steps-row { margin: 20px -20px 0; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; }
  .ab-steps-row:focus-visible { outline: 3px solid var(--coral-text); outline-offset: -3px; border-radius: 12px; }
  .ab-steps, .ab-steps.is-3 { display: flex; gap: 12px; width: max-content; margin: 0; padding: 0 20px 12px; }
  .ab-step { flex: none; width: 268px; gap: 14px; padding: 16px; scroll-snap-align: start; }
  .ab-shot img { width: 220px; max-width: none; border-radius: 22px; }
  .ab-step h3 { margin-top: 8px; font-size: 17.5px; }
  .ab-step p { font-size: 15px; }
  .ab-h3 { font-size: 21px; }
  /* Tableaux : une fiche par ligne (la colonne d'en-tête en titre), comme le comparatif des apps. */
  .ab-table thead { display: none; }
  .ab-table, .ab-table tbody, .ab-table tr, .ab-table tbody th, .ab-table td { display: block; width: auto; }
  .ab-table tr { padding: 12px 14px; border-bottom: 2px solid var(--line); }
  .ab-table tbody tr:last-child { border-bottom: 0; }
  .ab-table tbody th, .ab-table td { padding: 0; border: 0; }
  .ab-table tbody th { margin-bottom: 6px; }
  .ab-checks td:nth-child(2) { width: auto; margin-bottom: 6px; white-space: normal; }
  .ab-limits { font-size: 16px; }
}
/* === fin b3-apropos === */

/* === b4-accueil === */
/* Refonte de l'accueil du 17/11/2026 (demande d'Hugo) : les questions en volets sur toutes les pages qui en ont
   (tools/seo/faq.mjs), la couverture du JLPT en cartes, l'appel final centré, le pied de page en colonnes titrées
   (assets/chrome.js). Couleurs : les jetons du site seulement. */

/* 1. Questions : un <details> par question, la réponse dans le HTML. Quand la section a la place (880 px et plus :
   accueil, Histoires, niveaux), le titre et l'aide à gauche, les questions à droite, comme la FAQ de Yomimaru (requête
   de conteneur : les pages d'apprentissage, dans leur colonne de 760 px, et le téléphone gardent l'un sous l'autre).
   Un « + » dans une pastille, qui devient « − » quand la question est ouverte ; plusieurs peuvent rester ouvertes. */
section:has(> .faq-box) { container-type: inline-size; }
.faq-box { display: grid; grid-template-columns: minmax(0, 1fr); }
.faq-list { margin-top: 20px; border-top: 2px solid var(--line); }
.faq-item { border-bottom: 2px solid var(--line); }
/* La question déborde de 8 px de chaque côté (marge négative compensée) : l'anneau du focus a de l'air autour du texte,
   qui reste aligné sur le titre et sur les réponses. */
.faq-item > summary {
  display: flex; align-items: center; gap: 16px; min-height: 64px; margin: 0 -8px; padding: 14px 8px; border-radius: 12px;
  list-style: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary > h3 { flex: 1; min-width: 0; margin: 0; font: 800 18.5px/1.35 var(--round); color: var(--ink); }
.faq-sign { position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); }
.faq-sign::before, .faq-sign::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 14px; height: 2.5px; margin: -1.25px 0 0 -7px;
  border-radius: 2px; background: var(--ink-2); transition: transform .15s;
}
.faq-sign::after { transform: rotate(90deg); }
.faq-item[open] > summary .faq-sign { background: var(--coral-soft); }
.faq-item[open] > summary .faq-sign::before, .faq-item[open] > summary .faq-sign::after { background: var(--coral-soft-ink); }
.faq-item[open] > summary .faq-sign::after { transform: rotate(0deg); }
.faq-item > summary:focus-visible { outline: 3px solid var(--coral-text); outline-offset: 2px; }
@media (hover: hover) {
  .faq-item > summary:hover > h3 { color: var(--coral-text); }
  .faq-item > summary:hover .faq-sign { background: var(--coral-soft); }
  .faq-item > summary:hover .faq-sign::before, .faq-item > summary:hover .faq-sign::after { background: var(--coral-soft-ink); }
}
.faq-a { padding: 0 50px 22px 0; }
.faq-a p { max-width: 44em; margin: 0; color: var(--ink-2); font-size: 16.5px; line-height: 1.65; }
.faq-a .faq-more { margin-top: 6px; }
.faq-a a:not(.ab-a) { color: var(--coral-text); font-weight: 800; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.faq-help { margin-top: 26px; color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }
.faq-help p { margin: 0; }
.faq-help .faq-help-t { margin-bottom: 4px; font: 800 17px/1.4 var(--round); color: var(--ink); }
.faq-help a:not(.link) { color: var(--coral-text); font-weight: 800; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
/* L'adresse e-mail jamais coupée (son « - » en fin de ligne se lirait comme une césure, on recopierait
   « hinokojapanese ») : dans l'aide des questions et sur « Comment marche hinoko » ; le pied de page, plus bas. */
:is(.faq-help, main.ab) a[href^="mailto:"] { white-space: nowrap; }
.faq-help .link { font-size: 15px; }
@container (min-width: 880px) {
  .faq-box {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); grid-template-rows: auto 1fr;
    grid-template-areas: "title list" "help list"; column-gap: 56px; align-items: start;
  }
  .faq-box > .section-title { grid-area: title; }
  .faq-list { grid-area: list; margin-top: -14px; border-top: 0; }   /* la première question à la hauteur du titre */
  .faq-item:last-child { border-bottom: 0; }   /* le filet de la section suivante ferme la liste, sans double trait */
  /* Les questions en dernière section (Histoires, niveaux) : aucune section ne suit, la liste garde son filet. */
  section:not(:has(+ .section)) > .faq-box .faq-item:last-child { border-bottom: 2px solid var(--line); }
  .faq-help { grid-area: help; margin-top: 22px; }
}
@media (prefers-reduced-motion: reduce) { .faq-sign::before, .faq-sign::after { transition: none; } }

/* 2. Accueil, « Tout le JLPT, du N5 au N2, en histoires » : une carte par niveau, à sa couleur (celle de son badge,
   comme sur les pages de niveau : N5 vert, N4 bleu, N3 violet, N2 orange doré ; le badge dessiné en tête, bloc
   b9-badges), les mots de sa liste en grand sur la taille de la liste, la même part en barre, puis grammaire et
   histoires en petit. Deux colonnes sur une tablette ; au téléphone, une carte par ligne, la couleur en bordure gauche. */
.cov-cards { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.cov-card { --lv-soft: var(--n5-soft); --lv-ink: var(--n5-ink); --lv-edge: var(--n5); display: flex; }
.cov-card[data-level="N4"] { --lv-soft: var(--n4-soft); --lv-ink: var(--n4-ink); --lv-edge: var(--n4); }
.cov-card[data-level="N3"] { --lv-soft: var(--n3-soft); --lv-ink: var(--n3-ink); --lv-edge: var(--n3); }
.cov-card[data-level="N2"] { --lv-soft: var(--n2-soft); --lv-ink: var(--n2-ink); --lv-edge: var(--n2); }
.cov-card > a {
  flex: 1; display: flex; flex-direction: column; align-items: flex-start; padding: 16px 18px 18px;
  border: 2px solid var(--line); border-top: 6px solid var(--lv-edge); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--lift); color: var(--ink); text-decoration: none;
}
.cov-num { margin-top: 16px; font: 900 34px/1.05 var(--round); letter-spacing: -0.015em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cov-of { font: 800 17px/1 var(--round); letter-spacing: 0; color: var(--ink-3); }
.cov-cap { margin-top: 6px; font: 700 14.5px/1.35 var(--round); color: var(--ink-2); }
.cov-bar { align-self: stretch; display: block; height: 8px; margin: 14px 0; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.cov-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--lv-edge); }
.cov-line { font: 700 14.5px/1.5 var(--round); color: var(--ink-2); }
.cov-line b { font: 900 16px/1.3 var(--round); color: var(--ink); font-variant-numeric: tabular-nums; }
.cov-cards + .cover-note { max-width: 64em; margin-top: 16px; }
@media (hover: hover) { .cov-card > a:hover { border-color: var(--lv-edge); } }
.cov-card > a:focus-visible { outline: 3px solid var(--coral-text); outline-offset: 2px; }
@media (max-width: 960px) { .cov-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .cov-cards { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .cov-card > a { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: start; padding: 14px 16px 12px; border-top: 2px solid var(--line); border-left: 6px solid var(--lv-edge); }
  .cov-card .lv-badge { grid-row: 1 / span 5; margin-top: 4px; }
  .cov-num { margin-top: 0; font-size: 28px; }
  .cov-cap { margin-top: 2px; }
  .cov-bar { margin: 10px 0; }
}

/* 3. L'appel final (« Ta première histoire t'attend ») : centré, la mascotte au-dessus, sur l'accueil et sur la page
   « Comment marche hinoko ». */
.end-cta, .ab-end { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 56px; text-align: center; }
.end-cta > img, .ab-end-art { flex: none; width: 96px; height: 96px; }
.end-cta > div, .ab-end > div { display: flex; flex-direction: column; align-items: center; }
:is(.end-cta, .ab-end) .section-lede { max-width: 30em; }
:is(.end-cta, .ab-end) .btn { margin-top: 24px; }

/* 4. Pied de page de toutes les pages (assets/chrome.js), comme celui de folio.fyi : la marque, les badges des magasins
   et la langue (une liste verticale en deux colonnes, 4 + 3) ; quatre colonnes titrées, un lien par ligne ; le © en bas,
   sous un filet. Un lien ne se coupe qu'aux espaces, l'adresse e-mail jamais (son « - » se lirait comme une césure).
   Largeurs mesurées dans les sept langues (les liens les plus larges : 716 px en indonésien, 687 en allemand) :
   - 1 180 px et plus : la marque en colonne à gauche, à la largeur de son contenu ; les quatre colonnes à la largeur
     de leurs liens, réparties sur le reste ;
   - de 900 à 1 179 px : la marque en bandeau au-dessus (la flamme et les badges à gauche, la langue à droite), les
     quatre colonnes réparties sur toute la largeur ;
   - de 721 à 899 px : deux colonnes égales, la langue du bandeau alignée sur la seconde ;
   - téléphone : la marque, les badges, puis la langue alignée sur les deux colonnes de liens (44 px de haut) ; sous
     520 px, la colonne « hinoko », celle de l'adresse, sur toute la largeur ; une seule colonne sous 360 px. */
footer.site-foot .wrap { display: block; max-width: 1120px; padding-top: 44px; padding-bottom: 36px; }
.foot-main { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 36px 48px; align-items: start; }
.foot-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; min-width: 0; }
.foot-brand .brand { margin-top: -12px; color: var(--ink); }   /* la flamme (44 px) centrée sur la ligne des titres */
.foot-brand .stores { flex-direction: column; align-items: flex-start; gap: 14px; margin: 0; }
.foot-t { margin: 0 0 8px; font: 900 16px/1.3 var(--round); color: var(--ink); }
.foot-links { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 32px 28px; }
.foot-col ul { margin: 0; padding: 0; list-style: none; }
footer.site-foot .foot-col a { display: flex; min-height: 36px; padding: 4px 0; color: var(--ink-2); font: 700 15px/1.35 var(--round); }
footer.site-foot .foot-col a[href^="mailto:"] { white-space: nowrap; }
.foot-lang-list { display: grid; grid-template-columns: repeat(2, max-content); grid-template-rows: repeat(4, auto); grid-auto-flow: column; column-gap: 16px; }
footer.site-foot .foot-lang-list a { min-height: 36px; color: var(--ink-3); font: 700 14.5px/1.3 var(--round); white-space: nowrap; }
footer.site-foot .foot-lang-list a[aria-current] { color: var(--ink); font-weight: 900; }
.foot-small { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 40px 0 0; padding-top: 18px; border-top: 2px solid var(--line); color: var(--ink-3); font-size: 13px; line-height: 1.5; }
footer.site-foot a:focus-visible { outline: 3px solid var(--coral-text); outline-offset: 2px; border-radius: 6px; }
@media (max-width: 1179px) {
  .foot-main { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .foot-brand { display: grid; grid-template-columns: auto auto; grid-template-areas: "brand langs" "stores langs"; justify-content: space-between; align-items: start; gap: 16px 28px; }
  .foot-brand .brand { grid-area: brand; justify-self: start; }
  .foot-brand .stores { grid-area: stores; }
  .foot-langs { grid-area: langs; }
}
/* Deux colonnes égales ; une colonne s'élargit plutôt que de laisser déborder un mot plus long qu'elle. */
@media (max-width: 899px) {
  .foot-brand, .foot-links { grid-template-columns: repeat(2, minmax(min-content, 1fr)); }
}
@media (max-width: 720px) {
  footer.site-foot .wrap { padding-top: 32px; }
  footer.site-foot .brand b { display: inline; }   /* la barre du haut ne garde que la flamme ; ici, le nom aussi */
  .foot-brand { grid-template-columns: minmax(0, 1fr); grid-template-areas: "brand" "stores" "langs"; gap: 20px; }
  .foot-brand .brand { margin-top: 0; }
  .foot-brand .stores { flex-direction: row; align-items: center; gap: 8px 14px; }
  .foot-links { gap: 28px 20px; }
  .foot-lang-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
  footer.site-foot :is(.foot-col, .foot-lang-list) a { min-height: 44px; }
  .faq-item > summary > h3 { font-size: 17.5px; }
  .faq-a { padding-right: 0; }
  .faq-a p { font-size: 16px; }
  .end-cta, .ab-end { padding-top: 40px; }
  .end-cta > img, .ab-end-art { width: 80px; height: 80px; }
  /* Le bouton final sur toute la largeur, comme celui du haut de l'accueil. */
  :is(.end-cta, .ab-end) > div, :is(.end-cta, .ab-end) .btn { align-self: stretch; }
}
@media (max-width: 519px) { .foot-col[aria-labelledby="foot-hinoko"] { grid-column: 1 / -1; } }
@media (max-width: 359px) { .foot-links { grid-template-columns: minmax(0, 1fr); } }
/* === fin b4-accueil === */

/* === foot-lang === */
/* Pied de page (17/11/2026, demande d'Hugo) : la langue en menu déroulant. Un <details> : sans JavaScript, et les liens
   des 7 langues restent dans le HTML. La liste s'ouvre vers le haut (bas de page). */
.foot-lang-menu { position: relative; display: inline-block; }
.foot-lang-menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 16px; border: 2px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 800 14.5px/1 var(--round); cursor: pointer; }
.foot-lang-menu > summary::-webkit-details-marker { display: none; }
.foot-lang-menu > summary::after { content: ""; width: 6px; height: 6px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: translateY(-2px) rotate(45deg); }
.foot-lang-menu[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.foot-lang-menu > summary:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
footer.site-foot .foot-lang-menu > .foot-lang-list { position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 30; display: flex; flex-direction: column; gap: 2px; min-width: 210px; padding: 6px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 12px 32px color-mix(in srgb, var(--ink) 14%, transparent); }
footer.site-foot .foot-lang-menu .foot-lang-list a { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 10px; color: var(--ink-2); font: 700 14.5px/1.3 var(--round); text-decoration: none; white-space: nowrap; }
footer.site-foot .foot-lang-menu .foot-lang-list a:hover { background: var(--surface-2); color: var(--ink); }
footer.site-foot .foot-lang-menu .foot-lang-list a[aria-current] { color: var(--ink); font-weight: 900; }
/* === fin foot-lang === */

/* === b6-entete === */
/* En-tête écrit en entier au build (17/11/2026, demande d'Hugo : il « se rechargeait » à chaque page) : logo, Histoires,
   Mes mots, « Aa », langue, compte ; assets/app.js ne fait plus que brancher ses boutons. Ce qui dépend du navigateur
   garde sa place avant le JavaScript : le nombre de mots à revoir (data-due et --due, posés par assets/boot.js, montrés
   comme le compteur .count) et le compte (data-returning : « Se connecter » à la taille du bouton rond). */
:root[data-due] .top [data-words]::after {
  content: counter(due); counter-reset: due var(--due);
  display: inline-block; box-sizing: border-box; min-width: 24px; height: 24px; padding: 0 7px; margin-left: 7px; border-radius: 12px;
  background: var(--coral-text); color: var(--on-coral); font: 900 13px/24px var(--round); text-align: center;
}
:root[data-returning] .top .acct:not([data-state]) .signin {
  width: 44px; padding: 0; border-color: transparent; border-radius: 50%; background: var(--coral-soft); color: transparent;
}
:root[data-returning] .top .acct:not([data-state]) .signin > * { visibility: hidden; }
/* « Aa » toujours dans l'en-tête, à la même place (après « Mes mots »), téléphone compris ; au téléphone, la langue
   reste dans le pied de page. Pour que tout tienne sur une ligne dans les sept langues (« Minhas palavras », « Meine
   Wörter »), compteur compris : jusqu'à 720 px, le compteur devient une pastille sur le coin de « Mes mots » et le menu
   des langues (de 561 à 760 px) montre son code (DE, PT…), comme sous 420 px ; jusqu'à 880 px les liens se serrent un
   peu, davantage sur un téléphone étroit. */
@media (min-width: 561px) and (max-width: 880px) {
  .top .nav { gap: 4px; }
  .top .nav > a { padding: 0 12px; }
}
@media (min-width: 561px) and (max-width: 760px) {
  .top .lang-select select { width: 44px; padding: 0; color: transparent; }
  .top .lang-select select option { color: var(--ink); background: var(--surface); }
  .top .lang-select::after { display: none; }
  .top .lang-select .code {
    display: grid; place-items: center; position: absolute; inset: 0; pointer-events: none;
    font: 900 13.5px/1 var(--round); color: var(--ink); letter-spacing: 0.02em;
  }
}
@media (max-width: 560px) {
  .top .nav > [data-settings] { display: inline-grid; }
}
@media (max-width: 720px) {
  .top .nav > a[data-words] { position: relative; }
  .top [data-words] .count, :root[data-due] .top [data-words]::after {
    position: absolute; top: -4px; right: -3px; min-width: 20px; height: 20px; margin: 0; padding: 0 5px;
    border-radius: 10px; font-size: 11.5px; line-height: 20px; box-shadow: 0 0 0 2px var(--bg);
  }
}
@media (max-width: 420px) {
  .top .wrap { padding: 0 10px; gap: 2px; }
  .top .nav { gap: 2px; }
  .top .nav > a { padding: 0 8px; font-size: 14px; }
}
@media (max-width: 374px) {
  .top .nav > a { padding: 0 6px; font-size: 13.5px; }
  .top :is(.icon-btn, .signin, .avatar), :root[data-returning] .top .acct:not([data-state]) .signin { width: 40px; height: 40px; }
}
@media (max-width: 340px) {
  .top .wrap { padding: 0 8px; }
  .top .brand { min-width: 34px; }
  .top .brand img { width: 28px; height: 28px; }
  .top .nav > a { padding: 0 5px; font-size: 13px; }
}
/* Transitions de page (Chrome, Safari 18.2 et plus ; sans effet ailleurs) : l'en-tête reste immobile d'une page à
   l'autre, le reste se fond ; rien pour qui demande moins d'animations. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .top { view-transition-name: site-header; }
  ::view-transition-group(site-header) { animation: none; }
}

/* Pages légales et assistance (tools/seo/legal.mjs) : le texte dans la colonne de lecture du site, avec la typographie
   de l'ancienne feuille des pages légales (landing/assets/page.css, gardée pour le PDF des CGV : tools/cgv_pdf.mjs). */
.legal .sheet { margin: 20px 0 32px; font: 600 17px/1.65 var(--round); }
.legal h1 { font: 900 40px/1.15 var(--round); letter-spacing: -0.015em; margin: 0 0 8px; }
.legal h2 { font: 800 22px/1.3 var(--round); margin: 34px 0 8px; }
.legal strong { font-weight: 800; }
.legal .meta { font-size: 14px; font-weight: 700; color: var(--ink-3); margin: 0 0 22px; }
.legal :is(p, li) { color: var(--ink); }
.legal .muted { color: var(--ink-2); }
.legal .sheet a { color: var(--coral-text); font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.legal a[href^="mailto:"] { white-space: nowrap; }   /* l'adresse jamais coupée */
.legal dl { margin: 12px 0 16px; }
.legal dt { font-weight: 800; margin-top: 12px; }
.legal dd { margin: 0; }
@media (min-width: 601px) {
  .legal dl { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: 8px 20px; }
  .legal dt { margin: 0; }
}
.legal .box { background: var(--surface); border: 2px solid var(--line); border-radius: 18px; padding: 4px 20px; margin: 18px 0; }
.legal .box-title { font-weight: 900; }
.legal .small { font-size: 15px; color: var(--ink-2); }
.legal .todo { background: var(--sun-soft); border-radius: 4px; padding: 0 4px; }
.legal :target { scroll-margin-top: 84px; }   /* une ancre (#en-refunds…) sous l'en-tête collant */
@media (max-width: 600px) { .legal h1 { font-size: 32px; } }
/* === fin b6-entete === */

/* === b5-mascotte === */
/* Second passage de design du 17/11/2026 (demande d'Hugo) : les neuf poses de la mascotte à leur place (assets/poses.js),
   le pied de page plus court au téléphone (R1) et sa langue alignée sur la 4e colonne de 900 à 1 179 px, la couverture
   de l'accueil plus compacte au téléphone (G3), l'adresse d'un seul tenant sur la page de rétractation (R2). La
   mascotte est immobile, décorative, jamais plus grande que le texte qu'elle accompagne, jamais deux à l'écran
   ensemble (DESIGN.md, § 4). Couleurs : les jetons du site seulement. */

/* 1. Une pose : un bloc à sa taille (ses attributs width et height ; plus petite au téléphone). */
.pose { display: block; flex: none; width: 104px; height: 104px; }

/* L'en-tête d'une section illustrée (poseHeadHTML) : la pose écrite juste après le titre, avant son chapeau.
   - 721 px et plus : le titre et son chapeau à gauche, la pose à droite (104 px, 80 pour un titre seul), centrée sur le
     texte, à 32 px de lui. Sa colonne est la marge droite du texte, la pose y est placée en position absolue : le
     texte garde son flux (titre, chapeaux, leurs marges), l'en-tête la hauteur du plus haut des deux, le texte centré
     sur une pose plus haute que lui.
   - 720 px et moins : le titre sur toute la largeur, jamais rétréci ; la pose (60 px) flotte à droite des premières
     lignes du chapeau ; un titre seul n'a pas de pose (jamais chargée : loading="lazy"). « desk » : pas de pose au
     téléphone (le test de lecture garde son texte au premier écran, la couverture de l'accueil reste courte). */
@media (min-width: 721px) {
  .pose-head { position: relative; display: flex; align-items: center; min-height: 104px; }
  .pose-text { flex: 1; min-width: 0; padding-right: 136px; }
  .pose-text > .pose { position: absolute; top: calc(50% - 52px); right: 0; }
  .pose-head--solo { min-height: 80px; }
  .pose-head--solo > .pose-text { padding-right: 112px; }
  .pose-head--solo .pose { top: calc(50% - 40px); width: 80px; height: 80px; }
}
/* Les chapeaux des pages de niveau gardent leur colonne de lecture (46em) ; la pose se range à droite, au-dessus de
   l'échelle N5 → N2. */
.lv-sec .pose-text > .section-lede { max-width: 46em; }
@media (max-width: 720px) {
  .pose-head:not(.pose-head--desk), .pose-head:not(.pose-head--desk) > .pose-text { display: flow-root; }
  .pose-text > .pose { float: right; width: 60px; height: 60px; margin: 2px 0 4px 12px; }
  .pose-head--solo .pose, .pose-head--desk .pose { display: none; }
}

/* L'encadré de l'app des pages d'apprentissage (collant à droite à 1 080 px et plus, à la fin de la colonne en
   dessous) : dès 721 px, une page qui a sa pose garde une seule mascotte à l'écran, l'encadré perd la sienne (de 721 à
   1 079 px, sur une page courte comme celle des contes, il arrive à l'écran avec la pose). Au téléphone, il la garde :
   la pose d'un titre seul n'y est pas, les autres sont loin de la fin de la page. */
@media (min-width: 721px) {
  .learn-grid:has(> .learn-main .pose-head) .app-card > img { display: none; }
}

/* 2. Questions : « reflexion » sous « Pas trouvé ta réponse ? », seulement dans la colonne de gauche (la section a
   880 px et plus) ; ailleurs, absente et jamais chargée (loading="lazy"). Pas sur l'accueil (tools/seo/faq.mjs, pose :
   false) : son appel final et sa mascotte suivent les questions. 88 px : elle accompagne l'aide, sans la dominer. */
.faq-pose { display: none; }
@container (min-width: 880px) {
  .faq-help > .faq-pose { display: block; width: 88px; height: 88px; margin-top: 24px; }
}

/* 3. Toutes les réponses justes : « fete » à côté du score du test de lecture, et à côté de « 3 sur 3 » sous les
   questions d'une histoire (assets/pages.js). Le paragraphe de l'histoire, vide au départ, reste une région annoncée. */
.rt-result, .sq-result { display: flex; align-items: center; gap: 16px; }
.rt-result > .pose, .sq-result > .pose { width: 88px; height: 88px; margin-top: 18px; }
.rt-result > .rt-score { flex: 1; min-width: 0; }
.sq-score { margin: 0; }
.sq-result.is-perfect > .sq-score {
  flex: 1; min-width: 0; margin: 18px 0 0; padding: 14px 18px; border-radius: 14px;
  background: var(--sun-soft); color: var(--sun-soft-ink); font: 800 16px/1.5 var(--round);
}
@media (max-width: 720px) { .rt-result > .pose, .sq-result > .pose { width: 72px; height: 72px; } }

/* 4. « À propos de ce conte » : pas de pose (la fête des trois réponses justes est juste au-dessus), le lien vers tous
   les contes comme avant. */

/* 5. Page 404 (« perdu ») et page hors ligne (« sommeil »), au-dessus du titre. Alignement optique : le dessin (pas le
   bord transparent de l'image) sur le bord du titre ; mesuré sur les images, 12 px pour « perdu » (son « ? »), 6 px
   pour « sommeil » (son oreiller) à 112 px. */
.not-found .pose { width: 112px; height: 112px; }
.not-found .pose-perdu { margin-left: -12px; }
.not-found .pose-sommeil { margin-left: -6px; }
@media (max-width: 720px) {
  .not-found .pose { width: 96px; height: 96px; }
  .not-found .pose-perdu { margin-left: -10px; }
  .not-found .pose-sommeil { margin-left: -5px; }
}

/* 6. Accueil, « Tout le JLPT, du N5 au N2 » au téléphone (G3) : les cartes deux par deux, comme au bureau (badge, mots
   en grand, barre, puis grammaire et histoires) ; une par ligne sous 360 px, où « 2 132 / 2 140 » ne tient plus. */
@media (min-width: 360px) and (max-width: 640px) {
  .cov-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cov-card > a {
    display: flex; flex-direction: column; align-items: flex-start; padding: 12px 12px 14px;
    border: 2px solid var(--line); border-top: 6px solid var(--lv-edge);
  }
  .cov-card .lv-badge { margin-top: 0; }
  .cov-num { margin-top: 10px; font-size: 24px; }
  .cov-of { font-size: 14px; }
  .cov-cap { margin-top: 2px; font-size: 13.5px; }
  .cov-bar { margin: 10px 0; }
  .cov-line { font-size: 13.5px; line-height: 1.4; }
  .cov-line b { font-size: 15px; }
  .cov-line + .cov-line { margin-top: 4px; }
}
@media (max-width: 640px) {
  #coverage .section-lede { font-size: 16px; line-height: 1.55; }
  .cov-cards + .cover-note { margin-top: 12px; line-height: 1.5; }
}
/* Au bureau, le chapeau de la couverture dans la colonne de lecture du site (46em, comme celui des pages de niveau) :
   plus de lignes d'environ 120 caractères. */
@media (min-width: 721px) { #coverage .section-lede { max-width: 46em; } }

/* 7. Pied de page (R1, mesuré dans les sept langues ; depuis la fusion du 17/11, la langue est un menu déroulant, un
   <details>, et le pied de page n'a plus d'adresse e-mail) :
   - de 900 à 1 179 px, la langue dans la 4e colonne, au-dessus de « Légal » (même bord gauche) : la marque et les
     liens dans une seule grille (display: contents), les badges sur les deux premières colonnes. Le menu ouvert
     s'aligne sur le bord droit de son bouton (il s'ouvre vers la gauche) : ancré à gauche, il sortait de l'écran ;
   - au téléphone, des écarts plus serrés, deux colonnes de liens, « hinoko » à côté de « Légal » (sous 520 px aussi) ;
     sous 375 px, des liens de 14,5 px ; sous 360 px, toujours deux colonnes, dans l'ordre du HTML (Lire, Apprendre,
     hinoko, Légal) : l'ordre du focus est celui de l'écran. Cibles de 44 px partout.
   Hauteur mesurée au téléphone (sept langues) : de 928 à 980 px de 360 à 500 px, de 985 à 1 063 px à 320 px. */
@media (min-width: 900px) and (max-width: 1179px) {
  .foot-main {
    grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 16px 28px;
    grid-template-areas: "brand brand . langs" "stores stores . langs" "read learn hinoko legal";
  }
  .foot-brand, .foot-links { display: contents; }
  .foot-col[aria-labelledby="foot-read"] { grid-area: read; }
  .foot-col[aria-labelledby="foot-learn"] { grid-area: learn; }
  .foot-col[aria-labelledby="foot-hinoko"] { grid-area: hinoko; }
  .foot-col[aria-labelledby="foot-legal"] { grid-area: legal; }
  .foot-links > .foot-col { margin-top: 16px; }   /* 16 + 16 px entre les badges et les colonnes, comme avant */
  footer.site-foot .foot-lang-menu > .foot-lang-list { left: auto; right: 0; }
}
@media (max-width: 720px) {
  footer.site-foot .wrap { padding-top: 24px; padding-bottom: 24px; }
  .foot-main { gap: 24px; }
  .foot-brand { gap: 14px; }
  .foot-t { margin-bottom: 6px; }
  .foot-links { gap: 24px 20px; }
  .foot-small { margin-top: 24px; padding-top: 14px; }
}
@media (max-width: 519px) { .foot-col[aria-labelledby="foot-hinoko"] { grid-column: auto; } }
@media (max-width: 374px) {
  .foot-links { column-gap: 16px; }
  footer.site-foot .foot-col a { font-size: 14.5px; }
}
@media (max-width: 359px) { .foot-links { grid-template-columns: repeat(2, minmax(min-content, 1fr)); } }

/* 8. Page de rétractation (R2) : l'adresse d'un seul tenant, comme partout ailleurs. */
.wd-more a[href^="mailto:"] { white-space: nowrap; }
/* === fin b5-mascotte === */

/* === b7-cls === */
/* Accueil d'un compte connecté (17/11/2026) : « Aujourd'hui » se dessine en deux temps, l'en-tête, l'objectif et la série
   tout de suite, les histoires et les badges avec le catalogue (assets/home.js). Rien ne doit bouger entre les deux
   (CLS mesuré 0,44 au bureau avant ce bloc) :
   - la section vide (avant assets/home.js) ou sans ses histoires (data-partial : catalogue en route, ou hors ligne) garde
     au moins un écran de haut, ses lignes en haut : le pied de page reste sous l'écran ;
   - la section des badges, vide jusqu'au catalogue, ne se montre pas (sa bordure du haut descendait à chaque étape) ;
   - les histoires attendent dans des squelettes au balisage des vraies cartes (assets/today.js) : mêmes boîtes, mêmes
     lignes ; barres à la place du texte inconnu, sans animation. */
:root[data-returning] #today:is(:empty, [data-partial]) { min-height: 100vh; align-content: start; }
:root[data-returning] #badges:empty { display: none; }
.today .skel.card, .today .story-card.skel { background: transparent; box-shadow: none; }
.today .sk {
  display: inline-block; width: var(--w, 100%); max-width: 100%; height: 0.75em; vertical-align: middle;
  border-radius: 999px; background: var(--line);
}
.today .sk-t { color: transparent; background: var(--line); border-color: transparent; box-shadow: none; border-radius: 999px; }
.today .btn.sk-t { border-radius: 18px; cursor: default; }
@media (min-width: 721px) { .today .daily.skel .sum .sk:nth-child(2) { display: none; } }   /* deux lignes ; trois au téléphone */
/* === fin b7-cls === */

/* === b9-badges === */
/* Badges des niveaux (17/11/2026) : les dessins d'Hugo (assets/badge-n5-48.webp…, balise de tools/seo/badges.mjs), là
   où le niveau est montré en grand, un seul par bloc de niveau ; 40 px au moins, lisibles en clair et en sombre. En
   dessous, la pastille de texte (.badge.lvl), aux couleurs des badges (jetons --n5… de :root). Pas de N1 : aucune
   histoire N1. Rien que des tailles ici : les dessins ont leurs couleurs, les cartes prennent celles des jetons. */
.lv-badge { display: block; flex: none; }

/* 1. En tête des pages de niveau : le badge à gauche du titre et de la ligne de faits (la pastille « N5 » n'y est plus) ;
   au téléphone, devant la ligne de faits : le titre garde toute la largeur, le test reste au premier écran. */
.level-head { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "badge title" "badge facts" "lede lede"; column-gap: 24px; align-items: center; }
.level-head > .page-title { grid-area: title; align-self: end; }
.level-head > .lv-badge { grid-area: badge; width: 88px; height: 88px; }
.level-head > .facts { grid-area: facts; align-self: start; }
.level-head > .section-lede { grid-area: lede; }

/* 2. En tête des guides du JLPT (/jlpt/n5…) : le badge à gauche du titre, l'introduction sur toute la largeur dessous ;
   au téléphone, au-dessus du titre. */
.learn-head:has(> .lv-badge) { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 22px; align-items: center; }
.learn-head > .lv-badge { grid-column: 1; grid-row: 1; width: 80px; height: 80px; margin-bottom: 12px; }
.learn-head:has(> .lv-badge) > .page-title { grid-column: 2; grid-row: 1; }
.learn-head:has(> .lv-badge) > :not(.lv-badge, .page-title) { grid-column: 1 / -1; }

/* 3. Titre d'un niveau (page Histoires, page des listes du JLPT) : le badge devant le titre ; le lien « Le N5 en
   détail » reste à la hauteur du titre. */
.lv-titled { display: flex; align-items: center; gap: 14px; }
.lv-titled > .lv-badge { width: 48px; height: 48px; }
#stories .lib-head { align-items: center; }

/* 4. Échelle N5 → N2 des pages de niveau, cartes « Tout le JLPT » de l'accueil, couverture de « Comment marche
   hinoko » : le badge en tête de chaque carte ou ligne, à la place de la pastille. */
.lv-top > .lv-badge, .cov-card .lv-badge, .ab-cov-row > .lv-badge { width: 48px; height: 48px; }

@media (max-width: 640px) {
  .level-head { grid-template-areas: "title title" "badge facts" "lede lede"; column-gap: 12px; }
  .level-head > .lv-badge { width: 48px; height: 48px; }
  .level-head > .facts { align-self: center; }
  .learn-head:has(> .lv-badge) { grid-template-columns: minmax(0, 1fr); }
  .learn-head > .lv-badge { width: 56px; height: 56px; margin-bottom: 10px; }
  .learn-head:has(> .lv-badge) > .page-title { grid-column: 1; grid-row: 2; }
  .lv-titled { gap: 12px; }
  .lv-titled > .lv-badge, .lv-top > .lv-badge, .cov-card .lv-badge, .ab-cov-row > .lv-badge { width: 44px; height: 44px; }
  /* L'échelle, une ligne par niveau : le badge à gauche du total et de sa barre (« Cette page » au bout du total), les
     chiffres sur toute la largeur dessous ; la ligne ne grandit pas de la hauteur du badge. */
  .lv-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "badge total here" "badge bar bar" "nums nums nums"; column-gap: 14px; align-items: center; }
  .lv-top { display: contents; }
  .lv-top > .lv-badge { grid-area: badge; }
  .lv-here { grid-area: here; }
  .lv-total { grid-area: total; }
  .lv-bar { grid-area: bar; }
  .lv-nums { grid-area: nums; }
}
/* === fin b9-badges === */

/* === b10-petits === */
/* Petites retouches du 17/11/2026 (demande d'Hugo). Couleurs : jetons de :root seulement (et leurs versions sombres).
   1. La flamme de la carte « Série » (assets/today.js, flameHTML) : dessinée comme la mascotte et les badges (contour
      bleu nuit épais, deux bleus en aplat, un reflet blanc), 64 px au bureau et 56 au téléphone, à gauche du nombre et
      de la meilleure série. Vive quand la série court ; en veille à 0 : plus basse, des bleus plus clairs, une étincelle
      jaune (--sun). Jetons --flame-… de :root. */
.streak-main > .flame { grid-row: span 2; display: block; width: 64px; height: 64px; }
.flame .fl-body { fill: var(--flame-body); stroke: var(--flame-line); stroke-width: 3; stroke-linejoin: round; }
.flame .fl-core { fill: var(--flame-core); }
.flame .fl-glint { fill: var(--flame-glint); }
.flame.is-rest .fl-body { fill: var(--flame-rest-body); }
.flame.is-rest .fl-core { fill: var(--flame-rest-core); }
.flame .fl-spark { fill: var(--sun); stroke: var(--flame-line); stroke-width: 1.5; stroke-linejoin: round; }
@media (max-width: 720px) { .streak-main > .flame { width: 56px; height: 56px; } }

/* 2. Médailles « Niveaux » : l'image du badge de leur niveau (assets/today.js, MEDAL_ART), N5 à N2 ; rien à colorer ici.
   3. Couverture de « Comment marche hinoko » (tools/seo/about.mjs) : la barre et le pourcentage de chaque niveau à la
      couleur de son badge (jetons --n5…, comme les cartes « Tout le JLPT » de l'accueil), plus en corail. */
.ab-cov-row { --lv-ink: var(--n5-ink); --lv-edge: var(--n5); }
.ab-cov-row[data-level="N4"] { --lv-ink: var(--n4-ink); --lv-edge: var(--n4); }
.ab-cov-row[data-level="N3"] { --lv-ink: var(--n3-ink); --lv-edge: var(--n3); }
.ab-cov-row[data-level="N2"] { --lv-ink: var(--n2-ink); --lv-edge: var(--n2); }
.ab-cov-row .ab-bar > span { background: var(--lv-edge); }
.ab-cov-row .ab-cov-pct { color: var(--lv-ink); }
/* === fin b10-petits === */

/* === b11-vocab === */
/* Vocabulaire par thème (tools/seo/vocab.mjs, refonte du 17/11/2026) : tout le contenu sur toute la largeur, l'app après
   lui ; premier écran : le titre, une phrase, les chiffres (.vs-figs des listes du JLPT), un sommaire, puis les mots ;
   chaque mot en carte (le japonais et ses furigana, le rōmaji, le sens, le niveau du JLPT) ; une couleur a sa pastille
   (sa valeur est dans les données, en style en ligne : --sw) ; les parties du corps sur les dessins d'Hugo, étiquettes
   en texte reliées par des traits. Couleurs d'interface : jetons du site seulement. */
.learn-grid--vocab > .learn-main { max-width: none; }
@media (min-width: 1080px) {
  .learn-grid--vocab { grid-template-columns: minmax(0, 1fr); }
  .learn-grid--vocab > .learn-aside { position: static; margin-top: 48px; }
}
.vc-head .section-lede, .vc-more { max-width: 46em; }
.vc-head .vs-figs { display: inline-block; margin-top: 14px; }
.vc-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.vc-toc a { display: inline-flex; align-items: center; min-height: 40px; padding: 7px 14px; border: 2px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 800 14.5px/1.25 var(--round); text-decoration: none; }
.vc-toc a .jp { font-family: var(--jp); font-weight: 700; }
.vc-toc a:focus-visible { outline: 3px solid var(--coral-text); outline-offset: 2px; }
@media (hover: hover) { .vc-toc a:hover { border-color: var(--coral); background: var(--coral-soft); } }
.vc-sec, .vc-stories, #picture, #word-by-word { scroll-margin-top: 76px; }
.vc-head + .section { margin-top: 24px; padding-top: 32px; }   /* les mots au plus près de l'en-tête */
/* Ce qui se lit en lignes garde la colonne de lecture (760 px) : les fiches « mot par mot », le tableau des lectures des
   compteurs. */
.learn-grid--vocab :is(#word-by-word, .entry-block) > *, .learn-grid--vocab .visual :is(.sd-title, .sd-note, .vt-wrap) { max-width: 760px; }

/* Les mots en cartes : quatre colonnes au bureau, deux au téléphone ; un mot long prend plus de place. */
.vw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.vw { display: flex; flex-direction: column; min-width: 0; padding: 12px 16px 14px; background: var(--surface); border: 2px solid var(--line); border-radius: 18px; box-shadow: var(--lift); }
.vw-top { display: flex; align-items: flex-end; gap: 10px; min-height: 64px; }
.vw-ja { font: 700 34px/1.2 var(--jp); color: var(--ink); word-break: keep-all; }
.vw-ja ruby { ruby-align: center; }
.vw-ja rt { font-size: 15px; font-weight: 500; color: var(--ink-2); }
.vw--4 .vw-ja { font-size: 30px; }
.vw--6 .vw-ja { font-size: 26px; }
.vw--8 .vw-ja { font-size: 22px; }
.vw-sw { flex: none; display: inline-block; width: 26px; height: 26px; margin-bottom: 8px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ink) 28%, transparent); }
.vw-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.vw-ro { font: 700 14px/1.4 var(--round); color: var(--ink-3); overflow-wrap: anywhere; }
.vw-lv { position: relative; flex: none; height: 22px; padding: 0 8px; font-size: 12px; text-decoration: none; }
.vw-lv::after { content: ""; position: absolute; inset: -11px -8px; }   /* une cible de 44 px, la pastille reste petite */
.vw-lv:focus-visible { outline: 3px solid var(--coral-text); outline-offset: 2px; }
@media (hover: hover) { .vw-lv:hover { box-shadow: inset 0 0 0 2px currentColor; } }
.vw-m { margin-top: 4px; font: 800 16px/1.4 var(--round); color: var(--ink); }
.vw-x { display: block; margin-top: 3px; font: 600 14px/1.45 var(--round); color: var(--ink-2); }
.vc-notes { max-width: 46em; margin-top: 20px; }
.vc-notes p { margin: 0 0 12px; color: var(--ink-2); font-size: 16.5px; line-height: 1.65; }
.vc-notes p:last-child { margin-bottom: 0; }

/* Nos histoires : les phrases choisies en cartes (le mot du thème surligné), puis les histoires gratuites qui emploient
   des mots de la page, les plus faciles d'abord. */
.vx-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin: 20px 0 0; padding: 0; list-style: none; }
.vx { display: flex; flex-direction: column; padding: 16px 18px 14px; background: var(--surface); border: 2px solid var(--line); border-radius: 18px; }
.vx-ja { margin: 0; font: 500 19px/2 var(--jp); color: var(--ink); }
.vx-ja .b { display: inline; }
.vx-ja mark { padding: 1px 2px; border-radius: 4px; background: var(--sun-soft); box-shadow: inset 0 -2px 0 var(--sun); color: inherit; }
.vx-tl { margin: 4px 0 10px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.vx-src { display: inline-flex; align-items: center; min-height: 44px; margin: auto 0 -8px; align-self: flex-start; font: 800 14px/1.4 var(--round); color: var(--coral-text); text-decoration: none; }
@media (hover: hover) { .vx-src:hover { text-decoration: underline; text-underline-offset: 3px; } }
.vc-h3 { margin: 36px 0 0; font: 800 21px/1.3 var(--round); }
.vc-lede { margin: 6px 0 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.vr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.vr-card { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px 18px; background: var(--surface); border: 2px solid var(--line); border-radius: 18px; box-shadow: var(--lift); color: var(--ink); text-decoration: none; }
@media (hover: hover) { .vr-card:hover { border-color: color-mix(in srgb, var(--coral) 50%, var(--line)); } }
.vr-t { font: 700 21px/1.6 var(--jp); }
.vr-tr { font: 700 14.5px/1.4 var(--round); color: var(--ink-2); }
.vr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; font: 700 13.5px/1.4 var(--round); color: var(--ink-3); }
.vr-words { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.vr-words > span { padding: 2px 9px; border-radius: 8px; background: var(--surface-2); font: 600 15px/1.5 var(--jp); color: var(--ink); }

/* Cartes des thèmes (accueil, « Autres thèmes ») : le titre, des mots du thème, le nombre de mots. */
.vc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin: 18px 0 0; padding: 0; list-style: none; }
.vc-card { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px 18px 14px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--lift); color: var(--ink); text-decoration: none; }
@media (hover: hover) { .vc-card:hover { border-color: color-mix(in srgb, var(--coral) 50%, var(--line)); } }
.vc-card:focus-visible, .vr-card:focus-visible { outline: 3px solid var(--coral-text); outline-offset: 2px; }
.vc-t { font: 800 18px/1.3 var(--round); }
.vc-t .jp { font-family: var(--jp); }
.vc-s { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font: 700 24px/1.35 var(--jp); color: var(--ink); }
.vc-s > span { display: inline-flex; align-items: center; gap: 6px; }
.vc-s .vw-sw { width: 14px; height: 14px; margin: 0; }
.vc-n { margin-top: auto; padding-top: 2px; font: 800 13.5px/1.4 var(--round); color: var(--ink-3); }
.vc-group .section-title { font-size: 26px; }

/* Les parties du corps sur les dessins d'Hugo : le dessin au milieu (détouré : propre sur les deux thèmes), les traits
   et les points en SVG, les étiquettes en texte (en %, à la taille du cadre, qui garde ses proportions). */
.bp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.bp-panel { display: flex; align-items: center; margin: 0; padding: 14px 10px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); }
.bp-fig { position: relative; width: 100%; }
.bp-img { position: absolute; display: block; height: auto; }
.bp-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.bp-lines line { stroke: var(--coral); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.bp-lines circle { fill: var(--coral); stroke: var(--surface); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.bp-labels { margin: 0; padding: 0; list-style: none; }
.bp-l { position: absolute; top: var(--y); display: flex; flex-direction: column; margin-top: -15px; line-height: 1.2; }
.bp-l--g { right: calc(100% - var(--x)); align-items: flex-end; text-align: right; }
.bp-l--d { left: var(--x); align-items: flex-start; text-align: left; }
.bp-w { white-space: nowrap; }
.bp-k { font: 700 23px/1.2 var(--jp); color: var(--ink); }
.bp-kn { font: 500 13px/1.2 var(--jp); color: var(--ink-2); }
.bp-s { font: 700 13px/1.35 var(--round); }
.bp-ro { color: var(--ink-3); }
.bp-g { color: var(--coral-text); font-weight: 800; }

@media (max-width: 900px) {
  .bp { grid-template-columns: minmax(0, 1fr); }
  .bp-fig { max-width: 560px; margin-inline: auto; }   /* une figure par ligne, à la taille d'un écran de téléphone large */
}
@media (max-width: 640px) {
  .vw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .vw { padding: 10px 12px 12px; border-radius: 16px; }
  .vw--6, .vw--8 { grid-column: span 2; }
  .vw-top { min-height: 54px; gap: 8px; }
  .vw-ja { font-size: 30px; }
  .vw-ja rt { font-size: 13px; }
  .vw--4 .vw-ja { font-size: 24px; }
  .vw--6 .vw-ja, .vw--8 .vw-ja { font-size: 24px; }
  .vw-sw { width: 22px; height: 22px; margin-bottom: 7px; }
  .vw-ro { font-size: 13px; }
  .vw-m { font-size: 15px; }
  .vw-x { font-size: 13.5px; }
  /* Le sommaire : une rangée qui défile, jusqu'aux bords de l'écran (la marge de la page est de 20 px). */
  .vc-toc { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; margin-inline: -20px; padding: 0 20px 4px; scrollbar-width: none; }
  .vc-toc::-webkit-scrollbar { display: none; }
  .vc-toc a { flex: none; }
  .vx-list { grid-template-columns: minmax(0, 1fr); }
  .vc-cards { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .vc-s { font-size: 21px; }
  .bp-panel { padding: 10px 2px; }
  .bp-l { margin-top: -11px; }
  .bp-k { font-size: 17px; }
  .bp-kn { font-size: 11px; }
  .bp-s { font-size: 11px; }
}
/* === fin b11-vocab === */

/* === b12-progression === */
/* Progression V1 (17/11/2026 ; refonte, action 2.6, visuel 15) : la page « Ma progression » (/progres,
   assets/progress-page.js), la carte « +n mots du N5 » sous la carte de fin d'histoire (assets/reader.js), la petite
   carte d'« Aujourd'hui » (assets/today.js) et l'entrée du menu du compte (assets/account.js).
   Couleurs : les jetons des niveaux (--n5… de :root et des thèmes sombres) et ceux du site, mêlés entre eux ; aucune
   couleur en dur. Barre empilée du vocabulaire, des parts exclusives : maîtrisé = l'encre du niveau (la plus
   contrastée, en clair comme en sombre), connu (déclaré) = rayures encre et trait, en révision = le trait du niveau
   un peu mêlé à la surface (en sombre, l'encre et le trait seuls se ressemblaient trop), rencontré = le trait très mêlé
   à la surface, pas encore vu = la piste. Les nombres sont toujours écrits à côté (légende).
   Rien ne bouge au chargement : la page garde un écran de haut tant qu'elle attend ses données, ses squelettes ont la
   taille du texte qu'ils remplacent. */
.prog, .gain { --lv: var(--n5); --lv-ink: var(--n5-ink); --lv-soft: var(--n5-soft); }
:is(.prog-level, .gain)[data-level="N4"] { --lv: var(--n4); --lv-ink: var(--n4-ink); --lv-soft: var(--n4-soft); }
:is(.prog-level, .gain)[data-level="N3"] { --lv: var(--n3); --lv-ink: var(--n3-ink); --lv-soft: var(--n3-soft); }
:is(.prog-level, .gain)[data-level="N2"] { --lv: var(--n2); --lv-ink: var(--n2-ink); --lv-soft: var(--n2-soft); }
:is(.prog-level, .gain) { --lv-mid: color-mix(in srgb, var(--lv) 80%, var(--surface)); --lv-seen: color-mix(in srgb, var(--lv) 38%, var(--surface)); }

#progress[aria-busy] { min-height: 100vh; }
.prog .sk-t, .gain .sk-t { color: transparent; background: var(--line); border-color: transparent; box-shadow: none; border-radius: 999px; }
.prog-head { padding: 52px 0 22px; }
.prog-head h1 { margin: 0; font-size: clamp(34px, 5vw, 46px); }
.prog-lede { margin: 10px 0 0; font: 700 17px/1.45 var(--round); color: var(--ink-2); }

/* Les quatre chiffres : quatre cases au bureau, deux par ligne au téléphone. */
.prog-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.prog-stats .stat { display: flex; flex-direction: column; min-width: 0; }
.prog-stats .stat b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.prog-stats .stat b .of { font: 800 17px/1 var(--round); color: var(--ink-3); }
.prog-stats .stat b .sk-t { font: inherit; }
.prog-stats .stat .link { align-self: flex-start; min-height: 32px; margin-top: auto; font-size: 14.5px; color: var(--coral-soft-ink); }

.prog-pills { margin-top: 30px; }
.prog-pills .pill { padding: 0 22px; }

/* La carte du niveau. */
.prog-level { margin-top: 16px; padding: 22px 24px 24px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--lift); }
.prog-lv-head { display: flex; align-items: center; gap: 14px; }
.prog-lv-head > .lv-badge { width: 48px; height: 48px; }
.prog-lv-t { min-width: 0; }
.prog-lv-t h2 { margin: 0; font: 900 24px/1.2 var(--round); letter-spacing: -0.01em; }
.prog-lv-sub { margin: 2px 0 0; font: 700 15px/1.45 var(--round); color: var(--ink-2); }
.prog-lv-sub b { font-weight: 900; color: var(--ink); }
.prog-pct { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--lv-soft); font: 800 13.5px/1.5 var(--round); color: var(--lv-ink); white-space: nowrap; vertical-align: 1px; }
.prog-pct .sk-t { padding: 0 2px; }

.prog-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.prog-bar.thin { height: 8px; margin-top: 16px; }
.prog-bar > span { flex: none; min-width: 3px; height: 100%; }
.seg-mastered { background: var(--lv-ink); }
.seg-known { background: repeating-linear-gradient(135deg, var(--lv-ink) 0 3px, var(--lv) 3px 6px); }
.seg-three, .seg-met { background: var(--lv); }
.seg-review { background: var(--lv-mid); }
.seg-seen, .prog-gram .seg-met { background: var(--lv-seen); }

.prog-block { margin-top: 24px; }
.prog-block h3 { margin: 0; font: 800 13px/1.4 var(--round); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.prog-big { margin: 6px 0 10px; font: 700 16px/1.35 var(--round); color: var(--ink-2); }
.prog-big b { font: 900 32px/1.1 var(--round); color: var(--ink); font-variant-numeric: tabular-nums; }
.prog-legend { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font: 700 14px/1.4 var(--round); color: var(--ink-2); }
.prog-legend li { display: flex; align-items: flex-start; gap: 7px; }
.prog-legend b { font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.prog-legend .prog-sw { flex: none; width: 12px; height: 12px; margin-top: 4px; border-radius: 4px; }
.key-mastered .prog-sw { background: var(--lv-ink); }
.key-known .prog-sw { background: repeating-linear-gradient(135deg, var(--lv-ink) 0 3px, var(--lv) 3px 6px); }
.key-review .prog-sw { background: var(--lv-mid); }
.key-seen .prog-sw { background: var(--lv-seen); }
.key-unseen .prog-sw { background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--line); }
.prog-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.prog-note { display: flex; align-items: flex-start; gap: 7px; margin: 8px 0 0; font: 700 14px/1.45 var(--round); color: var(--ink-2); }
.prog-note .prog-sw { flex: none; width: 12px; height: 12px; margin-top: 4px; border-radius: 4px; background: var(--lv); }   /* la part pleine de la barre */
.prog-empty { margin: 22px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--lv-soft); font: 700 14.5px/1.5 var(--round); color: var(--lv-ink); }

/* Lire ensuite : une histoire et le bouton principal de la page. */
.prog-next { margin-top: 32px; }
.prog-next-card { display: flex; align-items: center; gap: 14px 24px; margin-top: 10px; padding: 16px 20px 18px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--lift); }
.prog-next-card.skel { background: transparent; box-shadow: none; }
.prog-next-card .body { flex: 1; min-width: 0; }
.prog-next-card .t { font: 700 24px/1.75 var(--jp); color: var(--ink); }
.prog-next-card .tr { font: 800 16px/1.35 var(--round); color: var(--ink-2); }
.prog-next-card .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 8px; font: 700 13.5px/1.4 var(--round); color: var(--ink-3); }
.prog-fresh { margin: 10px 0 0; font: 800 15px/1.45 var(--round); color: var(--ink); }
.prog-next-card > .btn { flex: none; }
.prog-done { margin: 10px 0 0; font: 700 16px/1.5 var(--round); color: var(--ink-2); }

.prog-local { margin: 28px 0 0; font: 700 15px/1.55 var(--round); color: var(--ink-2); }
.prog-local a { color: var(--coral-text); font-weight: 800; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prog-defs { margin-top: 28px; border-top: 2px solid var(--line); }
.prog-defs summary { display: flex; align-items: center; min-height: 52px; cursor: pointer; font: 800 16px/1.3 var(--round); color: var(--ink-2); }
.prog-defs ul { display: grid; gap: 8px; margin: 0 0 8px; padding: 0 0 0 20px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }

/* Fin d'histoire : « +n mots du N5 », la barre du vocabulaire du niveau, le lien vers la page. Fond doux du niveau. */
.gain { display: grid; gap: 4px; margin-top: 12px; padding: 18px 22px; border: 2px solid transparent; border-radius: var(--radius); background: var(--lv-soft); color: var(--lv-ink); text-decoration: none; }
.gain-n { font: 900 24px/1.25 var(--round); }
.gain-new, .gain-total { font: 700 15px/1.45 var(--round); }
.gain .prog-bar { height: 12px; margin: 10px 0 4px; background: var(--surface); }
.seg-new { background: var(--lv); }
.gain-go { justify-self: start; margin-top: 6px; font: 800 15px/1.4 var(--round); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
@media (hover: hover) { a.gain:hover { border-color: var(--lv); } }

/* Menu du compte : l'entrée « Ma progression », comme celle de Premium. */
.acct-link { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); color: var(--ink); text-decoration: none; }
.acct-link .txt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.acct-link b { font: 800 15px/1.35 var(--round); }
.acct-link .txt > span { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.acct-link .go { flex: none; font: 900 18px/1 var(--round); color: var(--coral-text); }

@media (max-width: 720px) {
  .prog-head { padding: 30px 0 18px; }
  .prog-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prog-pills { margin-top: 24px; }
  .prog-level { padding: 18px 16px 20px; }
  .prog-big b { font-size: 28px; }
  .prog-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
  .prog-pair { grid-template-columns: minmax(0, 1fr); }
  .prog-next-card { flex-direction: column; align-items: stretch; padding: 14px 16px 16px; }
  .prog-next-card .t { font-size: 22px; }
  .gain { padding: 16px 18px; }
}
/* === fin b12-progression === */

/* === b13-p0a === */
/* Revue du 17/11/2026, P0-2 : liens dans les textes communs (les contes de l'accueil, le résumé du guide JLPT N5),
   dans la couleur des liens des réponses ; la ligne « prix sur le web » sous la note des abonnements. */
.feats p a:not([class]), .learn-head .section-lede a:not([class]) { color: var(--coral-text); font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pm-note.pm-where { margin-top: 4px; }
/* P0-1 : les parenthèses des furigana (<rp>) sont pour les machines ; le navigateur les cache déjà, par sécurité. */
rp { display: none; }
/* « Pour qui est hinoko » (Comment marche hinoko) : sous le chapeau, une colonne de lignes titrées, comme les critères du
   comparatif. */
.ab-for { margin-top: 22px; max-width: 46em; }
.criteria.ab-for-list { grid-template-columns: minmax(0, 1fr); margin-top: 8px; }
@media (max-width: 560px) {
  .criteria.ab-for-list > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
/* === fin b13-p0a === */

/* === b14-p07 === */
/* Pages d'app sans saut à l'affichage (17/11/2026 ; refonte/REVUE_2026-11-17.md, P0-7) : lecteur (/lire), offre
   (/premium), connexion, mots, rétractation. Leur en-tête est écrit en entier au build (tools/seo/apppages.mjs) ; leur
   contenu, dessiné par le navigateur, arrive après les scripts (et, pour le lecteur et l'offre, le catalogue). Jusque-là
   <main aria-busy> garde un écran de haut, comme /progres ; le script de chaque page retire aria-busy juste avant son
   premier rendu, dans la même tâche.
   Ce qui est déjà dans la page pendant l'attente bougerait à l'arrivée du contenu (Chrome compte aussi les boîtes vides
   qui ont du padding, et ce qui remonte de sous l'écran) : le lien de retour et le pied de page (une page courte,
   comme la connexion, les fait remonter dans l'écran), et, dans le lecteur, le titre, la barre collante et le texte
   encore vides. Ils ne sont pas affichés tant que main est occupé : ils arrivent avec le contenu, en une image, sans
   rien pousser. /progres (bloc b12-progression) garde ses squelettes pendant l'attente.
   Mesuré (Chrome sans fenêtre, 412 et 1 280 px, latence 150 et 562 ms, avec et sans compte, catalogue retardé) : CLS
   jusqu'à 0,81 sur /lire, 0,88 sur /premium et 0,99 sur /mots avant ; 0,0002 au plus après. */
main[aria-busy] { min-height: 100vh; }
main[aria-busy] ~ :is(.back-row, footer.site-foot), main[aria-busy]:not(#progress) > * { display: none; }
/* En-tête écrit en anglais au build, visiteur d'une autre langue : ses libellés (Stories, My words, Sign in, EN) restent
   cachés jusqu'à sa réécriture dans la bonne langue (assets/boot.js pose data-lang-wait, assets/app.js le retire ; au
   plus tard 1,5 s après DOMContentLoaded). visibility, pas display : les boîtes gardent leur place, rien ne bouge. */
:root[data-lang-wait] header.top .nav { visibility: hidden; }
/* === fin b14-p07 === */

/* === b15-p03 === */
/* Revue globale du 17/11/2026, lot P0-3 (refonte/REVUE_2026-11-17.md) : niveaux, histoires et accueil. */

/* Accueil, « Tout le JLPT » : sous chaque carte (hors de son lien), le guide du test du niveau. */
.cov-card { flex-direction: column; }
.cov-guide { margin: 4px 2px 0; }
.cov-guide .link { font-size: 14.5px; }

/* Page de niveau : les histoires Premium repliées sous les gratuites (le volet de la page Histoires). */
.lv-premium { margin-top: 28px; }

/* Page de niveau : le titre du thème des contes (昔話) mène à leur accueil ; la traduction se souligne. */
.theme-head a.theme-link { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 12px; color: inherit; text-decoration: none; }
.theme-head a.theme-link .tr { color: var(--coral-text); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
@media (hover: hover) { .theme-head a.theme-link:hover .tr { color: var(--ink); } }

/* Page de niveau : « La grammaire de ces histoires », chaque point (japonais, puis son explication) mène à sa fiche.
   Deux colonnes au bureau, une au téléphone. */
.lv-gram { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lg-item {
  display: block; height: 100%; padding: 10px 16px 12px; border: 2px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink-2); font-size: 15px; line-height: 1.5; text-decoration: none;
}
.lg-ja { display: block; font: 700 19px/1.5 var(--jp); color: var(--ink); }
a.lg-item .lg-ja { color: var(--coral-text); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
@media (hover: hover) { a.lg-item:hover { border-color: var(--coral); } }
a.lg-item:focus-visible { outline: 3px solid var(--coral-text); outline-offset: 2px; }
/* Au téléphone, une liste à filets plutôt que douze cartes : la section reste courte, l'épreuve remonte. */
@media (max-width: 720px) {
  .lv-gram { grid-template-columns: minmax(0, 1fr); gap: 0; border-top: 2px solid var(--line); }
  .lg-item { padding: 8px 2px 10px; border: 0; border-bottom: 2px solid var(--line); border-radius: 0; background: none; font-size: 14.5px; }
  .lg-ja { font-size: 18px; }
}

/* Histoire : sous la fiche de faits, ce qui est contrôlé, puis le lien vers la méthode. */
.story-method { max-width: 46em; margin: 12px 0 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.story-method .link { display: inline; min-height: 0; font-size: 15px; white-space: nowrap; }

/* Histoire, « La grammaire de l'histoire » : chaque point mène à sa fiche dans la liste du JLPT. */
a.sg-ja { color: var(--coral-text); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
@media (hover: hover) { a.sg-ja:hover { color: var(--ink); } }
/* === fin b15-p03 === */

/* === b16-p045 === */
/* Revue du 17/11/2026, lots P0-4 et P0-5 (tools/seo/learn.mjs) : les accueils de rubrique et les listes du JLPT.
   Accueil du JLPT : le tableau des niveaux et celui des parties de l'épreuve tiennent dans la colonne de lecture au
   bureau (pas de défilement) ; au téléphone, une fiche par ligne (table.compare). Contes : « Les contes en bref », et
   l'app après la liste à toute taille d'écran (learn-grid--after). Grammaire : « Par où commencer ». Encadré de l'app :
   la lecture sur le web avant les badges des stores. Couleurs : jetons du site seulement. */
.learn-grid--after { grid-template-columns: minmax(0, 1fr); }
.learn-grid--after > .learn-aside { position: static; max-width: 760px; margin-top: 48px; }
table.compare.jh-table, table.compare.tt-table { min-width: 0; font-size: 14.5px; }
table.compare.jh-table th, table.compare.jh-table td, table.compare.tt-table th, table.compare.tt-table td { padding: 10px 12px; }
table.compare.jh-table tbody th, table.compare.tt-table tbody th { white-space: normal; }
/* En-têtes en majuscules : un mot composé allemand (BESTEHENSGRENZE) se coupe au lieu d'élargir le tableau (audit du 19/11). */
table.compare.jh-table thead th, table.compare.gb-t thead th { hyphens: auto; }
table.compare.jh-table tbody th a { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
table.compare.jh-table td a, table.compare.tt-table td a { color: var(--coral-text); text-underline-offset: 3px; }
table.compare.jh-levels td:nth-child(2), table.compare.jh-levels td:nth-child(3) { white-space: nowrap; }
.jh-parts .jh-ja { display: block; font: 700 15.5px/1.4 var(--jp); color: var(--ink); }
.jh-parts .jh-name { display: block; margin-top: 2px; font: 600 13px/1.4 var(--round); color: var(--ink-3); }
.jh-parts td { white-space: nowrap; }
.jh-parts td.jh-none { color: var(--ink-3); }
.jh-parts tr.jh-total > * { font-weight: 800; }
.jh-n1 { margin: 14px 0 0; color: var(--ink-2); }
.jh-h3 { margin: 28px 0 0; font: 900 19px/1.3 var(--round); }
.jh-scores { display: grid; gap: 10px; margin: 12px 0 0; padding-left: 20px; line-height: 1.55; }
.jh-scores span[lang="ja"] { font-family: var(--jp); font-weight: 700; }
.tt-table .tt-ja { display: block; font: 700 18px/1.35 var(--jp); color: var(--ink); }
.tt-table .tt-tr { display: block; margin-top: 2px; font: 700 13.5px/1.35 var(--round); color: var(--coral-text); }
.tt-table tbody th a { text-decoration: none; }
@media (min-width: 721px) { table.compare.tt-table th:first-child { width: 10.5em; } }
.tt-table td.tt-lv { white-space: nowrap; color: var(--ink-2); }
.gs-lv { margin: 22px 0 0; font: 900 17px/1.3 var(--round); color: var(--ink-2); }
.gs-list { display: grid; gap: 0; margin: 10px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.gs-list li { display: grid; grid-template-columns: minmax(7.5em, auto) minmax(0, 1fr); gap: 4px 16px; padding: 10px 0; border-bottom: 1px solid var(--line); line-height: 1.5; }
.gs-list .gs-p { font: 700 18px/1.4 var(--jp); color: var(--coral-text); text-decoration: none; }
@media (hover: hover) { .gs-list .gs-p:hover { text-decoration: underline; text-underline-offset: 3px; } }
.gs-list .gs-e { color: var(--ink-2); }
.vc-start { margin-top: 6px; }
.app-card .app-card__web { display: inline-flex; margin-top: 4px; }
@media (max-width: 720px) {
  table.compare.jh-table td::before, table.compare.tt-table td::before { width: 7.5em; }
  .gs-list li { grid-template-columns: minmax(0, 1fr); }
}
/* Lot P0-5, listes du JLPT : les mots d'exemple des kanji N5 (furigana, sens, lien vers leur ligne, pastille N4), les
   étiquettes « On » et « Kun » au téléphone, la barre des autres listes qui passe à la ligne, l'encadré des salutations. */
table.kt td.kt-w { font: inherit; }
.kt-w .kt-wd { display: inline-flex; flex-direction: column; align-items: flex-start; vertical-align: top; margin: 0 14px 8px 0; color: var(--ink); text-decoration: none; }
.kt-wd .kt-wj { font: 600 18px/1.3 var(--jp); }
.kt-wd .kt-wj rt { font-size: 11px; font-weight: 500; color: var(--ink-3); }
.kt-wd .kt-wm { font: 600 13px/1.35 var(--round); color: var(--ink-2); max-width: 12em; }
.kt-wd .badge.lvl { height: 20px; margin-top: 3px; padding: 0 8px; font-size: 11.5px; }
@media (hover: hover) { .kt-w .kt-wd:hover .kt-wj { color: var(--coral-text); text-decoration: underline; text-underline-offset: 3px; } }
.kt-guide { margin: 6px 0 0; }
.greet-box { padding: 20px 22px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); }
.greet-box .section-title { font-size: 21px; }
.greet-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 18px; margin: 14px 0 6px; padding: 0; list-style: none; }
.greet-list li { display: grid; gap: 2px; }
.greet-list a { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.greet-list .gr-ja { font: 700 19px/1.3 var(--jp); }
@media (hover: hover) { .greet-list a:hover .gr-ja { color: var(--coral-text); text-decoration: underline; text-underline-offset: 3px; } }
.greet-list .gr-m { color: var(--ink-2); font-size: 14.5px; }
@media (max-width: 640px) {
  .vs-lists { flex-wrap: wrap; overflow-x: visible; white-space: normal; }
  table.kt :is(.kt-on, .kt-kun)::before { content: attr(data-label); display: inline-block; min-width: 2.6em; margin-right: 6px; font: 800 11.5px/1.9 var(--round); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
  .kt-w .kt-wd { margin-right: 12px; }
  table.kt td.kt-w { margin-top: 8px; }
  .greet-box { padding: 16px; }
}
/* Une étape de guide avec deux liens (hiragana et katakana, P0-6) : côte à côte, espacés. */
.topic-step .link + .link { margin-left: 20px; }
/* === fin b16-p045 === */

/* === b20-p1c === */
/* Lien d'évitement de l'en-tête (assets/chrome.js, revue du 17/11, P1-14) : au-dessus de l'écran, visible au clavier. */
.skip { position: absolute; left: 12px; top: 10px; z-index: 30; padding: 8px 14px; border-radius: 10px; background: var(--surface); color: var(--ink); font-weight: 800; text-decoration: none; box-shadow: 0 0 0 2px var(--coral-text); transform: translateY(-200%); }
.skip:focus { transform: none; }
/* Cibles d'au moins 24 px de haut (WCAG 2.5.8) sans rien déplacer : la marge intérieure verticale d'un lien en ligne
   agrandit la zone touchée, pas la ligne. */
a.src { padding-block: 3px; }
.ab-a { padding-block: 2px; }
/* === fin b20-p1c === */

/* === b21-p1d === */
/* Revue du 17/11/2026, P1-11. Comparatif : la réponse courte sous l'introduction, un profil par carte (qui tu es, en
   gris ; les apps, en gras, chacune vers sa fiche « App par app »), deux colonnes sur grand écran. Alphabet : les puces
   (.vc-toc, comme sur les thèmes) entre le premier paragraphe et le schéma. */
.sa-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.sa-list li { padding: 10px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); }
.sa-who { display: block; color: var(--ink-2); font: 700 15px/1.35 var(--round); }
.sa-apps { display: block; margin-top: 2px; font: 800 17px/1.4 var(--round); }
.sa-apps a { color: var(--coral-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.short-answer .cover-note a { color: var(--coral-text); font-weight: 700; }
@media (min-width: 721px) { .sa-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kana-toc { margin: 4px 0 20px; }
/* P1-7. Blanc sur --coral = 3,42:1 (en sombre, --on-coral sur --coral = 7,8:1). On garde la couleur : le libellé du
   bouton principal reste donc un « grand texte » WCAG (gras de 18,66 px et plus), 19 px partout comme .btn, y compris
   au téléphone, où .read-cta (« Lire dans le lecteur interactif ») et .kp-actions (« Retourner ») le passaient à 17 px.
   Le bouton « Furigana » des tests de lecture, allumé : le texte des bascules allumées (--coral-soft-ink, comme .toggle
   et .kp-row) au lieu de --coral-text sur --coral-soft (4,3:1 à 14 px). */
.btn.solid:not(.small) { font-size: 19px; }
.rt-fu[aria-pressed="true"] { color: var(--coral-soft-ink); }
/* Format de l'épreuve (guides JLPT) : sur les lignes de lecture, teintées de cyan, le nom de la partie en --ink-2
   (--ink-3 y tombait à 4,45:1 en sombre). */
.xf-table tr.is-reading .xf-name { color: var(--ink-2); }
/* === fin b21-p1d === */

/* === b19-p1b === */
/* Page d'une histoire (P1-13) : « Trop difficile ? » sous la fiche de faits (N3, N2) ; volet rōmaji sous chaque
   paragraphe (N5), fermé, au style des volets des tests de lecture. */
.story-easier { max-width: 46em; margin: 6px 0 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.story-easier a { color: var(--coral-text); font-weight: 700; }
.para-ro { margin: 6px 0 0; }
.para-ro > summary { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; list-style: none; font: 800 15px/1.3 var(--round); color: var(--coral-text); }
.para-ro > summary::-webkit-details-marker { display: none; }
.para-ro > summary::before { content: ''; flex: none; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.para-ro[open] > summary::before { transform: rotate(45deg); }
.para-ro > p { margin: 0 0 4px; font-size: 16px; line-height: 1.6; color: var(--ink-2); }
/* Guide de lecture de la page Histoires (P1-3) : sous-titres, paragraphes, les quatre règles du tadoku, le tableau
   par niveau (une fiche par niveau au téléphone, comme les autres tableaux .compare). */
.read-guide { max-width: 46em; }
.read-guide > p { margin: 10px 0 0; color: var(--ink-2); font-size: 17px; line-height: 1.6; }
.read-guide-h { margin: 28px 0 0; font: 800 19px/1.3 var(--round); color: var(--ink); }
.read-rules { margin: 10px 0 0; padding-left: 1.4em; color: var(--ink-2); font-size: 17px; line-height: 1.6; }
.read-rules li + li { margin-top: 6px; }
.read-guide a { color: var(--coral-text); text-underline-offset: 3px; }
.read-guide .table-scroll { margin-top: 12px; }
table.compare.read-levels { min-width: 0; }
/* Tableau des livres du guide « livres pour débutants » (P1-1) : titre japonais, nom latin et auteur l'un sous
   l'autre ; étiquettes gratuit / payant, furigana, audio ; date du relevé. Une fiche par livre au téléphone : la
   largeur minimale ne vaut que pour l'ordinateur (déclarée après le bloc mobile de table.compare, elle l'emportait :
   702 px de large pour un écran de 375, audit du 19/11/2026, #4). */
@media (min-width: 721px) { table.compare.books { min-width: 680px; } }
table.compare.books tbody th { white-space: normal; min-width: 11em; }
.bk-ja { display: block; }
.bk-name, .bk-by { display: block; margin-top: 2px; font-size: 13.5px; font-weight: 600; line-height: 1.4; color: var(--ink-3); }
.bk-name { color: var(--ink-2); }
.bk-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.bk-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font: 700 12px/1.4 var(--round); white-space: nowrap; }
.bk-checked { margin: 12px 0 0; color: var(--ink-3); font-size: 14px; line-height: 1.5; }
/* === fin b19-p1b === */

/* === b18-p1a === */
/* Revue du 17/11/2026, lots P1-2, P1-4, P1-5, P1-15 (refonte/REVUE_2026-11-17.md). */
/* P1-5 : formes des verbes sous le sens (ます, ない, て, た, 可能), une étiquette discrète devant chacune ; une forme ne
   se coupe jamais, la ligne passe entre deux. */
.vt-cj { display: block; margin-top: 6px; font: 500 15px/1.9 var(--jp); color: var(--ink-2); }
.vt-cj .cj { display: inline-block; white-space: nowrap; margin-right: 10px; }
.vt-cj .cj-l { display: inline-block; margin-right: 4px; padding: 0 5px; border-radius: 6px; background: var(--surface-2); color: var(--ink-3); font: 700 11.5px/1.6 var(--jp); vertical-align: 1px; }
.vt-cj rt { font-size: 9.5px; color: var(--ink-3); }
/* Paires transitif / intransitif : le verbe, sa pastille de niveau s'il vient d'une autre liste, son sens dessous. */
table.vp td { vertical-align: top; }
table.vp td [lang="ja"] { font: 500 19px/1.6 var(--jp); }
table.vp .vp-c { display: block; }
table.vp .vp-m { display: block; font-size: 14.5px; color: var(--ink-2); }
table.vp .badge { margin-left: 6px; vertical-align: 2px; }
/* P1-2 : guide des suffixes. Le sommaire en puces sous la réponse ; le keigo : le sens du verbe sous lui, les points de
   la liste N4 en liens. Au téléphone, le tableau des suffixes au premier écran : la ligne décorative さん・くん・ちゃん・さま
   tient sur une ligne, la réponse en graisse normale. */
.g-toc { margin-top: 14px; }
table.kg-t, table.gb-t, table.vp { min-width: 0; }
table.kg-t tbody [lang="ja"], table.gb-t tbody [lang="ja"] { font: 500 18px/1.7 var(--jp); white-space: nowrap; }
table.gb-t tbody th, table.kg-t tbody th { font-weight: 500; }
table.kg-t tbody th { white-space: normal; }   /* le sens long ne force plus la 1re colonne (audit du 19/11) */
table.kg-t .kg-m { display: block; font: 600 13.5px/1.35 var(--round); color: var(--ink-3); }
table.kg-t caption { caption-side: top; text-align: left; padding: 0 0 8px; font: 700 14.5px/1.4 var(--round); color: var(--ink-2); }
.kg-n4 { font-size: 15.5px; line-height: 1.9; }
.kg-n4 a { white-space: nowrap; font-family: var(--jp); }
@media (max-width: 720px) {
  .guide-head .word-card { margin: 2px 0 6px; }
  .guide-head ~ #forms { margin-top: 18px; }
  .guide-head .word-card .wj { font-size: 24px; }
  .guide-head .word-card .wr { font-size: 15px; }
  .guide-head .answer { font: var(--w-body) 16px/1.5 var(--round); }
  .guide-head .page-title { font-size: 28px; }
}
/* P1-4 : la grammaire de base de /grammar, un point après l'autre, ses tableaux de formes (avec furigana) qui défilent
   au téléphone, ses liens sur une ligne. */
.gb-p { margin-top: 28px; }
.gb-p h3 { margin: 0 0 8px; font: 800 20px/1.35 var(--round); }
.gb-p .examples { margin-top: 10px; }
table.gb-t caption { caption-side: top; text-align: left; padding: 0 0 8px; font: 700 14.5px/1.4 var(--round); color: var(--ink-2); }
.gb-more { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 10px 0 0; }
/* P1-15 : la première histoire en hiragana de /hiragana, une phrase par ligne, sa traduction dessous. */
.hf-text { margin-top: 12px; padding: 16px 18px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface); }
.hf-ja { margin: 0; font: 500 21px/1.7 var(--jp); color: var(--ink); }
.hf-w { white-space: nowrap; }
.hf-text .tl { margin: 0 0 10px; font-size: 14.5px; color: var(--ink-2); }
.hf-text .tl:last-child { margin-bottom: 0; }
.hf-more { margin: 12px 0 0; }
/* === fin b18-p1a === */

/* === b22-restes === */
/* Revue du 17/11/2026, P1-15 (restes). Accueil au téléphone : le bouton principal seul sur sa ligne, de toute la
   largeur, dans les 7 langues (en portugais et en allemand, son libellé court le laissait partager la ligne avec le
   premier badge, à 198 px) ; les badges des stores en dessous. */
@media (max-width: 720px) {
  .hero .actions .btn { flex-basis: 100%; }
  /* Les pilules des niveaux de « Commence par une histoire » : deux par ligne, de même largeur, comme sur la page
     Histoires (bloc b2-histoires) ; quatre côte à côte n'entrent pas sous 460 px, et N2 restait seul sur sa ligne. */
  #sampleLevels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #sampleLevels .pill { justify-content: center; }
}
@media (min-width: 460px) and (max-width: 720px) { #sampleLevels { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* === fin b22-restes === */

/* === b24-illus === */
/* Illustrations des 50 histoires gratuites (b24, 18/11/2026) : un carré peint par histoire (img/stories/, 240 et
   480 px ; assets/illus.js). L'image est un repère, pas un décor : petite, à côté du titre, jamais devant le texte
   japonais. Son cadre noir aux coins arrondis est dans l'image, les coins sont transparents : ni bordure, ni fond, ni
   arrondi ici, et rien de clair autour en thème sombre. Les cartes Premium illustrées (b34) ont la même vignette. */

/* Cartes (assets/cards.js, thumbHTML) : la vignette à gauche du titre, 72 px, centrée sur la hauteur de la carte. */
.story-card.has-thumb { gap: 14px; padding-left: 12px; }
.story-card > .thumb { flex: none; display: block; width: 72px; height: 72px; }
/* Tableau de bord, en attendant le catalogue : la place de la vignette (assets/today.js, squelette). */
.story-card > .sk-thumb { border-radius: 8px; background: var(--line); }

/* Histoire suivante (fin d'une histoire, page Histoires) : la vignette, 96 px, à gauche de tout le texte. */
.next-card:has(> .nc-thumb) { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 18px; align-items: start; }
.next-card > .nc-thumb { grid-column: 1; grid-row: 1 / span 4; width: 96px; height: 96px; margin-top: 6px; }
.next-card:has(> .nc-thumb) > :not(.nc-thumb) { grid-column: 2; }

/* Page Histoires : l'histoire à lire tout de suite (tools/seo/stories.mjs) a sa vignette à droite de son titre, sur
   ordinateur seulement ; au téléphone, le texte japonais passe d'abord (cachée, elle n'est pas chargée : lazy). */
.try-head > .try-thumb { display: none; }
@media (min-width: 721px) {
  .try-head:has(> .try-thumb) { display: grid; grid-template-columns: minmax(0, 1fr) 96px; column-gap: 24px; align-items: start; }
  .try-head:has(> .try-thumb) > :not(.try-thumb) { grid-column: 1; }
  .try-head > .try-thumb { display: block; grid-column: 2; grid-row: 1 / span 2; width: 96px; height: 96px; }
}

/* « Lire ensuite » de /progres (assets/progress-page.js) : 88 px, avant le titre ; sa place gardée pendant le
   chargement (squelette). */
.prog-next-card > .nc-thumb { flex: none; display: block; width: 88px; height: 88px; }
.prog-next-card > .sk-thumb { border-radius: 8px; background: var(--line); }

/* Page d'une histoire (tools/seo/pages.mjs ; chargée tout de suite, fetchpriority="high"). Sur ordinateur, une colonne
   de 160 px à droite du titre, du niveau et du résumé : rien ne descend, la fiche de faits suit. Au téléphone, 88 px qui
   flottent à droite sous le titre, qui garde toute sa largeur (un titre japonais coupé au milieu se lit mal) ; le
   niveau et le résumé passent à côté. La première ligne du texte japonais reste au premier écran (1440 × 900 comme
   375 × 812). */
.story-v2 .story-head .story-illus { float: right; width: 88px; margin: 12px 0 6px 16px; }
.story-v2 .story-head .story-illus img { display: block; width: 88px; height: 88px; }
.story-v2 .story-head .story-facts { clear: both; }
@media (min-width: 721px) {
  .story-v2 .story-head:has(> .story-illus) { display: grid; grid-template-columns: minmax(0, 1fr) 160px; column-gap: 32px; align-items: start; }
  .story-v2 .story-head:has(> .story-illus) > * { grid-column: 1 / -1; }
  .story-v2 .story-head:has(> .story-illus) > :is(h1, .meta, .sum) { grid-column: 1; }
  .story-v2 .story-head .story-illus { grid-column: 2; grid-row: 1 / span 3; width: 160px; margin: 6px 0 0; }
  .story-v2 .story-head .story-illus img { width: 160px; height: 160px; }
}

@media (max-width: 720px) {
  .story-card > .thumb { width: 64px; height: 64px; }
  .story-card > .sk-thumb { width: 64px; height: 64px; }
  /* Téléphone : la vignette (64 px, la hauteur du titre et de sa traduction) à côté du titre seulement ; le résumé et
     la ligne du niveau reprennent toute la largeur. */
  .next-card:has(> .nc-thumb) { grid-template-columns: 64px minmax(0, 1fr); column-gap: 14px; }
  .next-card > .nc-thumb { grid-row: 1 / span 2; width: 64px; height: 64px; margin-top: 4px; }
  .next-card:has(> .nc-thumb) > :is(.sum, .meta) { grid-column: 1 / -1; }
  .prog-next-card:has(> .nc-thumb) { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; align-items: center; }
  .prog-next-card:has(> .nc-thumb) > .btn { grid-column: 1 / -1; }
  .prog-next-card > .nc-thumb { width: 72px; height: 72px; }
}
/* === fin b24-illus === */

/* === b34-illus-premium === */
/* Illustrations des histoires Premium (b34, 19/11/2026 ; tools/art/story_images.py, assets/illus.js) : les cartes ont
   déjà leur vignette par le bloc b24-illus (le cadenas reste dans la ligne du niveau). L'aperçu d'une Premium
   (tools/seo/pages.mjs, previewPage : l'ancien gabarit, sans .story-v2) met son image à la même place que la page d'une
   gratuite : au téléphone, 88 px qui flottent à droite sous le titre, le niveau, les points de grammaire et le résumé à
   côté, le bouton dessous ; sur ordinateur, une colonne de 160 px à droite du titre, du niveau, de la grammaire et du
   résumé. Même image que sur les cartes, coins transparents : ni bordure, ni fond, ni arrondi ici. */
.story-page:not(.story-v2) .story-head .story-illus { float: right; width: 88px; margin: 12px 0 6px 16px; }
.story-page:not(.story-v2) .story-head .story-illus img { display: block; width: 88px; height: 88px; }
.story-page:not(.story-v2) .story-head .read-cta { clear: both; }
@media (min-width: 721px) {
  .story-page:not(.story-v2) .story-head:has(> .story-illus) { display: grid; grid-template-columns: minmax(0, 1fr) 160px; column-gap: 32px; align-items: start; }
  .story-page:not(.story-v2) .story-head:has(> .story-illus) > * { grid-column: 1 / -1; }
  .story-page:not(.story-v2) .story-head:has(> .story-illus) > :is(h1, .meta, .focus, .sum) { grid-column: 1; }
  .story-page:not(.story-v2) .story-head .story-illus { grid-column: 2; grid-row: 1 / span 4; width: 160px; margin: 6px 0 0; }
  .story-page:not(.story-v2) .story-head .story-illus img { width: 160px; height: 160px; }
}
/* === fin b34-illus-premium === */

/* === b25-bf === */
/* Black Friday 2026 (assets/promo.js) : ses éléments sont écrits dans les pages, cachés (.promo-on) ; pendant la
   période, assets/boot.js pose <html data-promo> avant le premier rendu : ils paraissent et les prix normaux qu'ils
   remplacent (.promo-off) disparaissent, sans rien déplacer après coup. Tout porte data-offer : rien dans l'app Android
   (bloc du mode app, plus haut). Bannière fermée pour la session : data-promo-closed. */
:root:not([data-promo]) .promo-on { display: none !important; }
:root[data-promo] .promo-off { display: none !important; }
:root[data-promo-closed] .promo-bar { display: none !important; }

/* Bannière : une ligne fine au-dessus de l'en-tête, qui défile avec la page (l'en-tête reste collé). Au-dessus de
   l'en-tête (z-index) : le lien d'évitement caché de l'en-tête (.skip, remonté de 200 %) ne déborde pas sur elle. */
.promo-bar { position: relative; z-index: 21; background: var(--surface-2); border-bottom: 1px solid var(--line); color: var(--ink); }
.promo-bar .wrap { display: flex; align-items: center; gap: 8px; min-height: 40px; padding-top: 4px; padding-bottom: 4px; }
.promo-bar a { flex: 1; min-width: 0; padding-left: 40px; text-align: center; font: 700 14px/1.45 var(--round); color: var(--ink-2); text-decoration: none; }
.promo-bar a b { font-weight: 900; color: var(--ink); }
.promo-bar a span { color: var(--coral-text); }
@media (hover: hover) { .promo-bar a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; } }
.promo-bar a:focus-visible, .promo-x:focus-visible { outline: 3px solid var(--coral-text); outline-offset: 2px; border-radius: 8px; }
.promo-x {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-3); cursor: pointer;
}
@media (hover: hover) { .promo-x:hover { background: var(--hover); color: var(--ink); } }
@media (max-width: 720px) {
  .promo-bar .wrap { padding-left: 16px; padding-right: 8px; }
  .promo-bar a { padding-left: 0; text-align: left; font-size: 13.5px; }
}

/* Prix de l'offre : le prix normal barré, au-dessus ; le prix le plus bas des 30 derniers jours (Omnibus) en petit. */
.pm-was, .plan-was { font: 700 14px/1.3 var(--round); color: var(--ink-3); text-decoration-thickness: 1.5px; }
.pm-ref { margin-top: 6px; font: 700 12.5px/1.4 var(--round); color: var(--ink-3); }
.pm-plan.is-best .pm-ref, .pm-plan.is-best .pm-was { color: var(--coral-soft-ink); }
.plan-ref { font: 700 13px/1.45 var(--round); color: var(--ink-3); }
@media (max-width: 720px) {
  .pm-was { order: 0; }
  .pm-ref { flex-basis: 100%; margin-top: 2px; }
}
/* === fin b25-bf === */
