/* Layout: one working column — setup row (3 steps), then the result desk (sheet | instruments), bars, score. Sticky transport at the bottom. */
.stc{
  --bg:#f3f3ef; --panel:#ffffff; --panel-2:#ecebe5; --ink:#151513; --ink-2:#5c5b55; --line:#d9d8d0;
  --accent:#f6c700; --accent-ink:#7a6200; --on-accent:#151513; --lh:#2f6fd6; --rh:#e0821c; --mel:#16a06a;
  --warn:#b4441c; --paper:#fffef9; --paper-ink:#151513; --shadow:0 1px 0 rgba(0,0,0,.04),0 8px 24px -16px rgba(0,0,0,.25);
  --f-display:"Archivo", "Arial Narrow", system-ui, sans-serif; --f-body:"Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif; --f-mono:"JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

.stc{ position:relative; background:var(--bg); color:var(--ink); font-family:var(--f-body); font-size:15px; line-height:1.5; }
.stc *{ box-sizing:border-box }
.stc [hidden]{ display:none!important }
.stc button{ text-transform:none; letter-spacing:normal; min-height:0; box-shadow:none; text-shadow:none }
.stc svg text{ letter-spacing:normal }
.stc button,.stc input,.stc select,.stc textarea{ font:inherit; color:inherit }
.stc .wrap{ max-width:1240px; margin:0 auto; padding-left:max(16px,env(safe-area-inset-left,0px)); padding-right:max(16px,env(safe-area-inset-right,0px)); padding-block:20px 120px; display:grid; gap:20px }

/* header */
.stc .top{ display:flex; gap:16px; align-items:center; flex-wrap:wrap }
.stc .mark{ background:var(--accent); color:var(--on-accent); font-family:var(--f-display); font-weight:900; font-stretch:80%; font-size:20px; letter-spacing:-.02em; padding:6px 9px 5px; border-radius:4px; line-height:1 }
.stc h1{ font-family:var(--f-display); font-weight:800; font-stretch:78%; font-size:clamp(30px,4.6vw,46px); line-height:1; letter-spacing:-.01em; margin:0; text-wrap:balance }
.stc .lede{ color:var(--ink-2); margin:0; max-width:62ch; flex-basis:100% }

/* setup */
.stc .setup{ display:grid; grid-template-columns:1.25fr 1fr 1fr; gap:14px }
.stc .card{ background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:16px; display:grid; gap:12px; align-content:start; min-width:0; box-shadow:var(--shadow) }
.stc .step{ display:flex; align-items:baseline; gap:10px }
.stc .step b{ font-family:var(--f-display); font-stretch:80%; font-weight:800; font-size:13px; letter-spacing:.08em; text-transform:uppercase; color:var(--accent-ink) }
.stc .step h2{ margin:0; font-family:var(--f-display); font-weight:800; font-stretch:85%; font-size:21px; line-height:1.1 }
.stc .hint{ color:var(--ink-2); font-size:13px; margin:0 }
.stc textarea{ width:100%; min-height:190px; resize:vertical; background:var(--bg); border:1px solid var(--line); border-radius:8px; padding:10px 12px; line-height:1.55; unicode-bidi:plaintext }
.stc .row{ display:flex; gap:8px; flex-wrap:wrap; align-items:center }
.stc .btn{ appearance:none; border:1px solid var(--line); background:var(--panel-2); border-radius:8px; padding:8px 12px; cursor:pointer; font-weight:600; font-size:14px; display:inline-flex; gap:7px; align-items:center; line-height:1.2 }
.stc .btn:hover{ border-color:var(--ink-2) }
.stc .btn:focus-visible,.stc .chip:focus-visible,.stc .key:focus-visible,.stc .cs:focus-visible{ outline:2px solid var(--accent); outline-offset:2px }
.stc .btn.primary{ background:var(--accent); border-color:var(--accent); color:var(--on-accent) }
.stc .btn.rec{ background:#d6342c; border-color:#d6342c; color:#fff; font-size:16px; padding:12px 18px }
.stc .btn.rec .dot{ width:12px; height:12px; border-radius:50%; background:#fff }
.stc .btn[disabled]{ opacity:.45; cursor:not-allowed }
.stc .btn.sm{ padding:5px 9px; font-size:13px }
.stc .keys{ display:grid; grid-template-columns:repeat(6,1fr); gap:5px }
.stc .key{ border:1px solid var(--line); background:var(--bg); border-radius:7px; padding:8px 0; cursor:pointer; font-family:var(--f-mono); font-weight:700; font-size:14px }
.stc .key[aria-pressed="true"]{ background:var(--ink); color:var(--bg); border-color:var(--ink) }
.stc .seg{ display:inline-flex; border:1px solid var(--line); border-radius:8px; overflow:hidden }
.stc .seg button{ border:0; background:transparent; padding:6px 11px; cursor:pointer; font-weight:600; font-size:13px }
.stc .seg button[aria-pressed="true"]{ background:var(--accent); color:var(--on-accent) }
.stc .lbl{ font-size:12px; font-weight:700; letter-spacing:.07em; text-transform:uppercase; color:var(--ink-2) }
.stc .field{ display:grid; gap:6px }
.stc input[type=number]{ width:74px; background:var(--bg); border:1px solid var(--line); border-radius:7px; padding:6px 8px; font-family:var(--f-mono) }
.stc select{ background:var(--bg); border:1px solid var(--line); border-radius:7px; padding:6px 8px }
.stc .check{ display:flex; gap:8px; align-items:center; font-size:14px; cursor:pointer }
.stc .notice{ border-left:3px solid var(--warn); background:var(--panel-2); padding:8px 10px; border-radius:0 6px 6px 0; font-size:13px }
.stc .big-start{ font-family:var(--f-mono); font-weight:700; font-size:34px; line-height:1 }
.stc .small{ font-size:12px; color:var(--ink-2) }

/* result desk */
.stc .result{ display:grid; gap:14px }
.stc .bar-info{ display:flex; gap:10px 18px; align-items:center; flex-wrap:wrap; background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:10px 14px }
.stc .bar-info .stat{ display:flex; gap:6px; align-items:center }
.stc .banner{ background:var(--accent); color:var(--on-accent); border-radius:8px; padding:9px 12px; font-size:14px; font-weight:500 }
.stc .desk{ display:grid; grid-template-columns:minmax(0,1.35fr) minmax(0,1fr); gap:14px; align-items:start }
.stc .sheet{ background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:18px 18px 22px; min-width:0 }
.stc .sheet h3,.stc .inst h3,.stc .score-wrap h3,.stc .bars h3{ margin:0 0 10px; font-family:var(--f-display); font-stretch:85%; font-weight:800; font-size:18px }
.stc .ln{ display:flex; flex-wrap:wrap; column-gap:.42em; row-gap:4px; margin:0 0 14px; font-size:18px }
.stc .ln.rtl{ direction:rtl }
.stc .sec{ font-family:var(--f-display); font-stretch:85%; font-weight:800; font-size:13px; letter-spacing:.08em; text-transform:uppercase; color:var(--ink-2); margin:6px 0 6px }
.stc .w{ display:inline-flex; flex-direction:column; align-items:flex-start; border-radius:4px; padding:0 1px }
.stc .ln.rtl .w{ align-items:flex-start }
.stc .w .cr{ display:flex; gap:4px; min-height:1.55em; direction:ltr }
.stc .w .t{ white-space:nowrap; cursor:pointer; border-radius:3px }
.stc .w .t:hover{ background:var(--panel-2) }
.stc .w .add{ border:1px dashed var(--ink-2); background:transparent; color:var(--ink-2); font:700 12px/1.2 var(--f-mono); border-radius:5px; padding:1px 5px; cursor:pointer; opacity:0; transition:opacity .12s }
.stc .w:hover .add,.stc .w .add:focus-visible{ opacity:.9 }
.stc .w .add:hover{ color:var(--accent-ink); border-color:var(--accent-ink) }
@media (hover:none){ .stc .w .add{ opacity:.4 } }
.stc .w.cur .t{ background:var(--accent); color:var(--on-accent); border-radius:3px; box-shadow:0 0 0 2px var(--accent) }
.stc .cs{ font-family:var(--f-mono); font-weight:700; font-size:14px; color:var(--accent-ink); background:transparent; border:1px dashed transparent; border-radius:5px; padding:0 4px; cursor:pointer; line-height:1.4 }
.stc .cs:hover{ border-color:var(--accent-ink) }
.stc .cs.on{ background:var(--accent); color:var(--on-accent) }
.stc .cs.sel{ border-color:var(--accent-ink); border-style:solid }

.stc .inst{ background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:14px; display:grid; gap:12px; min-width:0; position:sticky; top:12px }
.stc .now{ display:flex; gap:14px; align-items:flex-end; flex-wrap:wrap }
.stc .now .nm{ font-family:var(--f-mono); font-weight:800; font-size:40px; line-height:.95 }
.stc .now .rn{ font-family:var(--f-display); font-stretch:85%; font-weight:700; color:var(--ink-2); font-size:16px }
.stc .legend{ display:flex; gap:12px; flex-wrap:wrap; font-size:12px; color:var(--ink-2) }
.stc .legend i{ display:inline-block; width:10px; height:10px; border-radius:2px; margin-right:5px; vertical-align:-1px }
.stc .hands{ font-family:var(--f-mono); font-size:12.5px; color:var(--ink-2); display:grid; gap:2px }
.stc .hands b{ font-weight:700 }
.stc svg.piano,.stc svg.gtr{ width:100%; height:auto; display:block }
.stc .piano .wk{ fill:#fbfaf6; stroke:#8d8b83; stroke-width:.8 }
.stc .piano .bk{ fill:#1d1d1b; stroke:#000; stroke-width:.6 }
.stc .piano .lh{ fill:var(--lh) } .stc .piano .rh{ fill:var(--rh) } .stc .piano .mel{ fill:var(--mel) }
.stc .piano text{ font-family:var(--f-mono); font-size:7px; fill:#77756d }
.stc .gtr .board{ fill:var(--panel-2) }
.stc .gtr .fret{ stroke:var(--line); stroke-width:2 } .stc .gtr .nut{ stroke:var(--ink); stroke-width:5 }
.stc .gtr .str{ stroke:var(--ink-2); }
.stc .gtr .inl{ fill:var(--line) }
.stc .gtr .dot{ fill:var(--rh) } .stc .gtr .mdot{ fill:var(--mel); stroke:var(--panel); stroke-width:2 }
.stc .gtr text{ font-family:var(--f-mono); font-size:11px; fill:var(--ink-2) }
.stc .gtr .dl{ fill:#fff; font-size:10px; font-weight:700 }

.stc .bars{ background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:14px }
.stc .bgrid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(92px,1fr)); gap:6px }
.stc .bc{ border:1px solid var(--line); border-radius:7px; padding:4px 6px 6px; background:var(--bg); display:grid; gap:2px }
.stc .bc.on{ border-color:var(--accent); box-shadow:inset 0 0 0 2px var(--accent) }
.stc .bc .n{ font-family:var(--f-mono); font-size:10px; color:var(--ink-2); cursor:pointer }
.stc .bc .ss{ display:flex; gap:3px }
.stc .bc .cs{ flex:1; text-align:center; background:var(--panel); border:1px solid var(--line); padding:3px 2px; font-size:13px }

.stc .score-wrap{ background:var(--paper); color:var(--paper-ink); border:1px solid var(--line); border-radius:10px; padding:16px; overflow-x:auto }
.stc .score-wrap h3{ color:var(--paper-ink) }
.stc .score-wrap .hint{ color:#5c5b55 }
.stc .srow{ position:relative }
.stc .srow .hl{ position:absolute; top:6px; bottom:6px; background:rgba(246,199,0,.28); border-radius:4px; display:none; pointer-events:none }
.stc .srow .hl.on{ display:block }
.stc .srow svg{ display:block }

/* transport */
.stc .transport{ position:fixed; z-index:99990; left:0; right:0; bottom:0; z-index:40; background:var(--ink); color:var(--bg); padding-block:8px calc(8px + env(safe-area-inset-bottom,0px)); padding-left:max(16px,env(safe-area-inset-left,0px)); padding-right:max(16px,env(safe-area-inset-right,0px)) }
.stc .transport .in{ max-width:1240px; margin:0 auto; display:flex; gap:14px; align-items:center }
.stc .transport .play{ flex:none; width:42px; height:42px; border-radius:50%; border:0; background:var(--accent); color:var(--on-accent); cursor:pointer; display:grid; place-items:center; padding:0 }
.stc .transport .time{ flex:none; font-family:var(--f-mono); font-size:13px; min-width:96px; white-space:nowrap }
.stc .transport .time.total{ min-width:0; opacity:.7 }
.stc .transport .prog{ position:relative; flex:1; min-width:0; height:24px; cursor:pointer; touch-action:none; outline:none }
.stc .transport .prog .trk{ position:absolute; left:0; right:0; top:10px; height:5px; border-radius:3px; background:rgba(127,127,127,.5); overflow:hidden }
.stc .transport .prog i{ display:block; height:100%; width:0; background:var(--accent) }
.stc .transport .knob{ position:absolute; top:5px; left:0; width:15px; height:15px; border-radius:50%; background:var(--accent); transform:translateX(-50%); box-shadow:0 0 0 2px var(--ink); pointer-events:none }
.stc .transport .prog:hover .knob,.stc .transport .prog:focus-visible .knob{ width:19px; height:19px; top:3px }
.stc .transport .prog:focus-visible .knob{ box-shadow:0 0 0 2px var(--ink),0 0 0 4px var(--accent) }

/* sound panel */
.stc .mix{ display:flex; flex-wrap:wrap; gap:10px 26px; align-items:center; background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:10px 14px }
.stc .mix .grp{ display:flex; gap:10px; align-items:center; flex-wrap:wrap }
.stc .mix .check b{ font-weight:700 }

/* note editor */
.stc .ned{ position:sticky; top:8px; z-index:5; display:flex; flex-wrap:wrap; gap:6px; align-items:center; background:var(--ink); color:var(--bg); border-radius:10px; padding:8px 10px; margin:0 0 8px }
.stc .ned .ned-t{ font-family:var(--f-mono); font-size:13px; margin-right:6px }
.stc .ned .btn{ background:var(--panel-2); color:var(--ink) }
.stc .srow .hit{ cursor:pointer }
.stc .srow .hit:hover{ fill:rgba(246,199,0,.25) }

/* any-chord builder */
.stc .anyc{ display:grid; gap:6px }
.stc .anyc .roots{ display:grid; grid-template-columns:repeat(6,1fr); gap:4px }
.stc .anyc .roots button,.stc .anyc .quals button{ border:1px solid var(--line); background:var(--bg); border-radius:6px; padding:4px 0; cursor:pointer; font-family:var(--f-mono); font-weight:700; font-size:13px }
.stc .anyc .quals{ display:flex; flex-wrap:wrap; gap:4px }
.stc .anyc .quals button{ padding:4px 7px }
.stc .anyc button[aria-pressed="true"]{ background:var(--ink); color:var(--bg); border-color:var(--ink) }
.stc .pop .why{ font-size:12px; color:var(--ink-2) }
.stc .chip.rec{ border-color:var(--accent-ink); background:var(--panel-2) }
.stc .bc .cont{ flex:1; text-align:center; font-family:var(--f-mono); font-size:12px; color:var(--ink-2); border:1px dashed var(--line); border-radius:5px; padding:3px 2px; cursor:pointer; background:transparent }

/* popup */
.stc .pop{ position:absolute; z-index:60; width:min(390px,calc(100vw - 32px)); max-height:min(80vh,640px); overflow:auto; background:var(--panel); border:1px solid var(--line); border-radius:12px; box-shadow:0 20px 50px -20px rgba(0,0,0,.5); padding:14px; display:grid; gap:10px }
.stc .pop h4{ margin:0; font-family:var(--f-display); font-stretch:85%; font-weight:800; font-size:17px }
.stc .pop .mel{ font-family:var(--f-mono); font-size:12px; color:var(--ink-2) }
.stc .pop .grp{ display:grid; gap:6px }
.stc .pop .grp .lbl{ font-size:11px }
.stc .pop .opts{ display:flex; flex-wrap:wrap; gap:6px }
.stc .chip{ border:1px solid var(--line); background:var(--bg); border-radius:7px; padding:5px 8px 4px; cursor:pointer; display:grid; gap:1px; min-width:58px; text-align:left }
.stc .chip .a{ font-family:var(--f-mono); font-weight:700; font-size:14px }
.stc .chip .b{ font-size:10px; color:var(--ink-2); display:flex; gap:5px; align-items:center }
.stc .chip .m{ display:inline-block; height:3px; border-radius:2px; background:var(--mel) }
.stc .chip[aria-pressed="true"]{ border-color:var(--ink); box-shadow:inset 0 0 0 1px var(--ink) }
.stc .pop .foot{ display:flex; gap:6px; flex-wrap:wrap; border-top:1px solid var(--line); padding-top:10px }
.stc .pop .x{ position:absolute; right:8px; top:6px; border:0; background:transparent; font-size:20px; cursor:pointer; color:var(--ink-2) }

/* recording overlay */
.stc .ov{ position:fixed; inset:0; z-index:99995; background:rgba(10,10,9,.72); display:grid; place-items:center; padding:16px }
.stc .ov .box{ background:var(--panel); border-radius:14px; padding:24px; width:min(440px,100%); display:grid; gap:14px; justify-items:center; text-align:center }
.stc .ov .phase{ font-family:var(--f-display); font-stretch:80%; font-weight:800; font-size:28px; line-height:1.05 }
.stc .ov .beats{ display:flex; gap:10px }
.stc .ov .beats i{ width:22px; height:22px; border-radius:50%; border:2px solid var(--line) }
.stc .ov .beats i.on{ background:var(--accent); border-color:var(--accent) }
.stc .ov .meter{ width:100%; height:8px; border-radius:4px; background:var(--panel-2); overflow:hidden }
.stc .ov .meter i{ display:block; height:100%; width:0; background:var(--mel); transition:width .06s }
.stc .ov .clock{ font-family:var(--f-mono); font-size:22px }
.stc .busy{ display:flex; gap:12px; align-items:center; background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:14px }
.stc .busy .pb{ flex:1; height:6px; background:var(--panel-2); border-radius:3px; overflow:hidden } .stc .busy .pb i{ display:block; height:100%; width:0; background:var(--accent) }

.stc .foot-note{ color:var(--ink-2); font-size:13px; display:grid; gap:6px }
.stc .foot-note a{ color:var(--accent-ink) }
.stc .vh{ position:absolute!important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0) }

@media (max-width: 980px){ .stc .setup{ grid-template-columns:1fr 1fr } .stc .setup .card:first-child{ grid-column:1/-1 } .stc .desk{ grid-template-columns:1fr } .stc .inst{ position:static } }
@media (max-width: 640px){ .stc .transport .time{ min-width:0 } .stc .transport .time.total{ display:none } .stc .setup{ grid-template-columns:1fr } .stc .keys{ grid-template-columns:repeat(4,1fr) } .stc .ln{ font-size:16px } .stc .now .nm{ font-size:32px }
  .stc .pop{ position:fixed; left:0!important; right:0; bottom:0; top:auto!important; width:auto; border-radius:14px 14px 0 0; max-height:70vh; overflow:auto; padding-bottom:calc(14px + env(safe-area-inset-bottom,0px)) } }
@media (prefers-reduced-motion: reduce){ .stc *{ transition:none!important; animation:none!important } }

/* score interactions */
.stc .srow .csym{ font:700 14px/1 var(--f-mono); fill:#151513; cursor:grab }
.stc .srow .csym:hover,.stc .srow .csym.sel{ fill:#a77700 }
.stc .srow .lyr{ font:13px var(--f-body); fill:#151513; cursor:grab }
.stc .srow .lyr:hover,.stc .srow .lyr.sel{ fill:#a77700; font-weight:700 }
.stc .srow .drag{ fill:#c98a00; cursor:grabbing; font-weight:700 }
.stc .srow .clane{ cursor:copy }
.stc .srow .clane:hover{ fill:rgba(246,199,0,.18) }
.stc .ned .ned-sep{ width:1px; align-self:stretch; background:rgba(255,255,255,.2); margin:0 4px }
.stc .ned .ned-l{ font-size:11px; letter-spacing:.06em; text-transform:uppercase; opacity:.7 }
.stc .ned .btn[aria-pressed="true"]{ background:var(--accent); color:var(--on-accent) }
.stc .ned .dur{ font-size:17px; line-height:1; min-width:34px; justify-content:center }
.stc .ned .check{ color:var(--bg) }
.stc .bc{ position:relative }
.stc .bc .badd{ position:absolute; top:2px; right:4px; border:0; background:transparent; color:var(--ink-2); font:700 14px/1 var(--f-mono); cursor:pointer; padding:0 3px; border-radius:4px }
.stc .bc .badd:hover{ background:var(--accent); color:var(--on-accent) }
.stc .bc .ss{ flex-wrap:wrap }

.stc{ font-size:15px; text-align:left } .stc h1,.stc h2,.stc h3,.stc h4{ text-transform:none; letter-spacing:normal; padding:0; border:0 } .stc .ln.rtl{ text-align:right } .stc textarea,.stc input,.stc select{ box-shadow:none; height:auto; max-width:100% }
/* theme-proofing */
.stc svg{ max-width:none!important; max-height:none!important }
.stc svg.piano,.stc svg.gtr{ width:100%!important; height:auto!important }
.stc .btn{ background:var(--panel-2)!important; box-shadow:none!important; border-radius:8px!important; padding:8px 12px!important; text-transform:none!important; letter-spacing:normal!important }
.stc .btn.sm{ padding:5px 9px!important }
.stc .btn.primary{ background:var(--accent)!important }
.stc .btn.rec{ background:#d6342c!important; color:#fff!important; padding:12px 18px!important }
.stc .key{ background:var(--bg)!important; border-radius:7px!important; padding:8px 0!important; text-transform:none!important; letter-spacing:normal!important; box-shadow:none!important }
.stc .key[aria-pressed="true"]{ background:var(--ink)!important; color:var(--bg)!important }
.stc .seg button{ background:transparent!important; border-radius:0!important; padding:6px 11px!important; text-transform:none!important; letter-spacing:normal!important; box-shadow:none!important }
.stc .seg button[aria-pressed="true"]{ background:var(--accent)!important }
.stc .cs{ background:transparent!important; padding:0 4px!important; border-radius:5px!important; text-transform:none!important; letter-spacing:normal!important; box-shadow:none!important }
.stc .bc .cs{ background:var(--panel)!important; padding:3px 2px!important }
.stc .cs.on{ background:var(--accent)!important }
.stc .chip{ background:var(--bg)!important; padding:5px 8px 4px!important; border-radius:7px!important; text-transform:none!important; letter-spacing:normal!important; box-shadow:none!important }
.stc .transport .play{ background:var(--accent)!important; padding:0!important; border-radius:50%!important; box-shadow:none!important }
.stc .pop .x{ background:transparent!important; padding:0 4px!important; box-shadow:none!important }
.stc h1,.stc h2,.stc h3,.stc h4{ text-transform:none!important; border:0!important }
.stc textarea,.stc input[type=number],.stc select{ height:auto!important; border:1px solid var(--line)!important }
.stc .w .add{ background:transparent!important; padding:1px 5px!important; border-radius:5px!important; box-shadow:none!important; text-transform:none!important; letter-spacing:normal!important; min-width:0!important }
.stc select{ width:auto!important; max-width:100%!important; display:inline-block!important; height:auto!important; min-height:0!important; padding:6px 8px!important; font-size:14px!important; line-height:1.3!important; background:var(--bg)!important; color:var(--ink)!important; border:1px solid var(--line)!important; border-radius:7px!important; margin:0!important }
.stc input[type=checkbox]{ width:auto!important; height:auto!important; margin:0!important; display:inline-block!important }
.stc label.check{ display:inline-flex!important; margin:0!important; font-size:14px!important; font-weight:400!important }
.stc .anyc .roots button,.stc .anyc .quals button{ background:var(--bg)!important; padding:4px 0!important; border-radius:6px!important; text-transform:none!important; letter-spacing:normal!important; box-shadow:none!important }
.stc .anyc .quals button{ padding:4px 7px!important }
.stc .anyc button[aria-pressed="true"]{ background:var(--ink)!important; color:var(--bg)!important }
.stc .bc .cont{ background:transparent!important; padding:3px 2px!important; box-shadow:none!important }
.stc .ned .btn{ background:var(--panel-2)!important; color:var(--ink)!important }
.stc .transport .in{ flex-wrap:nowrap!important }
.stc .btn,.stc label.btn{ display:inline-flex!important; width:auto!important; margin:0!important; float:none!important }
.stc .card > .btn.rec{ display:flex!important; width:100%!important; justify-content:center }
.stc .row{ display:flex!important }
.stc .seg{ display:inline-flex!important; width:auto!important; margin:0!important }
.stc .seg button{ width:auto!important; display:inline-block!important; margin:0!important }
.stc .keys .key{ width:100%!important; display:block!important; margin:0!important }
.stc .anyc .roots button{ width:100%!important; display:block!important; margin:0!important }
.stc .anyc .quals button,.stc .chip,.stc .cs,.stc .w .add,.stc .bc .cont{ width:auto!important; margin:0!important }
.stc .chip{ display:grid!important }
.stc input[type=number]{ width:74px!important; display:inline-block!important; height:auto!important; margin:0!important; padding:6px 8px!important }
.stc .transport .play{ width:42px!important; height:42px!important; min-width:42px!important; padding:0!important; margin:0!important; display:grid!important }
.stc .pop .x{ width:auto!important; display:inline-block!important }
.stc label{ background:transparent!important; padding:0!important; width:auto!important; text-transform:none!important; letter-spacing:normal!important; border:0!important; box-shadow:none!important }
.stc label.check{ display:inline-flex!important; gap:8px; align-items:center; margin:0!important }
.stc .bc .badd{ position:absolute!important; top:2px!important; right:4px!important; width:auto!important; padding:0 3px!important; background:transparent!important; box-shadow:none!important; margin:0!important }
.stc .ned .btn[aria-pressed="true"]{ background:var(--accent)!important; color:var(--on-accent)!important }

/* ===== 1.5.0 ===== */
/* header buttons */
.stc .top h1{ flex:1 }
.stc .topbtns{ display:flex; gap:6px; flex-wrap:wrap }
/* mode + actions bar */
.stc .modebar{ display:flex; gap:10px 14px; align-items:center; flex-wrap:wrap }
.stc .seg.big button{ padding:8px 14px!important; font-size:14px }
.stc .modebar .seg{ background:var(--panel) }
.stc .more{ position:relative }
.stc .more > summary{ list-style:none; cursor:pointer }
.stc .more > summary::-webkit-details-marker{ display:none }
.stc .more .menu{ position:absolute; right:0; top:calc(100% + 6px); z-index:50; background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:8px; display:grid; gap:6px; min-width:220px; box-shadow:0 16px 40px -18px rgba(0,0,0,.5) }
.stc .more .menu .btn{ width:100%!important; justify-content:flex-start }
.stc .btn.danger{ color:#b4281c!important }
.stc .ned .btn.danger{ color:#b4281c!important }
.stc .trv{ font-family:var(--f-mono); font-weight:700; min-width:26px; text-align:center }
.stc .btn:disabled{ opacity:.4; cursor:default }

/* bars: select, add */
.stc .bc{ cursor:pointer }
.stc .bc:hover{ border-color:var(--ink-2) }
.stc .bc.pick{ border-color:var(--ink); box-shadow:inset 0 0 0 2px var(--ink); background:var(--panel) }
.stc .bc .n{ justify-self:start; border:0!important; background:transparent!important; padding:0 3px!important; margin:0!important; font:500 10px/1.4 var(--f-mono)!important; color:var(--ink-2)!important; cursor:pointer; border-radius:4px!important; width:auto!important; box-shadow:none!important; text-transform:none!important }
.stc .bc .n:hover{ background:var(--accent)!important; color:var(--on-accent)!important }
.stc .bc.addbar{ border-style:dashed; color:var(--ink-2); font-weight:600; font-size:13px; display:grid!important; place-items:center; min-height:52px; background:transparent!important; padding:4px!important; margin:0!important; width:auto!important; box-shadow:none!important; text-transform:none!important }
.stc .bc.addbar:hover{ color:var(--accent-ink); border-color:var(--accent-ink) }
.stc .bed{ position:static; margin:0 0 10px }
.stc .score-wrap .bed{ position:sticky }

/* score: bar numbers and picked bars */
.stc .srow .bno{ font:600 11px/1 var(--f-mono); fill:#77756d; pointer-events:none }
.stc .srow .bno.sel{ fill:#a77700 }
.stc .srow .bnohit{ cursor:pointer }
.stc .srow .bnohit:hover{ fill:rgba(246,199,0,.25) }
.stc .srow .hl.pick{ display:block; background:transparent; box-shadow:inset 0 0 0 2px #a77700; background:rgba(246,199,0,.10) }

/* chord popup */
.stc .pop{ width:min(430px,calc(100vw - 32px)) }
.stc .pop .phead{ display:flex; align-items:center; gap:6px; padding-right:26px }
.stc .pop .phead h4{ flex:1; text-align:center }
.stc .pop .nav{ border:1px solid var(--line)!important; background:var(--bg)!important; border-radius:7px!important; width:30px!important; height:28px; padding:0!important; margin:0!important; cursor:pointer; font-size:12px; color:var(--ink); box-shadow:none!important }
.stc .pop .nav:disabled{ opacity:.35; cursor:default }
.stc .pop .ways{ justify-self:start }
.stc .vpanel{ display:grid; gap:8px; background:var(--panel-2); border-radius:10px; padding:10px; border:1px solid var(--line) }
.stc .vpanel .vt{ font-family:var(--f-display); font-stretch:85%; font-weight:800; font-size:15px }
.stc .chip.v{ min-width:0 }
.stc .chip.v .a{ font-size:12.5px; font-family:var(--f-body) }
.stc .chip.v .b{ font-family:var(--f-mono) }
.stc .chip:hover{ border-color:var(--ink-2) }
.stc .pop .foot .btn.primary{ margin-left:auto!important }

/* instruments: capo */
.stc .gtr .capo{ fill:var(--ink-2); opacity:.85 }
.stc .gtr .capol{ font-size:9px; fill:var(--ink-2) }
.stc .row.capo select{ font-size:13px!important }

/* transport extras */
.stc .transport .tb{ flex:none; border:1px solid rgba(255,255,255,.22)!important; background:transparent!important; color:inherit!important; border-radius:8px!important; padding:6px 9px!important; margin:0!important; font:600 13px/1.1 var(--f-body)!important; cursor:pointer; box-shadow:none!important; width:auto!important; text-transform:none!important; white-space:nowrap }
.stc .transport .tb[aria-pressed="true"]{ background:var(--accent)!important; color:var(--on-accent)!important; border-color:var(--accent)!important }
.stc .transport .tsel{ flex:none; background:transparent!important; color:inherit!important; border:1px solid rgba(255,255,255,.22)!important; font-size:13px!important; padding:5px 6px!important }
.stc .transport .tsel option{ color:#151513 }
@media (max-width: 760px){ .stc .transport .tl{ display:none } .stc .transport .in{ gap:8px } }
@media (max-width: 480px){ .stc .transport .tsel, .stc .transport #stc-follow{ display:none } }

/* guide */
.stc .ov.guide .box{ gap:10px }
.stc .ov.guide .g-ic{ width:54px; height:54px; border-radius:50%; background:var(--accent); color:var(--on-accent); display:grid; place-items:center; font:900 26px/1 var(--f-display) }
.stc .ov.guide p{ margin:0; color:var(--ink-2); max-width:36ch }
.stc .btn.linkish{ background:transparent!important; border:0!important; color:var(--ink-2)!important; text-decoration:underline }

/* play mode: a clean screen for playing and singing */
.stc.mode-play .edit-only, .stc.mode-play .modebar .ur, .stc.mode-play .modebar .acts, .stc.mode-play .banner, .stc.mode-play .ned{ display:none!important }
.stc.mode-play .w .add{ display:none!important }
.stc.mode-play .cs{ pointer-events:none; font-size:18px }
.stc.mode-play .ln{ font-size:25px; margin-bottom:20px }
.stc.mode-play .sheet{ padding:26px 26px 30px }
.stc.mode-play .desk{ grid-template-columns:minmax(0,1.7fr) minmax(0,1fr) }
@media (max-width: 980px){ .stc.mode-play .desk{ grid-template-columns:1fr } }
@media (max-width: 640px){ .stc.mode-play .ln{ font-size:20px } }

/* full screen */
.stc:fullscreen{ overflow-y:auto; width:100%; height:100% }
.stc:-webkit-full-screen{ overflow-y:auto; width:100%; height:100% }

/* dark theme */
.stc[data-theme="dark"]{ --bg:#121211; --panel:#1c1c1a; --panel-2:#2a2a27; --ink:#f1f0ea; --ink-2:#a9a79e; --line:#3a3935; --accent-ink:#f6c700; --warn:#ff8a5c; --shadow:none; color-scheme:dark }
.stc[data-theme="dark"] .transport, .stc[data-theme="dark"] .ned{ background:#000; color:#f1f0ea }
.stc[data-theme="dark"] .ned .btn{ background:#2a2a27!important; color:#f1f0ea!important }
.stc[data-theme="dark"] .ned .btn[aria-pressed="true"]{ background:var(--accent)!important; color:var(--on-accent)!important }
.stc[data-theme="dark"] .ned .check{ color:#f1f0ea }
.stc[data-theme="dark"] .transport .knob{ box-shadow:0 0 0 2px #000 }
.stc[data-theme="dark"] .gtr .dl{ fill:#151513 }
.stc[data-theme="dark"] .btn.danger, .stc[data-theme="dark"] .ned .btn.danger{ color:#ff8a7a!important }
.stc[data-theme="dark"] .key[aria-pressed="true"], .stc[data-theme="dark"] .anyc button[aria-pressed="true"]{ background:var(--accent)!important; color:var(--on-accent)!important; border-color:var(--accent)!important }
.stc .btn[hidden], .stc [hidden].btn, .stc .tb[hidden]{ display:none!important }
.stc .top h1{ flex:1 1 auto } .stc .top .lede{ flex:1 1 100%; order:3 }
.stc .srow .bnohit{ stroke:none!important }

/* 1.6.0: lyrics on the recording screen */
.stc .ov .box.has-lyr{ width:min(760px,100%); max-height:calc(100vh - 32px); grid-template-rows:auto auto auto auto auto minmax(0,1fr) auto auto }
.stc .ov-lyr{ width:100%; max-height:44vh; overflow-y:auto; text-align:start; background:var(--bg); border:1px solid var(--line); border-radius:10px; padding:10px 6px; scroll-behavior:smooth; unicode-bidi:plaintext }
.stc .ov-lyr .ol{ font-size:21px; line-height:1.35; padding:5px 12px; border-radius:7px; cursor:pointer; color:var(--ink); transition:background .15s, opacity .15s }
.stc .ov-lyr .ol.sec{ font-family:var(--f-display); font-stretch:85%; font-weight:800; font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--ink-2); cursor:default; padding-top:10px }
.stc .ov-lyr .ol.past{ opacity:.45 }
.stc .ov-lyr .ol.on{ background:var(--accent); color:var(--on-accent); font-weight:700 }
.stc .ov-lyr .ol:not(.sec):hover{ background:var(--panel-2) }
.stc .ov-lyr .ol.on:hover{ background:var(--accent) }
@media (max-width: 640px){ .stc .ov-lyr .ol{ font-size:18px } .stc .ov-lyr{ max-height:38vh } }
