[data-tg-widget]{
  --bg:#0b0b0b;
  --card:#141414;
  --card2:#101010;
  --line:#2a2a2a;
  --grid:#262626;
  --text:#f3f3f3;
  --muted:#b8b8b8;
  --muted2:#8d8d8d;
  --accent:#4dd0e1;
  --accent2:#ffb74d;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  max-width:980px;
  margin:40px auto;
  padding:14px;
  color:var(--text);
  font-family:var(--sans);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent 65%);
  border-radius:16px;
}
[data-tg-widget],[data-tg-widget] *{ box-sizing:border-box; }
[data-tg-widget] h1{
  margin:0 0 6px;
  font-weight:800;
  letter-spacing:-0.02em;
  font-size:clamp(22px,2.3vw,34px);
  color:#4dd0e1;
}
[data-tg-widget] .tg-sub{
  margin:0 0 12px;
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
}
[data-tg-widget] .tg-card{
  background:var(--card);
  border:1px solid #1f1f1f;
  border-radius:14px;
  padding:14px;
  margin:12px 0;
  box-shadow:0 12px 28px rgba(0,0,0,.28);
}
[data-tg-widget] .tg-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:flex-end;
}
[data-tg-widget] .tg-row-tight{ align-items:center; }
[data-tg-widget] .tg-spacer{ flex:1; }
[data-tg-widget] .tg-field{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:170px;
}
[data-tg-widget] .tg-field-inline{
  flex-direction:row;
  align-items:center;
  min-width:auto;
  gap:8px;
}
[data-tg-widget] .tg-label{
  font-size:11px;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:var(--muted2);
  font-weight:800;
}
[data-tg-widget] select,
[data-tg-widget] button,
[data-tg-widget] input{
  font:inherit;
}
[data-tg-widget] select{
  background:#0f0f0f;
  color:var(--text);
  border:1px solid #2a2a2a;
  border-radius:10px;
  padding:10px 12px;
  min-height:42px;
}
[data-tg-widget] .tg-btn{
  background:#111;
  color:var(--text);
  border:1px solid #2a2a2a;
  border-radius:12px;
  padding:10px 12px;
  cursor:pointer;
  transition: transform .05s ease, border-color .2s ease, background .2s ease;
  touch-action:manipulation;
  min-height:42px;
}
[data-tg-widget] .tg-btn:hover{ border-color:#3a3a3a; background:#121212; }
[data-tg-widget] .tg-btn:active{ transform:translateY(1px); }
[data-tg-widget] .tg-primary{
  border-color: rgba(77,208,225,.6);
  box-shadow: 0 0 0 3px rgba(77,208,225,.08) inset;
}
[data-tg-widget] .tg-btn:focus-visible,
[data-tg-widget] select:focus-visible,
[data-tg-widget] input:focus-visible{
  outline:2px solid rgba(255,255,255,.25);
  outline-offset:2px;
}
[data-tg-widget] .tg-btnrow{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
}
[data-tg-widget] .tg-divider{
  height:1px;
  background:#222;
  margin:12px 0;
}
[data-tg-widget] .tg-small{ font-size:12px; color:var(--muted); }
[data-tg-widget] .tg-mono{ font-family:var(--mono); }
[data-tg-widget] .tg-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  background:#0f0f0f;
  border:1px solid #2a2a2a;
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
}
[data-tg-widget] .tg-title{
  color:var(--text);
  border-color:#2a2a2a;
  background:#0f0f0f;
  font-weight:700;
}
[data-tg-widget] .tg-legend{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}
[data-tg-widget] .tg-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  display:inline-block;
  border:1px solid #333;
  background:#111;
}
[data-tg-widget] .tg-dot-scale{
  border-color: rgba(77,208,225,.55);
  box-shadow: 0 0 0 2px rgba(77,208,225,.08) inset;
}
[data-tg-widget] .tg-dot-root{
  border-color: rgba(255,183,77,.65);
  box-shadow: 0 0 0 2px rgba(255,183,77,.10) inset;
}
[data-tg-widget] .tg-dot-hit{
  border-color: rgba(77,208,225,.95);
  background: rgba(77,208,225,.25);
}
[data-tg-widget] .tg-grid2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
[data-tg-widget] .tg-sp{ height:12px; }
[data-tg-widget] .tg-scale-notes{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}
[data-tg-widget] .tg-note-pill{
  display:inline-flex;
  align-items:baseline;
  gap:8px;
  padding:8px 10px;
  border-radius:12px;
  background:#0f0f0f;
  border:1px solid #2a2a2a;
}
[data-tg-widget] .tg-note-pill b{ font-weight:900; }
[data-tg-widget] .tg-note-pill small{
  font-size:11px;
  color:var(--muted2);
  font-weight:800;
  letter-spacing:0.08em;
  text-transform:uppercase;
}
[data-tg-widget] .tg-note-pill.is-root{
  border-color: rgba(255,183,77,.7);
  box-shadow: 0 0 0 3px rgba(255,183,77,.08) inset;
}
[data-tg-widget] .tg-chords{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}
[data-tg-widget] .tg-chordbtn{
  padding:8px 10px;
  border-radius:10px;
  border:1px solid #2a2a2a;
  background:#0f0f0f;
  color:var(--text);
  cursor:pointer;
}
[data-tg-widget] .tg-chordbtn.active{
  border-color: rgba(255,183,77,.7);
  box-shadow: 0 0 0 3px rgba(255,183,77,.08) inset;
}

[data-tg-widget] .tg-chords-song{
  margin-top:10px;
}
[data-tg-widget] .tg-chordbtn.is-song{
  display:inline-flex;
  align-items:center;
  gap:8px;
}
[data-tg-widget] .tg-chordbtn small{
  color:var(--muted2);
  font-size:11px;
  font-weight:800;
  letter-spacing:0.05em;
}
[data-tg-widget] .tg-pre{
  margin:10px 0 0;
  background:var(--card2);
  border:1px solid rgba(255,255,255,0.10);
  border-radius:12px;
  padding:14px;
  overflow-x:auto;
  font-family:var(--mono);
  font-size:13px;
  line-height:1.45;
  color:#d7d7e3;
  white-space:pre;
}

[data-tg-widget] .tg-lick-actions{
  margin-top:10px;
}
[data-tg-widget] .tg-status{ white-space:pre-wrap; min-height:120px; }
[data-tg-widget] .tg-fretboard{ margin-top:10px; }
[data-tg-widget] .tg-fret-scroll{
  overflow:auto;
  border-radius:12px;
  border:1px solid #262626;
  background:#0d0d0d;
  padding:10px;
  -webkit-overflow-scrolling:touch;
}
[data-tg-widget] table.tg-frets{
  border-collapse:collapse;
  min-width:860px;
  width:100%;
}
[data-tg-widget] table.tg-frets th,
[data-tg-widget] table.tg-frets td{
  border:1px solid var(--grid);
  text-align:center;
  padding:7px 6px;
  font-size:12px;
  white-space:nowrap;
}
[data-tg-widget] table.tg-frets th{
  color:var(--muted);
  font-weight:700;
  background:#101010;
  position:sticky;
  top:0;
  z-index:2;
}
[data-tg-widget] table.tg-frets tbody th{
  position:sticky;
  left:0;
  z-index:1;
  background:#101010;
}
[data-tg-widget] .tg-note{
  display:inline-flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:999px;
  border:1px solid #2b2b2b;
  background:#111;
  user-select:none;
}
[data-tg-widget] .tg-note.out{
  background:transparent;
  border:1px solid transparent;
  color:#4b4b4b;
  font-size:18px;
  line-height:1;
}
[data-tg-widget] .tg-note.dim{ opacity:0.25; }
[data-tg-widget] .tg-note.in{
  border-color: rgba(77,208,225,.55);
  box-shadow: 0 0 0 3px rgba(77,208,225,.07) inset;
  cursor:pointer;
}
[data-tg-widget] .tg-note.in:hover{
  border-color: rgba(77,208,225,.9);
  background: rgba(77,208,225,.12);
}
[data-tg-widget] .tg-note.root{
  border-color: rgba(255,183,77,.65);
  box-shadow: 0 0 0 3px rgba(255,183,77,.08) inset;
}
[data-tg-widget] .tg-note.hit{
  background: rgba(77,208,225,.22);
  border-color: rgba(77,208,225,.95);
}
[data-tg-widget] .tg-note .n{ font-weight:900; font-size:12px; }
[data-tg-widget] .tg-note .d{
  font-size:10px;
  color:var(--muted2);
  font-weight:800;
  letter-spacing:0.05em;
}
[data-tg-widget] .tg-prog-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(190px, 1fr));
  gap:12px;
  margin-top:10px;
}
[data-tg-widget] .tg-prog-box{
  border-radius:14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent 60%), rgba(0,0,0,0.22);
  border:1px solid rgba(255,255,255,0.10);
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
[data-tg-widget] .tg-prog-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
[data-tg-widget] .tg-prog-pill{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  background: rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.10);
  color:var(--text);
  white-space:nowrap;
}
[data-tg-widget] .tg-x{
  border-radius:10px;
  padding:8px 10px;
  background: rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.10);
  color:var(--text);
  font-weight:900;
  cursor:pointer;
}
[data-tg-widget] .tg-x:hover{ background: rgba(255,255,255,0.08); }
[data-tg-widget] .tg-minirow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
[data-tg-widget] .tg-minirow span{
  font-size:12px;
  color:var(--muted);
  font-weight:800;
}
[data-tg-widget] .tg-minirow select{
  min-height:34px;
  padding:8px 10px;
  border-radius:10px;
  font-size:12px;
  min-width:0;
  flex:1;
}
[data-tg-widget] .tg-meters{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  margin-top:10px;
}
[data-tg-widget] .tg-meter{
  display:flex;
  align-items:center;
  gap:10px;
}
[data-tg-widget] .tg-meter-name{
  width:140px;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}
[data-tg-widget] input[type="range"]{
  width:100%;
  accent-color: var(--accent);
}

[data-tg-widget] .tg-pre-compact{
  margin-top:8px;
  padding:10px 12px;
  min-height:136px;
}
[data-tg-widget] .tg-prog-actions{
  display:flex;
  justify-content:flex-start;
  gap:8px;
}
[data-tg-widget] .tg-btn.is-small{
  min-height:34px;
  padding:8px 10px;
  border-radius:10px;
  font-size:12px;
}
[data-tg-widget] .tg-btn.is-active{
  border-color: rgba(77,208,225,.75);
  box-shadow: 0 0 0 3px rgba(77,208,225,.10) inset;
}
[data-tg-widget] .tg-string-targets{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:12px;
}
[data-tg-widget] .tg-tuner-readout{
  display:flex;
  flex-direction:column;
  gap:10px;
}
[data-tg-widget] .tg-big-note{
  font-size:clamp(36px,6vw,56px);
  font-weight:900;
  letter-spacing:-0.04em;
}
[data-tg-widget] .tg-tuner-meter{
  display:flex;
  flex-direction:column;
  gap:10px;
}
[data-tg-widget] .tg-tuner-scale{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:6px;
  color:var(--muted2);
  font-size:11px;
  font-weight:800;
  letter-spacing:0.06em;
}
[data-tg-widget] .tg-tuner-bar{
  position:relative;
  height:24px;
  border-radius:999px;
  background:linear-gradient(90deg, rgba(255,80,80,.16), rgba(255,255,255,.06) 50%, rgba(255,80,80,.16));
  border:1px solid rgba(255,255,255,0.10);
  overflow:hidden;
}
[data-tg-widget] .tg-tuner-center{
  position:absolute;
  left:50%;
  top:0;
  width:2px;
  height:100%;
  background:rgba(255,255,255,.24);
  transform:translateX(-50%);
}
[data-tg-widget] .tg-tuner-needle{
  position:absolute;
  left:50%;
  top:2px;
  bottom:2px;
  width:14px;
  border-radius:999px;
  background:var(--accent);
  transform:translateX(-50%);
  box-shadow:0 0 0 2px rgba(77,208,225,.14);
  transition:transform .08s linear;
}
[data-tg-widget] .tg-mixer{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:12px;
  margin-top:12px;
}
[data-tg-widget] .tg-channel{
  border-radius:14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent 60%), rgba(0,0,0,0.22);
  border:1px solid rgba(255,255,255,0.10);
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
[data-tg-widget] .tg-channel-wide{ grid-column:1 / -1; }
[data-tg-widget] .tg-chan-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
[data-tg-widget] .tg-toggle{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:900;
}
[data-tg-widget] .tg-toggle input{
  width:18px;
  height:18px;
  accent-color: var(--accent2);
}
[data-tg-widget] .is-loading{
  opacity:.6;
  pointer-events:none;
}
@media (max-width: 760px){
  [data-tg-widget]{
    margin:18px auto;
    padding:10px;
  }
  [data-tg-widget] .tg-grid2{ grid-template-columns:1fr; }
  [data-tg-widget] .tg-field{ min-width:150px; flex:1 1 calc(50% - 10px); }
  [data-tg-widget] .tg-meter-name{ width:110px; }
  [data-tg-widget] .tg-btnrow{ width:100%; justify-content:stretch; }
  [data-tg-widget] .tg-btnrow .tg-btn{ flex:1 1 auto; }
  [data-tg-widget] .tg-note{ width:32px; height:32px; }
}
@media (max-width: 480px){
  [data-tg-widget] .tg-field{ flex:1 1 100%; min-width:100%; }
  [data-tg-widget] .tg-row{
    gap:8px;
  }
  [data-tg-widget] .tg-meter{
    align-items:flex-start;
    flex-direction:column;
  }
  [data-tg-widget] .tg-meter-name{
    width:auto;
  }
}
