/* ═════ Écriture, oral, lecture, furigana, synchronisation ═════ */
ruby { ruby-align: center; }
rt { font-size: .45em; color: var(--muted); font-family: var(--jp); font-weight: 500; letter-spacing: 0; }

/* Exemple dans la carte d'un nouveau mot */
.intro-ex { margin: 18px auto 0; max-width: 460px; text-align: left; padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px dashed var(--line); }
.ie-label { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ie-jp { font-size: 18px; line-height: 1.9; margin-top: 2px; }
.ie-fr { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.intro-ex .ro.block { font-size: 12.5px; }

/* Écriture */
.write-area { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.wpad { width: min(320px, 78vw); aspect-ratio: 1; border-radius: 22px; background: var(--bg); border: 1.5px solid var(--line); touch-action: none; overflow: hidden; }
.wpad-svg { width: 100%; height: 100%; display: block; cursor: crosshair; }
.wpad-svg path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.w-live { stroke: var(--accent); stroke-width: 4; }
.w-ok-path { stroke: var(--ink); stroke-width: 4.2; }
.w-ok-path.reveal { stroke: var(--bad); }
.w-hint-path { stroke: color-mix(in srgb, var(--accent) 40%, transparent); stroke-width: 4; stroke-dasharray: 2 0; }
.wpad-svg.shake { animation: shake .3s; }
.wpad-svg.ok { background: color-mix(in srgb, var(--good) 8%, transparent); }
.wpad-svg.ko { background: color-mix(in srgb, var(--bad) 6%, transparent); }
.wpad-info { display: flex; gap: 14px; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.w-msg { color: var(--accent); }

/* Oral */
.speak-area { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 10px 0; }
.mic-btn { width: 104px; height: 104px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 0 color-mix(in srgb, var(--accent) 70%, #000); transition: transform .08s, box-shadow .08s; }
.mic-btn svg { width: 44px; height: 44px; }
.mic-btn:active { transform: translateY(5px); box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 70%, #000); }
.mic-btn.on { animation: pulse 1.2s ease-in-out infinite; }
.speak-msg { color: var(--muted); font-size: 15px; text-align: center; max-width: 360px; }

/* Lecture interactive */
.story { padding: 10px 14px; }
.story-line { display: flex; align-items: flex-start; gap: 10px; padding: 12px 4px; border-top: 1px solid var(--line); }
.story-line:first-child { border-top: 0; }
.sl-body { flex: 1; min-width: 0; }
.sl-jp { font-size: 20px; line-height: 2; }
.sl-fr { display: none; font-size: 14.5px; color: var(--ink-2); margin-top: 4px; }
.story-line.show-tr .sl-fr { display: block; animation: fadeUp .2s ease; }
.sl-tr { font-size: 11px !important; font-weight: 700; color: var(--muted); }
.story-line.show-tr .sl-tr { color: var(--accent); background: var(--accent-soft); }
.tk { cursor: pointer; border-radius: 6px; padding: 1px 0; transition: background .12s; }
.tk:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.tk.sel { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.b-jp .tk { padding: 0; }
.tk-pop { position: absolute; z-index: 40; width: 280px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0, 0, 0, .18); opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .15s, transform .15s; }
.tk-pop.show { opacity: 1; transform: none; pointer-events: auto; }
.tp-head { display: flex; align-items: center; gap: 8px; }
.tp-head b { font-size: 20px; }
.tp-ro { color: var(--muted); font-size: 14px; flex: 1; }
.tp-extra { margin-top: 6px; font-size: 15px; }
.tp-form { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.tp-mean { margin-top: 6px; font-size: 15px; font-weight: 600; }
.dia-tools.center { justify-content: center; margin-top: 18px; }

/* Synchronisation */
.sync-code { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 17px; font-weight: 700; letter-spacing: .06em; padding: 8px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); flex: none; }
.sync-card .btn svg { width: 16px; height: 16px; }
.settings .btn.primary { height: 38px; padding: 0 16px; font-size: 14px; }
