/* ==========================================================================
   Paddy Prompt Studio — chord transposer
   Layers on /blog/style.css and /tools/shared/tool-common.css.
   ========================================================================== */
:root {
  --ct-chord: #67e8f9;
  --ct-tag: #a5b4fc;
  --ct-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ------------------------------------------------------------ Controls */
.ct-controls {
  display: grid; gap: 0.9rem; align-items: end;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto;
  padding-bottom: 1rem; border-bottom: 1px solid var(--border-soft);
}
.ct-shift { display: flex; align-items: center; gap: 0.4rem; }
.ct-shift .btn-ghost { min-width: 48px; font-size: 1.25rem; padding: 0.4rem 0.7rem; }
.ct-shift-readout { min-width: 5.5rem; text-align: center; }
.ct-shift-readout output {
  display: block; font-family: var(--ct-mono); font-weight: 700; font-size: 1.6rem; line-height: 1.1; color: #fff;
}
.ct-shift-readout span { display: block; font-size: 0.72rem; color: var(--text-dim); }
.ct-controls select { width: 100%; }
.ct-quick { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.8rem 0 0; align-items: center; }
.ct-quick .lbl { font-size: 0.8rem; color: var(--text-dim); margin-right: 0.2rem; }
.ct-key-badge {
  margin: 0.8rem 0 0; font-size: 0.95rem; color: var(--text-muted);
}
.ct-key-badge strong { color: var(--ct-chord); }

/* ------------------------------------------------------------ Panes */
.ct-grid {
  display: grid; gap: 1rem; padding-top: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.ct-pane { display: flex; flex-direction: column; min-width: 0; }
.ct-pane-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.45rem; min-height: 2.2rem; }
.ct-pane-head h3 { margin: 0; font-size: 0.95rem; }
.ct-pane-head .meta { margin-left: auto; font-size: 0.78rem; color: var(--text-dim); font-family: var(--ct-mono); }
.ct-sheet, #ct-input {
  font-family: var(--ct-mono); font-size: 0.92rem; line-height: 1.6; tab-size: 4;
  min-height: 22rem; max-height: 38rem; margin: 0; padding: 0.85rem 1rem;
  border-radius: 14px; border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35); color: var(--text);
  white-space: pre; overflow: auto;
}
#ct-input { width: 100%; resize: vertical; }
#ct-input:focus-visible { outline: 2px solid #22d3ee; outline-offset: 1px; border-color: transparent; }
.ct-sheet { background: rgba(34, 211, 238, 0.035); border-color: rgba(103, 232, 249, 0.25); }
.ct-sheet .tg { color: var(--ct-tag); font-weight: 700; }
.ct-sheet .ly, .ct-sheet .il { color: #d7dcea; }
.ct-ch { color: var(--ct-chord); font-weight: 700; text-decoration: none; border-radius: 4px; }
.ct-ch:hover, .ct-ch:focus-visible { background: rgba(103, 232, 249, 0.16); text-decoration: underline; outline: none; }
.ct-empty { white-space: normal; display: block; color: var(--text-muted); font-family: "Inter", system-ui, sans-serif; font-size: 0.95rem; }
.ct-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.6rem; }
.ct-actions .btn-primary, .ct-actions .btn-ghost { min-height: 40px; padding: 0.45rem 0.85rem; font-size: 0.86rem; }

/* ------------------------------------------------------------ Chord strip */
.ct-sub { font-size: 0.95rem; margin: 1.2rem 0 0.55rem; }
.ct-strip { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.55rem; }
.ct-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.1rem;
  padding: 0.5rem 0.55rem 0.45rem; min-width: 5.8rem; border-radius: 14px;
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.03);
  color: var(--text); text-decoration: none; transition: border-color 0.15s, transform 0.15s;
}
.ct-card:hover, .ct-card:focus-visible { border-color: rgba(103, 232, 249, 0.6); transform: translateY(-2px); text-decoration: none; }
.ct-card .nm { font-family: var(--ct-mono); font-weight: 700; color: #fff; font-size: 0.95rem; }
.ct-card .rn { font-family: var(--ct-mono); font-size: 0.72rem; color: var(--indigo); }
.ct-card .apx { font-size: 0.62rem; color: var(--text-dim); }
.ct-card svg .ln { stroke: rgba(255, 255, 255, 0.32); stroke-width: 1; }
.ct-card svg .dot { fill: #a5b4fc; }
.ct-card svg .dot.root { fill: #22d3ee; }
.ct-card svg .op { fill: none; stroke: #e8ecf4; stroke-width: 1.2; }
.ct-card svg .mx, .ct-card svg .fr { fill: var(--text-dim); font: 700 9px var(--ct-mono); }

/* ------------------------------------------------------------ Capo */
.ct-capo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.ct-capo-list li {
  display: grid; grid-template-columns: 6.2rem minmax(0, 1fr); gap: 0.15rem 0.8rem; align-items: baseline;
  padding: 0.55rem 0.8rem; border-radius: 12px; border: 1px solid var(--border-soft); background: rgba(255, 255, 255, 0.02);
}
.ct-capo-list li.best { border-color: rgba(52, 211, 153, 0.5); background: rgba(52, 211, 153, 0.06); }
.ct-capo-list li.best .cf::after { content: " ★"; color: #34d399; }
.ct-capo-list .cf { font-weight: 700; grid-row: span 2; }
.ct-capo-list .sh { font-family: var(--ct-mono); font-size: 0.9rem; }
.ct-capo-list .sh .ez { color: #a7f3d0; }
.ct-capo-list .sh .hd { color: #fcd34d; }
.ct-capo-list .sc { font-size: 0.78rem; color: var(--text-dim); }
.ct-note { font-size: 0.88rem; color: var(--text-muted); margin: 0.6rem 0 0; }
.ct-keep { padding: 0.6rem 0.8rem; border-left: 3px solid #22d3ee; background: rgba(34, 211, 238, 0.05); border-radius: 0 10px 10px 0; }
.ct-legend { font-size: 0.76rem; color: var(--text-dim); margin: 0.45rem 0 0; }
.ct-legend .ez { color: #a7f3d0; } .ct-legend .hd { color: #fcd34d; }

/* ------------------------------------------------------------ Small screens */
@media (max-width: 860px) {
  .ct-controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ct-controls .ct-shift-wrap { grid-column: 1 / -1; }
  .ct-controls .ct-prefer-wrap { grid-column: 1 / -1; }
  .ct-grid { grid-template-columns: minmax(0, 1fr); }
  .ct-sheet, #ct-input { min-height: 14rem; }
}
@media (max-width: 480px) {
  .ct-controls { grid-template-columns: minmax(0, 1fr); }
  .ct-capo-list li { grid-template-columns: minmax(0, 1fr); }
  .ct-capo-list .cf { grid-row: auto; }
}
