/*
 * Lyrics Generator v2.0 — Chord sheet presentation.
 * Extracted from the generator's embedded <style> blocks so that generated
 * posts contain semantic HTML only.  Class names are the stable public API;
 * change CSS here freely, never rename the classes.
 */

/* Chord grid (Pallavi/Charanam boxed rows produced by the PDF extractor). */
.lgenx-chord-grid{max-width:100%;margin:12px 0 24px;padding:20px;background:#fff;color:#1C1A18;border:1px solid #e5e7eb;border-radius:18px;box-shadow:0 10px 40px -14px rgba(10,58,138,.15);font-family:'Poppins','Inter',sans-serif;}
.lgenx-chord-grid-section{font-family:'Poppins','Inter',sans-serif;color:#0A3A8A;font-weight:800;font-size:1.05em;margin:16px 0 10px;padding-bottom:8px;border-bottom:2px solid #E8843A;letter-spacing:.2px;}
.lgenx-chord-grid-section:first-child{margin-top:0;}
.lgenx-chord-row{display:flex;align-items:center;gap:8px;margin-bottom:8px;overflow-x:auto;padding-bottom:4px;-webkit-overflow-scrolling:touch;}
.lgenx-chord-lineno{flex:0 0 auto;font-family:'JetBrains Mono','Menlo',monospace;font-weight:700;color:#E8843A;min-width:34px;font-size:.9em;text-align:right;padding-right:8px;border-right:1px solid #f1f5f9;}
.lgenx-chord-box{flex:0 0 auto;background:rgba(30,120,220,.12);border:1px solid rgba(30,120,220,.25);border-radius:10px;min-width:56px;padding:10px 14px;text-align:center;font-family:'JetBrains Mono','Menlo',monospace;font-size:.95em;font-weight:700;color:#0A3A8A;white-space:nowrap;line-height:1.25;transition:background .15s,box-shadow .15s;}
.lgenx-chord-box:hover{background:rgba(30,120,220,.2);box-shadow:0 0 0 3px rgba(30,120,220,.45);}
.lgenx-chord-box.lgenx-empty{background:transparent;border:1px dashed rgba(30,120,220,.25);color:transparent;min-width:32px;padding:10px 6px;box-shadow:none;}
.lgenx-chord-box.lgenx-empty:hover{background:rgba(30,120,220,.05);box-shadow:none;}

/* Chords-only boxed sheet (plain-text chord chart rendered as boxes). */
.lgenx-chords-only-block{background:#fff;color:#1C1A18;border:1px solid #e5e7eb;border-radius:18px;box-shadow:0 10px 40px -14px rgba(10,58,138,.15);padding:20px;font-family:'Poppins','Inter',sans-serif;}
.lgenx-chords-only-block .lgenx-co-section{font-family:'Poppins','Inter',sans-serif;color:#0A3A8A;font-weight:800;font-size:1.05em;margin:16px 0 10px;padding-bottom:8px;border-bottom:2px solid #E8843A;letter-spacing:.2px;}
.lgenx-chords-only-block .lgenx-co-section:first-child{margin-top:0;}
.lgenx-chords-only-block .lgenx-co-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0;}
.lgenx-chords-only-block .lgenx-co-row + .lgenx-co-row{margin-top:0;}
.lgenx-chords-only-block .lgenx-co-sn{display:inline-flex;align-items:center;justify-content:center;min-width:32px;padding:6px 8px;font-family:'JetBrains Mono','Menlo',monospace;font-size:.85em;font-weight:800;color:#E8843A;background:transparent;}
.lgenx-chords-only-block .lgenx-co-chord{background:rgba(30,120,220,.12);border:1px solid rgba(30,120,220,.25);border-radius:10px;min-width:56px;padding:10px 14px;text-align:center;font-family:'JetBrains Mono','Menlo',monospace;font-size:.95em;font-weight:700;color:#0A3A8A;white-space:nowrap;line-height:1.25;transition:background .15s,box-shadow .15s;}
.lgenx-chords-only-block .lgenx-co-chord:hover{background:rgba(30,120,220,.2);box-shadow:0 0 0 3px rgba(30,120,220,.45);}
.lgenx-chords-only-block .lgenx-co-chord.empty{background:transparent;border:1px dashed rgba(30,120,220,.35);color:transparent;box-shadow:none;min-width:32px;padding:10px 6px;}
.lgenx-chords-only-block .lgenx-co-chord.empty:hover{background:rgba(30,120,220,.04);box-shadow:none;}
.lgenx-chords-only-block .lgenx-co-repeat{font-style:italic;color:#6b5b1f;margin:0;font-size:.95em;}

/* Chord meta row (Scale / Tempo / Time Signature chips). */
.lgenx-chord-meta{display:flex;flex-wrap:wrap;justify-content:center;text-align:center;gap:10px;margin:10px auto 18px;}
.lgenx-chord-meta-item{display:inline-block;padding:6px 14px;border:1px solid #d4af37;border-radius:6px;background:transparent;font-weight:600;color:#1a1a1a;}

@media (max-width:600px){
  .lgenx-chord-grid{padding:14px;}
  .lgenx-chord-box{min-width:48px;padding:8px 10px;font-size:.9em;}
  .lgenx-chord-box.lgenx-empty{min-width:22px;}
  .lgenx-chords-only-block{padding:14px;}
  .lgenx-chords-only-block .lgenx-co-chord{min-width:48px;padding:8px 10px;font-size:.9em;}
}

/*
 * Chord Engine v2.0 — Grid Preservation Engine.
 * Rows produced by the PDF extractor now render EVERY beat cell (chords AND
 * empty beats) so the on-page grid matches the original PDF timing.
 */
.lgenx-chord-grid .lgenx-grid-row{display:flex;flex-wrap:nowrap;align-items:stretch;gap:6px;margin:0 0 8px;padding-bottom:4px;overflow-x:auto;-webkit-overflow-scrolling:touch;}
.lgenx-chord-grid .lgenx-grid-lineno{flex:0 0 auto;font-family:'JetBrains Mono','Menlo',monospace;font-weight:700;color:#E8843A;min-width:34px;font-size:.9em;text-align:right;padding:8px 8px 8px 0;border-right:1px solid #f1f5f9;align-self:center;}
.lgenx-chord-grid .lgenx-grid-cell{flex:1 1 0;min-width:56px;padding:10px 8px;text-align:center;font-family:'JetBrains Mono','Menlo',monospace;font-size:.95em;font-weight:700;color:#0A3A8A;background:rgba(30,120,220,.12);border:1px solid rgba(30,120,220,.25);border-radius:10px;white-space:nowrap;line-height:1.25;transition:background .15s,box-shadow .15s;}
.lgenx-chord-grid .lgenx-grid-cell:hover{background:rgba(30,120,220,.2);box-shadow:0 0 0 3px rgba(30,120,220,.45);}
.lgenx-chord-grid .lgenx-grid-cell.empty{background:transparent;border:1px dashed rgba(30,120,220,.22);color:transparent;box-shadow:none;}
.lgenx-chord-grid .lgenx-grid-cell.empty:hover{background:rgba(30,120,220,.05);box-shadow:none;}
.lgenx-chord-grid .lgenx-grid-divider{flex:0 0 auto;width:2px;align-self:stretch;background:#E8843A;border-radius:2px;margin:2px 4px;opacity:.7;}

@media (max-width:600px){
  .lgenx-chord-grid .lgenx-grid-cell{min-width:44px;padding:8px 6px;font-size:.85em;}
  .lgenx-chord-grid .lgenx-grid-divider{margin:2px 2px;}
}

/*
 * Chord Engine v1.45.28 — Beat Grid Detection Engine.
 * Rows carry data-confidence / data-review / data-normalized attributes and
 * cells carry .uncertain / .normalized markers.  In normal (non-debug) mode
 * only .lgenx-grid-row[data-review="1"] receives a subtle orange left rule
 * so reviewers can spot low-confidence rows.  The full colored overlay only
 * activates when the container has .lgenx-grid-debug (opt-in).
 */
.lgenx-chord-grid .lgenx-grid-row[data-review="1"]{
  border-left:3px solid rgba(232,132,58,.55);
  padding-left:6px;
}

/* Debug overlay: green = detected cell, blue = detected chord,
   red = uncertain (residual > 0.35 of a beat), yellow = normalized. */
.lgenx-chord-grid.lgenx-grid-debug .lgenx-grid-cell{outline:1px solid #22c55e;}
.lgenx-chord-grid.lgenx-grid-debug .lgenx-grid-cell:not(.empty){outline-color:#2563eb;}
.lgenx-chord-grid.lgenx-grid-debug .lgenx-grid-cell.uncertain{outline:2px solid #ef4444;}
.lgenx-chord-grid.lgenx-grid-debug .lgenx-grid-cell.normalized{outline:2px dashed #eab308;background:rgba(234,179,8,.08);}
.lgenx-chord-grid.lgenx-grid-debug .lgenx-grid-row[data-review="1"]{background:rgba(239,68,68,.05);}
.lgenx-chord-grid.lgenx-grid-debug .lgenx-grid-row::after{
  content:"conf " attr(data-confidence) "% · " attr(data-cols) "/" attr(data-expected);
  flex:0 0 auto;align-self:center;margin-left:8px;
  font-family:'JetBrains Mono','Menlo',monospace;font-size:.75em;color:#64748b;
}

/*
 * Chord Engine v1.45.29 — Renderer Grid Model Direct.
 * Renderer consumes the Grid Model directly (one HTML element per cell).
 * When rendered cell count != expected columns the row is flagged with
 * data-mismatch="1" and highlighted red so it stands out during review.
 */
.lgenx-chord-grid .lgenx-grid-row[data-mismatch="1"]{
  outline:2px solid #ef4444;
  background:rgba(239,68,68,.08);
}
.lgenx-chord-grid .lgenx-grid-cell.extra{
  outline:1px dashed rgba(59,130,246,.55);
}
.lgenx-chord-grid .lgenx-grid-debug-log{
  font-family:'JetBrains Mono','Menlo',monospace;
  font-size:.75em;color:#334155;background:#f1f5f9;
  border-left:3px solid #3b82f6;padding:4px 8px;margin:4px 0;
}