/* ============================================================
   Le cahier de casse-tête — odile.cloud
   S'appuie sur styles.css (couleurs, .sk-grille, .sk-touches, .btn).
   ============================================================ */
.ch-plateau { padding: 16px 32px 64px; }
.ch-plateau { overflow-x: clip; }
.ch-plateau .section-inner { max-width: 600px; }

/* Le cahier : une feuille à grands carreaux, reliée à gauche */
.ch-cahier { position: relative; perspective: 1800px; perspective-origin: 30% 40%; }
.ch-feuille {
  --bg: #F6F1E4; --paper: #FFFDF6; --ink: #2A2233; --ink-soft: #675D72; --line: #D6CDBD;
  --teal: #2B7556; --gold: #B0621A; --calm: #B4432B; --music: #A84C83; --tarot: #6F4FA3;
  --carreau: rgba(96,108,190,.11); --ligne: rgba(96,108,190,.27); --marge: rgba(203,62,62,.5);
  position: relative; color: var(--ink);
  padding: 20px 16px 14px 52px; border-radius: 2px 7px 7px 2px;
  background-color: var(--bg);
  background-image:
    linear-gradient(90deg, transparent 39px, var(--marge) 39px, var(--marge) 40px, transparent 40px),
    linear-gradient(var(--ligne) 1px, transparent 1px),
    linear-gradient(90deg, var(--ligne) 1px, transparent 1px),
    linear-gradient(var(--carreau) 1px, transparent 1px);
  background-size: 100% 100%, 100% 28px, 28px 100%, 100% 7px;
  background-position: 0 0, 0 13px, 12px 0, 0 13px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.25), 3px 3px 0 -1px #E9E2D2, 3px 3px 0 0 rgba(0,0,0,.3), 6px 6px 0 -1px #DDD5C3, 6px 6px 0 0 rgba(0,0,0,.3), 0 18px 40px rgba(0,0,0,.45);
}
/* Spirale : un trou et un anneau tous les 28 px */
.ch-feuille::before {
  content: ""; position: absolute; left: -9px; top: 10px; bottom: 10px; width: 30px; pointer-events: none;
  background:
    linear-gradient(180deg, transparent 10px, #D9D4E0 10px, #8A8496 14px, #5F596B 15px, transparent 15px) 0 0 / 21px 28px repeat-y,
    radial-gradient(circle at 21px 13px, #17111F 5px, rgba(0,0,0,.25) 5.5px, transparent 6.5px) 0 0 / 30px 28px repeat-y;
}
.ch-page { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.ch-contenu { position: relative; display: flex; flex-direction: column; gap: 12px; transform-origin: top center; }
.ch-titre { font-family: 'Caveat', 'Newsreader', cursive; font-weight: 500; font-size: 34px; line-height: 1; color: var(--ink); align-self: flex-start;
  text-decoration: underline; text-decoration-color: var(--marge); text-decoration-thickness: 2px; text-underline-offset: 6px; padding-bottom: 6px; }
.ch-folio { flex: none; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 10px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 12.5px; }
.ch-folio a { color: var(--ink); text-decoration: none; padding: 4px 0; }
.ch-folio a:hover { text-decoration: underline; }
.ch-folio .ch-inactif { color: var(--ink-soft); }
.ch-numero { font-family: 'Caveat', cursive; font-size: 20px; color: var(--ink-soft); }
/* La feuille qui tourne */
.ch-dessous { position: absolute; inset: 0; z-index: 1; }
.ch-volante { position: absolute; inset: 0; z-index: 2; transform-style: preserve-3d; transform-origin: -4px 50%; pointer-events: none; }
.ch-volante > .ch-feuille { height: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.ch-dos { position: absolute; inset: 0; transform: rotateY(180deg); backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: #EFE9DA linear-gradient(270deg, rgba(0,0,0,.14), transparent 30%); border-radius: 7px 2px 2px 7px; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.ch-part { animation: chPart .75s cubic-bezier(.45,.05,.4,1) forwards; }
.ch-revient { animation: chPart .75s cubic-bezier(.45,.05,.4,1) reverse forwards; }
@keyframes chPart {
  0% { transform: rotateY(0); }
  100% { transform: rotateY(-178deg); }
}
/* Sur papier : retouches des pièces reprises du site */
.ch-feuille .sk-lie { background: rgba(71,50,77,.07); }
.ch-feuille .btn-primary { border: none; }
.ch-feuille .sk-touches button.sk-epuise { background: transparent; }

#cahier button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
#cahier button:focus-visible, #cahier a:focus-visible, #cahier summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Liste des jeux : dense, une ligne par jeu */
.ch-jours { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--ink-soft); }
.ch-jours a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--line); }
.ch-jours a:hover { color: var(--ink); }
.ch-inactif { opacity: .35; }
.ch-liste { display: flex; flex-direction: column; }
.ch-ligne {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "nom niv page" "desc desc desc" "etat etat etat";
  column-gap: 12px; row-gap: 2px; align-items: baseline;
  padding: 9px 2px; text-decoration: none; border-bottom: 1px dashed var(--line);
  transition: background .12s ease;
}
.ch-ligne:last-child { border-bottom: none; }
.ch-ligne:hover { background: rgba(176,98,26,.09); }
.ch-l-page { grid-area: page; font-family: 'Caveat', cursive; font-size: 19px; color: var(--ink-soft); }
.ch-l-nom { grid-area: nom; font-family: 'Caveat', 'Newsreader', cursive; font-size: 26px; line-height: 1.1; color: var(--ink); }
.ch-l-genre { display: none; }
.ch-l-desc { grid-area: desc; font-size: 13px; color: var(--ink-soft); line-height: 1.35; }
.ch-l-etat { grid-area: etat; font-size: 11.5px; color: var(--teal); font-variant-numeric: tabular-nums; }
.ch-l-etat:empty { display: none; }
.ch-ligne .ch-niv { grid-area: niv; justify-self: end; }
.ch-faite .ch-l-nom { color: var(--ink-soft); }
.ch-niv { display: inline-flex; gap: 3px; align-items: center; }
.ch-niv i { width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--gold); }
.ch-niv i.on { background: var(--gold); }
.ch-note { font-size: 12.5px; }

/* Cadre d'un jeu */
.ch-fil { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.ch-fil a { color: var(--ink-soft); text-decoration: none; }
.ch-fil a:hover { color: var(--ink); }
.ch-zone { display: flex; flex-direction: column; gap: 16px; }
.ch-zone .sk-grille, .ch-zone .sk-touches { margin-top: 0; }
.ch-msg { min-height: 1.5em; font-size: 14px; color: var(--ink-soft); }
.ch-msg.ch-ko { color: var(--calm); }
.ch-msg.ch-ok { color: var(--teal); }
.ch-pied, .ch-outils { display: flex; gap: 8px; flex-wrap: wrap; }
.ch-outil, .ch-zone .ch-outil {
  all: unset; box-sizing: border-box; cursor: pointer; padding: 9px 13px;
  border: 1px solid var(--line); border-radius: 2px; font-size: 12.5px; color: var(--ink-soft);
}
.ch-outil:hover { border-color: var(--ink-soft); color: var(--ink); }
.ch-outil[disabled] { opacity: .35; cursor: default; }
.ch-copie { width: 100%; margin-top: 8px; background: var(--bg); color: var(--ink); border: 1px solid var(--line); font-size: 12px; }
.ch-regle { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.ch-regle p { font-size: 13.5px; }
.ch-regle strong { color: var(--ink); }
.ch-victoire { background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--teal); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.ch-victoire[hidden] { display: none; }
.ch-v-titre { font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--teal); }
.ch-v-score { font-family: 'Newsreader', serif; font-style: italic; font-size: 19px; color: var(--ink); margin-bottom: 6px; }
.ch-pave.sk-touches { grid-template-columns: repeat(5, 1fr); }

/* Cases génériques (Balance, Duo) */
.ch-b-case {
  all: unset; box-sizing: border-box; cursor: pointer; aspect-ratio: 1; width: 100%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 2px; background: var(--paper);
  font-family: 'Newsreader', serif; font-size: clamp(22px, 6vw, 30px); color: var(--teal);
}
.ch-b-case.ch-fixe { color: var(--ink); font-weight: 600; cursor: default; }
.ch-b-case.ch-sel { background: rgba(232,166,98,.3); box-shadow: inset 0 0 0 2px var(--gold); }
.ch-b-grille { display: grid; grid-template-columns: 1fr .5fr 1fr .5fr 1fr .5fr 1fr; gap: 6px; align-items: center; max-width: 400px; width: 100%; margin: 0 auto; }
.ch-b-op { text-align: center; font-size: 19px; color: var(--ink-soft); line-height: 1; }
.ch-b-res { text-align: center; font-family: 'Newsreader', serif; font-size: clamp(20px, 5.4vw, 26px); color: var(--gold); font-variant-numeric: tabular-nums; }
.ch-b-res.ch-ok { color: var(--teal); }
.ch-b-res.ch-ko { color: var(--calm); text-decoration: underline wavy; text-underline-offset: 4px; }

/* Passerelle */
.ch-p-chaine { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.ch-p-mot { display: grid; grid-template-columns: repeat(4, 46px) 86px; gap: 5px; align-items: center; }
.ch-p-l {
  all: unset; box-sizing: border-box; height: 46px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 2px; background: var(--paper);
  font-size: 20px; font-weight: 600; color: var(--ink-soft);
}
.ch-actif .ch-p-l { cursor: pointer; color: var(--ink); border-color: var(--ink-soft); }
.ch-p-l.ch-bon { color: var(--teal); }
.ch-p-l.ch-sel { background: rgba(232,166,98,.3); box-shadow: inset 0 0 0 2px var(--gold); }
.ch-cible .ch-p-l { border-style: dashed; background: transparent; }
.ch-p-lg { font-size: 10.5px; letter-spacing: .08em; color: var(--ink-soft); padding-left: 6px; }
.ch-p-trou { color: var(--ink-soft); line-height: 1; }
.ch-az { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; }
.ch-az button {
  all: unset; box-sizing: border-box; cursor: pointer; text-align: center; padding: 11px 0;
  border: 1px solid var(--line); border-radius: 2px; background: var(--paper);
  font-size: 15px; font-weight: 600; color: var(--ink);
}
.ch-az button:hover { border-color: var(--ink-soft); }
.ch-az button.ch-pris { color: var(--ink-soft); opacity: .45; }

/* Sudoku Mystère : marques de la règle cachée */
.ch-mystere .sk-grille { overflow: visible; }
.sk-case.ch-diag:not(.sk-sel):not(.sk-meme) { background: rgba(155,123,196,.17); }
.sk-case.ch-rond::before { content: ""; position: absolute; inset: 11%; border: 1.5px solid var(--ink-soft); border-radius: 50%; opacity: .7; pointer-events: none; }
.sk-case.ch-mk-d::after, .sk-case.ch-mk-b > .ch-m, .sk-case.ch-mk-b::before { pointer-events: none; }
.sk-case.ch-mk-d::after { content: ""; position: absolute; z-index: 6; right: -6px; top: 50%; transform: translateY(-50%); }
.sk-case.ch-mk-b::before { content: ""; position: absolute; z-index: 6; bottom: -6px; left: 50%; transform: translateX(-50%); }
.sk-case.ch-mk-suite.ch-mk-d::after, .sk-case.ch-mk-suite.ch-mk-b::before { width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 1.5px solid var(--ink); }
.sk-case.ch-mk-dix.ch-mk-d::after { width: 14px; height: 5px; background: var(--gold); border-radius: 2px; right: -8px; }
.sk-case.ch-mk-dix.ch-mk-b::before { width: 5px; height: 14px; background: var(--gold); border-radius: 2px; bottom: -8px; }

/* Duo */
.ch-d-role { font-size: 14.5px; }
.ch-d-role strong { color: var(--gold); }
.ch-d-indices { margin: 0; padding: 14px 18px 14px 36px; background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--gold); display: flex; flex-direction: column; gap: 6px; }
.ch-d-indices li { font-size: 15px; color: var(--ink); }
.ch-d-code { display: grid; grid-template-columns: repeat(4, 64px); gap: 8px; justify-content: center; }


/* Coffre */
.ch-c-texte { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.ch-c-mot { display: inline-flex; gap: 3px; align-items: flex-end; }
.ch-c-l {
  all: unset; box-sizing: border-box; cursor: pointer; width: 26px; display: flex; flex-direction: column; align-items: center;
  border-bottom: 2px solid var(--ink-soft); padding: 2px 0 1px; border-radius: 2px 2px 0 0;
}
.ch-c-l b { height: 26px; font-size: 19px; font-weight: 600; color: var(--teal); line-height: 26px; }
.ch-c-l i { font-style: normal; font-size: 10.5px; color: var(--ink-soft); letter-spacing: .04em; }
.ch-c-l.ch-fixe b { color: var(--ink); }
.ch-c-l.ch-sel { background: rgba(232,166,98,.3); border-bottom-color: var(--gold); }
.ch-c-p { font-size: 19px; color: var(--ink-soft); padding-bottom: 14px; }

/* Frise */
.ch-f-sens { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-soft); }
.ch-f-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ch-f-carte { display: flex; gap: 12px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 2px; padding: 8px 12px 8px 8px; }
.ch-f-fleches { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.ch-f-fleches button { all: unset; box-sizing: border-box; cursor: pointer; width: 40px; height: 30px; text-align: center; border: 1px solid var(--line); border-radius: 2px; color: var(--ink); font-size: 15px; }
.ch-f-fleches button:hover:not([disabled]) { border-color: var(--ink-soft); }
.ch-f-fleches button[disabled] { opacity: .25; cursor: default; }
.ch-f-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ch-f-txt strong { font-size: 14.5px; font-weight: 500; color: var(--ink); line-height: 1.35; }
.ch-f-txt span { font-size: 13px; color: var(--ink-soft); line-height: 1.45; }
.ch-f-an { flex: 0 0 86px; font-family: 'Newsreader', serif; font-style: italic; font-size: 17px; color: var(--gold); padding-left: 6px; font-variant-numeric: tabular-nums; }

/* Sentier */
.ch-s-grille { display: grid; gap: 4px; width: 100%; max-width: 440px; margin: 0 auto; touch-action: none; user-select: none; -webkit-user-select: none; }
.ch-s-case {
  all: unset; box-sizing: border-box; cursor: pointer; aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 2px; background: var(--paper);
  font-size: clamp(13px, 3.6vw, 17px); font-variant-numeric: tabular-nums; color: var(--teal);
}
.ch-s-case.ch-pris { background: rgba(127,175,149,.2); border-color: rgba(127,175,149,.45); }
.ch-s-case.ch-fixe { color: var(--ink); font-weight: 600; font-size: clamp(15px, 4.2vw, 20px); border-color: var(--ink-soft); }
.ch-s-case.ch-tete { background: rgba(232,166,98,.32); border-color: var(--gold); }

/* Grenier */
.ch-g-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 2px; background: var(--paper); }
.ch-g-objet { border-bottom: 1px solid var(--line); }
.ch-g-objet:last-child { border-bottom: none; }
.ch-g-objet summary, .ch-g-ferme, .ch-g-resolu { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 11px 14px; }
.ch-g-objet summary { cursor: pointer; list-style: none; }
.ch-g-objet summary::-webkit-details-marker { display: none; }
.ch-g-nom { font-family: 'Newsreader', serif; font-style: italic; font-size: 18px; color: var(--ink); }
.ch-g-etat { font-size: 11.5px; color: var(--gold); letter-spacing: .04em; }
.ch-g-resolu .ch-g-etat { color: var(--teal); }
.ch-g-ferme .ch-g-nom, .ch-g-ferme .ch-g-etat { color: var(--ink-soft); opacity: .55; }
.ch-g-corps { padding: 2px 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.ch-g-corps p { font-size: 14px; }
.ch-g-code { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 14px !important; color: var(--ink) !important; background: var(--bg); border: 1px solid var(--line); padding: 10px 12px; overflow-wrap: anywhere; }
.ch-g-miroir { transform: scaleX(-1); text-align: right; }
.ch-g-form { display: flex; gap: 8px; flex-wrap: wrap; }
.ch-g-form input { flex: 1 1 150px; min-width: 0; font-family: 'Inter', sans-serif; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 2px; background: var(--bg); color: var(--ink); text-transform: uppercase; }
.ch-g-form .btn { border: none; padding: 11px 20px; }

@media (max-width: 560px) {
  .ch-plateau { padding: 12px 12px 48px 18px; }
  .ch-feuille { padding: 16px 10px 12px 40px; background-position: -8px 0, 0 13px, 4px 0, 0 13px; }
  .ch-titre { font-size: 30px; }
  .ch-pave.sk-touches { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .ch-p-mot { grid-template-columns: repeat(4, 44px) 74px; }
}
@media (prefers-reduced-motion: reduce) { .ch-ligne { transition: none; } .ch-part, .ch-revient { animation: none; } }

/* ============ Une page, un écran : pas de défilement ============ */
body.ch-app { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
body.ch-app > footer { display: none; }
.ch-app .top-brand { flex: none; padding-top: 10px; padding-bottom: 6px; }
.ch-app .sk-entete { flex: none; padding-top: 8px; padding-bottom: 8px; }
.ch-liens { display: flex; gap: 6px 16px; flex-wrap: wrap; margin-top: 4px; font-size: 12.5px; }
.ch-liens a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--line); }
.ch-liens a:hover { color: var(--ink); }
.ch-app .ch-plateau { flex: 1 1 auto; min-height: 0; display: flex; padding-top: 10px; padding-bottom: 14px; }
.ch-app .ch-plateau > .section-inner { flex: 1 1 auto; min-height: 0; width: 100%; display: flex; flex-direction: column; }
.ch-app #cahier { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.ch-app .ch-cahier { flex: 1 1 auto; min-height: 0; display: flex; }
.ch-app .ch-feuille { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding-top: 14px; padding-bottom: 8px; }

/* En-tête de page de jeu */
.ch-fil-d { display: inline-flex; align-items: center; gap: 12px; }
.ch-lien-btn { all: unset; cursor: pointer; font-size: 13px; color: var(--ink); border-bottom: 1px solid var(--line); line-height: 1.3; }
.ch-lien-btn:hover { border-bottom-color: var(--ink); }

/* La règle s'ouvre par-dessus la page */
.ch-regle { display: none; }
.ch-montre-regle .ch-regle {
  display: flex; position: absolute; z-index: 8; left: 0; right: 0; top: 30px;
  background: var(--paper); border: 1px solid var(--ink-soft); border-radius: 2px; padding: 14px 16px;
  box-shadow: 0 10px 28px rgba(42,34,51,.25);
}
.ch-regle-x { align-self: flex-end; }
.ch-tiroir { display: flex; flex-direction: column; gap: 10px; }
.ch-tiroir p { font-size: 14px; }

/* Sudoku Mystère : erreurs visibles tout de suite */
.ch-feuille .sk-case.sk-faux { color: var(--calm); background: rgba(180,67,43,.14); }
.ch-feuille .sk-case.sk-faux.sk-sel { background: rgba(180,67,43,.24); }
.ch-compteur { display: flex; align-items: center; justify-content: center; text-align: center; font-size: 12px; font-weight: 500; color: var(--ink-soft); border: 1px dashed var(--line); border-radius: 2px; font-variant-numeric: tabular-nums; }
.ch-compteur.ch-ko { color: var(--calm); border-color: var(--calm); }

/* Le Coffre, façon roue de la fortune */
.ch-r-tableau {
  container-type: inline-size; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 12px;
  padding: 12px 8px; background: #1F5A47; border-radius: 3px;
  box-shadow: inset 0 0 0 3px #17463A, inset 0 0 0 5px #C9A54A;
}
.ch-r-mot { display: inline-flex; gap: 3px; align-items: stretch; }
.ch-r-case {
  --t: min(30px, calc(100cqw / var(--n) - 3px));
  width: var(--t); height: calc(var(--t) * 1.25); display: flex; align-items: center; justify-content: center;
  background: #FFFDF6; border-radius: 2px; box-shadow: 0 1px 0 rgba(0,0,0,.35);
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: calc(var(--t) * .7); color: #2A2233;
}
.ch-r-p { align-self: flex-end; color: #F6F1E4; font-weight: 700; font-size: 18px; line-height: 1; padding-bottom: 2px; }
.ch-r-case.ch-neuf { animation: chAllume .75s ease both; }
@keyframes chAllume {
  0%   { background: #FFE27A; color: transparent; transform: rotateX(0); box-shadow: 0 0 12px #FFD54A; }
  45%  { background: #FFE27A; color: transparent; transform: rotateX(90deg); }
  55%  { background: #FFFDF6; color: #2A2233; transform: rotateX(90deg); }
  100% { background: #FFFDF6; color: #2A2233; transform: rotateX(0); }
}
.ch-r-compte { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink-soft); }
.ch-r-compte i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--calm); }
.ch-r-compte i.on { background: var(--calm); }
.ch-r-reste { margin-left: 6px; }
.ch-r-clavier button.ch-oui { background: rgba(43,117,86,.16); color: var(--teal); border-color: rgba(43,117,86,.4); opacity: 1; }
.ch-r-clavier button.ch-non { color: var(--calm); text-decoration: line-through; opacity: .55; }
.ch-r-clavier button:disabled { cursor: default; }
.ch-r-clavier button { padding: 9px 0; }
.ch-r-solution input { text-transform: uppercase; }

@media (max-width: 560px) {
  .ch-app .top-brand { padding-top: 8px; padding-bottom: 4px; }
  .ch-app .ch-plateau { padding-top: 6px; padding-bottom: 8px; }
  .ch-app .ch-feuille { padding-top: 10px; }
}
@media (prefers-reduced-motion: reduce) { .ch-r-case.ch-neuf { animation: none; } }

/* Duo : où en est le coéquipier */
.ch-d-suivi { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; color: var(--ink-soft); }
.ch-d-suivi i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--line); transform: translateY(-1px); }
.ch-d-suivi.ch-encours i { background: var(--gold); }
.ch-d-suivi.ch-ok { color: var(--teal); }
.ch-d-suivi.ch-ok i { background: var(--teal); }

/* Pavés sur deux lignes : les chiffres, puis les actions */
.ch-pave.ch-pave9 { grid-template-columns: repeat(9, 1fr) !important; gap: 5px; }
.ch-pave9 .sk-chiffre { padding: 10px 0; }
.ch-pave9 > :nth-child(10), .ch-pave9 > :nth-child(11), .ch-pave9 > :nth-child(12) { grid-column: span 2; }
.ch-pave9 > :nth-child(13) { grid-column: span 3; }
.ch-pave.ch-pave6 { grid-template-columns: repeat(6, 1fr) !important; gap: 6px; }
.ch-pave6 > :nth-child(7), .ch-pave6 > :nth-child(8) { grid-column: span 3; }
.ch-pave .sk-action { padding: 10px 4px; }

/* Titre de page et date du jour */
.ch-titre-ligne { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ch-jour { font-family: 'Caveat', cursive; font-size: 19px; color: var(--ink-soft); }
.ch-jours .ch-jour { font-size: 18px; }

/* Mode serré : quand la page manque de hauteur, on retire le superflu */
.ch-serre { gap: 8px; }
.ch-serre .ch-l-desc, .ch-serre .ch-note { display: none; }
.ch-serre .ch-ligne { padding-top: 6px; padding-bottom: 6px; }
.ch-serre .ch-titre { font-size: 28px; padding-bottom: 2px; }

/* En-tête du site plus compact sur cette page */
.ch-app .sk-entete-ligne { align-items: baseline; }
@media (max-width: 560px), (max-height: 760px) {
  .ch-app #cahier-date { display: none; }
  .ch-app .sk-entete h1 { font-size: 22px; }
  .ch-app .ch-liens { margin-top: 2px; }
}
@media (max-height: 720px) {
  .ch-app .btc-ticker { display: none; }
  .ch-app .top-brand { padding-top: 6px; padding-bottom: 2px; }
}
