/* Recap · index · dialogue d'identité (code d'accès, carnet à spirale) */
  /* ---------- identity dialog : access code only — spiral-notebook card ---------- */
  /* first visit : the whole app stays invisible behind the dialog, then fades in once the code is right */
  html.id-wait body > :not(#setup-modal):not(.tz-overlay):not(script):not(style) { opacity: 0; pointer-events: none; }
  html.id-reveal body > :not(#setup-modal) { transition: opacity .6s ease; }
  /* behind the dialog : the same ruled paper as the app (no desk dots), so the home fades in seamlessly */
  html.id-wait body, html.id-reveal body { background-color: var(--paper);
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, var(--line) 31px, var(--line) 32px); background-size: auto; }
  .id-modal .lang-scrim { background: transparent; }
  .sp-card { position: relative; width: min(88vw, 340px); height: 420px; margin-top: 16px;
    animation: sp-in .85s cubic-bezier(.22, 1, .36, 1) both; }
  .id-modal.closing .sp-card { animation: sp-out .42s cubic-bezier(.4, 0, .6, 1) forwards; pointer-events: none; will-change: opacity, transform; }
  .id-modal.closing .sp-card * { animation: none; }
  /* entrance : the notebook is set down on the paper, then its parts appear one after another */
  @keyframes sp-in { from { opacity: 0; scale: .92; translate: 0 40px; rotate: -4deg; } 50% { opacity: 1; } }
  @keyframes sp-ring { from { opacity: 0; translate: 0 -18px; scale: .6; } }
  @keyframes sp-hole { from { opacity: 0; scale: .2; } }
  @keyframes sp-rise { from { opacity: 0; translate: 0 24px; } }
  @keyframes sp-tp { from { opacity: 0; translate: 0 -16px; scale: 1.35; } }
  @keyframes sp-write { from { opacity: 0; translate: 0 8px; filter: blur(4px); } }
  @keyframes sp-cell { from { opacity: 0; translate: 0 10px; } }
  @keyframes sp-pen { from { opacity: 0; translate: 70px 30px; } }
  .sp-rg { animation: sp-ring .55s cubic-bezier(.34, 1.56, .64, 1) calc(.35s + var(--i, 0) * 45ms) both; }
  .sp-hl { animation: sp-hole .4s ease calc(.5s + var(--i, 0) * 45ms) both; }
  .sp-lab { animation: sp-rise .65s cubic-bezier(.22, 1, .36, 1) .5s both; }
  .sp-tape { animation: sp-tp .45s cubic-bezier(.34, 1.4, .64, 1) 1.05s both; }
  .sp-ttl { animation: sp-write .6s ease .8s both; }
  .sp-cl { animation: sp-cell .45s cubic-bezier(.22, 1, .36, 1) calc(1s + var(--i, 0) * 70ms) both; }
  .sp-pcl { animation: sp-pen .8s cubic-bezier(.22, 1, .36, 1) 1.3s both; }
  @keyframes sp-out { to { opacity: 0; scale: .97; translate: 0 -8px; } }
  @keyframes sp-blink { 50% { opacity: 0; } }
  .id-card.shake { animation: id-shake .32s ease; }
  @keyframes id-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }
  .sp-cover { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 10px; transform-origin: top center;
    background: radial-gradient(rgba(255, 255, 255, .38) 1.2px, transparent 1.7px) 0 0 / 16px 16px, linear-gradient(160deg, #ff8a70, #e5533d);
    box-shadow: 0 16px 28px rgba(0, 0, 0, .38), inset 0 -6px 0 rgba(0, 0, 0, .12);
  }
  .sp-rows { position: absolute; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 14px; }
  .sp-rings { top: -13px; z-index: 8; pointer-events: none; }
  .sp-rg { width: 12px; height: 31px; border-radius: 7px; border: 3.5px solid #c9cedd; box-shadow: 0 3px 4px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .5);
    background: linear-gradient(90deg, rgba(255, 255, 255, .75), transparent 45%, rgba(0, 0, 0, .18)); }
  .sp-holes { top: 7px; }
  .sp-hl { width: 12px; height: 12px; border-radius: 50%; background: #2b130e; box-shadow: inset 0 2px 2px rgba(0, 0, 0, .6); }
  .sp-lab { position: relative; width: 82%; margin: 22px 0 0; padding: 22px 14px 12px; border-radius: 14px; background: #fffdf8; rotate: 1deg;
    box-shadow: 0 6px 12px rgba(0, 0, 0, .3); color: #1f2740; }
  .sp-lab::before { content: ""; position: absolute; inset: 6px; border: 2px dashed rgba(229, 83, 61, .5); border-radius: 10px; pointer-events: none; }
  .sp-tape { position: absolute; top: -9px; left: 50%; width: 50px; height: 17px; margin-left: -25px; rotate: -3deg;
    background: repeating-linear-gradient(45deg, rgba(255, 214, 90, .92) 0 5px, rgba(255, 236, 160, .85) 5px 10px); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
  .sp-ttl { display: block; margin-bottom: 14px; text-align: center; font-family: "Caveat", "Segoe Print", cursive; font-weight: 700; font-size: 1.95rem; line-height: 1; color: #e5533d; }
  .sp-cells { position: relative; display: flex; gap: 5px; justify-content: center; }
  .sp-cl { flex: 1; max-width: 34px; height: 46px; line-height: 46px; position: relative; text-align: center; font-family: "Caveat", "Segoe Print", cursive;
    font-weight: 700; font-size: 2.05rem; color: #c93f2b; border-bottom: 2px solid #e5533d; }
  .sp-cl.on::after { content: ""; position: absolute; left: 50%; top: 20%; bottom: 20%; width: 2px; margin-left: -1px; background: currentColor; opacity: .75; animation: sp-blink 1s steps(1) infinite; }
  .sp-hid { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; font-size: 16px; z-index: 5; cursor: text; }
  .sp-err { margin: 8px 0 0; min-height: 16px; text-align: center; font-size: .72rem; font-weight: 700; color: #cf3a3a; opacity: 0; transition: opacity .15s ease; }
  .sp-err.show { opacity: 1; }
  .sp-pcl { position: absolute; right: 8px; bottom: 26px; width: 128px; rotate: -32deg; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .3)); pointer-events: none; }
  @media (prefers-reduced-motion: reduce) { .sp-card, .sp-card * { animation-duration: .01s !important; animation-delay: 0s !important; } }

  .hl.a.long { font-size: clamp(1.3rem, 7vw, 2.1rem); }
