/* Luyện ngắt nhịp */
.fc-modal.rh-modal { width: min(760px, 96vw); }
.rh-head { display: flex; align-items: center; gap: 10px; }
.rh-head h3 { flex: 1; margin: 0; }
.rh-label { margin: 4px 0 14px; color: var(--muted); font-size: .85em; }
.rh-chunks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; font-size: 1.2em; line-height: 1.5; }
.rh-chunk { padding: 4px 10px; border-radius: 10px; font-size: 1em; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border); }
.rh-chunk:hover:not(:disabled) { border-color: var(--primary-border); }
.rh-chunk.playing { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-text); }
.rh-sep { color: var(--primary); font-weight: 800; padding: 0 2px; }
.rh-sep.long { font-size: 1.15em; }
.rh-hint { margin: 10px 0 0; color: var(--muted); font-size: .82em; }
.rh-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.rh-actions .recording { background: var(--danger); border-color: var(--danger); color: #fff; }
.rh-actions audio { height: 34px; max-width: 220px; }
.rh-status { min-height: 1.3em; margin-top: 10px; font-size: .9em; color: var(--text-2); }
.rh-result { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.rh-score { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.rh-score .score-pill { font-size: 1em; padding: 5px 12px; }
.rh-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin: 12px 0; }
.rh-facts div { padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: .85em; }
.rh-facts b { display: block; font-size: 1.05em; }
.rh-facts span { color: var(--muted); }
.rh-sentence { font-size: 1.08em; line-height: 2; }
.rh-sentence .unsaid { color: var(--muted); text-decoration: line-through; }
.rh-mark { display: inline-block; margin: 0 3px; padding: 0 5px; border-radius: 6px; font-size: .8em; font-weight: 700; }
.rh-mark.correct { background: var(--success-soft); color: var(--success-text); }
.rh-mark.missing { background: var(--danger-soft); color: var(--danger-text); }
.rh-mark.extra { background: var(--warn-soft); color: var(--warn-text); }
.rh-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 6px 0 12px; font-size: .8em; color: var(--muted); }
.rh-timeline svg { display: block; width: 100%; height: auto; }
.rh-timeline .axis { fill: var(--muted); font-size: 11px; }
.rh-timeline .lane-label { fill: var(--text-2); font-size: 12px; font-weight: 700; }
.rh-timeline .grid { stroke: var(--border); }
.rh-timeline .w-model { fill: var(--muted); }
.rh-timeline .w-mine { fill: var(--primary); }
.rh-timeline .p-correct { fill: var(--success); }
.rh-timeline .p-missing { fill: var(--danger); }
.rh-timeline .p-extra { fill: var(--warn); }
.rh-timeline .p-model { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.rh-modes { margin: 0 0 14px; flex-wrap: wrap; }
.rh-gap { min-width: 22px; height: 30px; padding: 0 4px; margin: 0 1px; border: 1px dashed var(--border-strong); border-radius: 8px;
          background: transparent; color: var(--primary); font-weight: 800; font-size: .95em; }
.rh-gap:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-soft); }
.rh-gap.on { border-style: solid; border-color: var(--primary); background: var(--primary-soft); }
.rh-gap.correct { border: 0; background: var(--success-soft); color: var(--success-text); }
.rh-gap.missing { border: 0; background: var(--danger-soft); color: var(--danger-text); }
.rh-gap.extra { border: 0; background: var(--warn-soft); color: var(--warn-text); }
.rh-gap:disabled { cursor: default; opacity: 1; }
.rh-gap.plain { border-color: transparent; }
.rh-word { padding: 2px 1px; }
.rh-kw { padding: 2px 3px; border-radius: 6px; color: var(--muted); transition: color .08s; }
.rh-kw.done { color: var(--text); }
.rh-kw.now { color: var(--on-primary); background: var(--primary); }
.rh-count { font-size: 2em; font-weight: 800; color: var(--primary); }
.rh-actions[hidden] { display: none; }
.rh-actions label { display: inline-flex; align-items: center; gap: 6px; font-size: .88em; color: var(--text-2); }
.rh-ai { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.rh-ai .pg-row p { font-size: .9em; }
.rh-ai .rh-tag { font-size: .78em; color: var(--muted); }
.rh-timeline details { margin-top: 6px; font-size: .82em; color: var(--muted); }
.rh-timeline table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.rh-timeline td, .rh-timeline th { padding: 3px 6px; border-bottom: 1px solid var(--border); text-align: left; }
