/* PANDA DUO — Partituras */
.partituras { --pt-paper: #fbfaf6; --pt-ink: #1b1d22; display: grid; grid-template-columns: minmax(230px, 280px) 1fr; height: 100%; min-height: 0; background: var(--bg); position: relative; }
.pt-lib { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--panel); }
.pt-libtop { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 10px 6px; align-items: center; }
.pt-libtop > b { flex: 1; font-size: 12px; letter-spacing: 1.5px; color: var(--accent); }
.pt-q { flex: 1 1 100%; order: 3; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; user-select: text; }
.pt-imp { background: var(--accent); color: #fff; border-radius: 10px; padding: 7px 12px; font-weight: 700; cursor: pointer; font-size: 13px; }
.pt-tip { margin: 0 10px 6px; font-size: 11.5px; color: var(--dim); line-height: 1.4; }
.pt-list { overflow-y: auto; flex: 1; padding: 0 8px 16px; display: flex; flex-direction: column; gap: 2px; }
.pt-it { display: flex; align-items: center; gap: 8px; text-align: left; background: none; border: 0; border-radius: 10px; padding: 9px 10px; cursor: pointer; width: 100%; }
.pt-it:hover { background: var(--panel2); }
.pt-it.cur { background: var(--panel2); box-shadow: inset 3px 0 0 var(--accent); }
.pt-it span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pt-it b, .pt-it small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-it small { color: var(--dim); font-size: 12px; }
.pt-it i { font-style: normal; font-size: 10px; font-weight: 800; color: var(--dim); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.pt-empty { color: var(--dim); padding: 12px; }

.pt-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.pt-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pt-back { display: none; background: none; border: 0; font-size: 26px; line-height: 1; padding: 0 6px; cursor: pointer; }
.pt-ttl { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; }
.pt-ttl b { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-ttl small { color: var(--dim); }
.pt-tools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pt-grp { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pt-grp[hidden] { display: none; }
.pt-grp button, .pt-tg, .pt-pb { background: none; border: 0; padding: 6px 10px; cursor: pointer; font-weight: 700; font-size: 13px; }
.pt-grp button:hover, .pt-tg:hover { background: var(--panel2); }
.pt-grp > span { padding: 0 8px; font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.pt-oct { min-width: 64px; text-align: center; color: var(--accent); }
.pt-tom { min-width: 66px; text-align: center; color: var(--accent); }
.pt-tom small { color: var(--dim); font-weight: 600; }
.pt-grp select { background: none; border: 0; padding: 6px 6px 6px 0; font-weight: 700; max-width: 240px; }
.pt-inst > span { padding-right: 2px; }
.pt-view button.on { background: var(--accent); color: #fff; }
.pt-tg { border: 1px solid var(--line); border-radius: 10px; }
.pt-tg.on { color: var(--accent); border-color: var(--accent); background: var(--panel2); }
.pt-note { margin: 8px 14px 0; padding: 7px 12px; border-radius: 10px; background: var(--panel2); font-size: 12.5px; color: var(--dim); }
.pt-note b { color: var(--txt); }
.pt-note[hidden] { display: none; }
.pt-stage { flex: 1; min-height: 0; position: relative; display: flex; margin: 10px 14px 0; }
.pt-scroll { flex: 1; min-height: 0; overflow: auto; position: relative; border-radius: 12px; background: var(--pt-paper); color: var(--pt-ink); }
.pt-paper { position: relative; min-height: 100%; }
.pt-at { min-height: 120px; }
.pt-ink { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 5; }
.pt-penon .pt-ink { pointer-events: auto; touch-action: none; cursor: crosshair; }

/* o cursor (linha e compasso em destaque) só aparece tocando ou depois de tocar num compasso */
.partituras:not(.pt-cur) .pt-at .at-cursor-bar, .partituras:not(.pt-cur) .pt-at .at-cursor-beat { opacity: 0 !important; }

/* botões discretos por cima da partitura */
.pt-fs, .pt-fsx, .pt-fsm { position: absolute; z-index: 8; border: 1px solid rgba(0, 0, 0, .12); background: rgba(255, 255, 255, .55); color: #222; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); cursor: pointer; opacity: .55; transition: opacity .2s; }
.pt-fs:hover, .pt-fsx:hover, .pt-fsm:hover { opacity: 1; }
.pt-fs { top: 10px; right: 18px; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; }
.pt-fs svg { width: 17px; height: 17px; }
.pt-fsx { top: 10px; right: 18px; width: 34px; height: 34px; border-radius: 9px; place-items: center; display: none; padding: 0; }
.pt-fsx svg { width: 17px; height: 17px; }
.pt-fsm { bottom: 16px; right: 18px; width: 46px; height: 46px; border-radius: 50%; font-weight: 900; letter-spacing: 1px; display: none; }

/* tela cheia */
.pt-full .pt-main { position: fixed; inset: 0; z-index: 300; background: var(--pt-paper); display: flex !important; }
.pt-full .pt-bar, .pt-full .pt-note { display: none; }
.pt-full .pt-stage { margin: 0; }
.pt-full .pt-scroll { border-radius: 0; }
.pt-full .pt-fs { display: none; }
.pt-full .pt-fsx, .pt-full .pt-fsm { display: grid; place-items: center; }
.pt-full .pt-play { position: absolute; left: 50%; bottom: 72px; transform: translate(-50%, 12px); z-index: 9; width: max-content; max-width: calc(100% - 24px); background: rgba(24, 26, 32, .88); color: #fff; border-radius: 18px; box-shadow: 0 14px 40px #0006; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; pointer-events: none; transition: none; }
.pt-full.pt-menu .pt-play { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); transition: opacity .2s, transform .2s; }
.pt-full.pt-menu .pt-fsm { opacity: 1; }
.pt-full .pt-play .pt-tg, .pt-full .pt-play .pt-pb { color: #fff; border-color: rgba(255, 255, 255, .25); }
.pt-full .pt-play .pt-tg.on { color: var(--accent); border-color: var(--accent); background: rgba(255, 255, 255, .08); }
.pt-full .pt-play .pt-pos { margin-left: 4px; color: #bbb; }

/* barra da caneta */
.pt-penbar { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 10; display: none; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 16px; background: rgba(24, 26, 32, .9); box-shadow: 0 10px 30px #0005; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); max-width: calc(100% - 16px); flex-wrap: wrap; justify-content: center; }
.pt-penon .pt-penbar { display: flex; }
.pt-marca { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 4px 0 26px; opacity: .7; font: 600 11px/1 -apple-system, system-ui, sans-serif; color: #555; letter-spacing: .3px; }
.pt-marca[hidden] { display: none; }
.pt-marca img { height: 16px; width: auto; display: block; }
.pt-penbar span { width: 1px; height: 22px; background: rgba(255, 255, 255, .2); margin: 0 3px; }
.pt-penbar button { min-width: 32px; height: 32px; border-radius: 9px; border: 1px solid transparent; background: none; color: #fff; cursor: pointer; font-size: 15px; }
.pt-penbar button[data-pc] { width: 26px; min-width: 26px; height: 26px; border-radius: 50%; background: var(--c); border: 2px solid rgba(255, 255, 255, .35); }
.pt-penbar button.hl { border-radius: 6px; opacity: .85; }
.pt-penbar button.on { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.pt-penbar button[data-pt].on { background: rgba(255, 255, 255, .14); box-shadow: none; }
.pt-penbar .ok { background: var(--accent); padding: 0 12px; font-weight: 800; font-size: 13px; }
.pt-tg[data-a="pen"].on { background: var(--accent); color: #fff; border-color: var(--accent); }
.pt-load { position: absolute; top: 20px; left: 0; right: 0; text-align: center; color: #777; margin: 0; }
.pt-load[hidden] { display: none; }
/* cursor e seleção do alphaTab */
.pt-at .at-cursor-bar { background: rgba(255, 138, 61, .14); }
.pt-at .at-cursor-beat { background: #ff6a1a; width: 3px; }
.pt-at .at-selection div { background: rgba(80, 140, 255, .18); }
.pt-at .at-highlight * { fill: #ff6a1a; stroke: #ff6a1a; }

.pt-play { display: flex; align-items: center; gap: 8px; padding: 10px 14px; flex-wrap: wrap; }
.pt-go { width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; font-size: 19px; cursor: pointer; display: grid; place-items: center; box-shadow: 0 6px 18px #0004; }
.pt-go .pa { display: none; } .pt-on .pt-go .pa { display: inline; } .pt-on .pt-go .pl { display: none; }
.pt-on .pt-go { background: var(--play); }
.pt-pb { border: 1px solid var(--line); border-radius: 10px; }
.pt-spd { font-size: 12px; color: var(--dim); display: flex; align-items: center; gap: 5px; }
.pt-spd select { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 5px; }
.pt-pos { margin-left: auto; color: var(--dim); font-variant-numeric: tabular-nums; }

.pt-modal { position: absolute; inset: 0; z-index: 30; background: #0008; display: grid; place-items: center; padding: 12px; }
.pt-modal[hidden] { display: none; }
.pt-mbox { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; width: min(520px, 100%); max-height: 100%; overflow-y: auto; padding: 16px 18px; box-shadow: 0 30px 80px #0007; display: flex; flex-direction: column; gap: 10px; }
.pt-mbox h3 { margin: 0; }
.pt-mbox label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--dim); }
.pt-mbox input, .pt-mbox select { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; user-select: text; color: var(--txt); }
.pt-row { display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 8px; }
.pt-mbox label.pt-chk { flex-direction: row; align-items: center; gap: 8px; font-size: 13px; color: var(--txt); }
.pt-mtip { margin: 0; font-size: 12px; color: var(--dim); line-height: 1.45; }
.pt-mtip b { color: var(--accent); }
.pt-strs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.pt-str { display: flex; align-items: center; gap: 5px; }
.pt-str span { width: 26px; font-weight: 800; color: var(--dim); font-size: 12px; }
.pt-str select { flex: 1; }
.pt-mfoot { display: flex; gap: 8px; align-items: center; }
.pt-mfoot span { flex: 1; }
.pt-mfoot button { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; cursor: pointer; font-weight: 700; }
.pt-mok { background: var(--accent) !important; border-color: var(--accent) !important; color: #fff; }
.pt-mdel { color: #ff5d5d; }

@media (max-width: 760px) {
  .partituras { grid-template-columns: 1fr; }
  .partituras .pt-main { display: none; }
  .partituras.reading .pt-lib { display: none; }
  .partituras.reading .pt-main { display: flex; }
  .pt-back { display: block; }
  .pt-tools { width: 100%; }
  .pt-stage { margin: 8px 6px 0; }
  .pt-row { grid-template-columns: 1fr 1fr; }
}
