/* Estilos das seções (o resto vem do Bootstrap e de /lib/core/base.css). */

/* Início */
.tile { transition: transform .12s, box-shadow .12s; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--bs-box-shadow-sm); }
.tile .bi { font-size: 1.6rem; }

/* Listas de músicas */
.song-rows .list-group-item { display: flex; align-items: center; gap: .75rem; }
.song-rows .main { flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.song-rows .main strong, .song-rows .main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-rows .main small { color: var(--bs-secondary-color); }
.song-rows .num { width: 1.6em; text-align: right; color: var(--bs-secondary-color); font-variant-numeric: tabular-nums; }
.song-rows .handle { cursor: grab; color: var(--bs-secondary-color); padding: 6px 2px; touch-action: none; user-select: none; }
.song-rows .ctrls { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.song-rows .ghost { opacity: .4; }
.song-rows .playing { background: var(--bs-primary-bg-subtle); }
.song-rows .playing .main strong::before { content: "♪ "; color: var(--bs-primary); }
.song-rows .thumb { width: 72px; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--bs-border-radius); background: var(--bs-secondary-bg); flex: none; }
@media (max-width: 640px) {
  .song-rows .list-group-item { flex-wrap: wrap; row-gap: 6px; }
  .song-rows .main { flex-basis: calc(100% - 70px); }
  .song-rows .ctrls { flex-basis: 100%; justify-content: flex-start; padding-left: 2.4rem; }
  .song-rows.plain .ctrls { padding-left: 0; }
}
.keybadge { font-weight: 700; white-space: nowrap; }
.keybadge .from { font-weight: 400; opacity: .7; }

/* Cifra */
.keyctl .bigkey { font-size: 1.5rem; font-weight: 700; color: var(--bs-primary); min-width: 4.5rem; text-align: center; }
.pager a { min-width: 0; }
.pager a span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notation { overflow-x: auto; background: #fff; border-radius: var(--bs-border-radius); padding: 6px; color: #111; }
@media (min-width: 1000px) { .editor-preview { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; } }
textarea.code { font-family: var(--bs-font-monospace); font-size: .92rem; }

/* Modo rolagem */
.stage { position: fixed; inset: 0; z-index: 1050; display: flex; flex-direction: column; background: var(--bs-body-bg); }
.stage .scroller { flex: 1; overflow-y: auto; }
.stage .sheet { border: 0; border-radius: 0; background: transparent; max-width: 900px; margin: 0 auto; padding: 38vh 20px 70vh; }
.stage .guide { position: absolute; left: 0; right: 0; top: 34vh; height: 0; border-top: 2px dashed rgba(var(--bs-primary-rgb), .45); pointer-events: none; }
.stage .ln, .stage .section, .stage .chords-only { transition: opacity .2s; opacity: .55; }
.stage .now { opacity: 1; }
.stage .now .tx { text-decoration: underline 3px rgba(var(--bs-primary-rgb), .55); text-underline-offset: 6px; }
.stage .controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--bs-tertiary-bg); border-top: 1px solid var(--bs-border-color); }
.beat { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--bs-secondary-bg); border: 1px solid var(--bs-border-color); }
.beat.on { background: var(--bs-primary); }
.beat.on.accent { background: var(--bs-warning); }

/* Timbres */
.macro { display: grid; grid-template-columns: 8rem 1fr 5.5rem; align-items: center; gap: .5rem; min-height: 2.4rem; }
.macro output { text-align: right; font-size: .9rem; color: var(--bs-secondary-color); font-variant-numeric: tabular-nums; }
.macro select, .macro input[type=number] { grid-column: 2 / 4; }

/* Sintetizador: teclado */
.kb-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; box-shadow: 0 -4px 16px rgb(0 0 0 / .08); }
body.has-kb main { padding-bottom: 260px !important; }
body.has-kb.has-dock .dock { bottom: 230px; }
.piano { position: relative; height: 130px; user-select: none; touch-action: none; -webkit-user-select: none; }
.pk { position: absolute; top: 0; cursor: pointer; }
.pk.white { bottom: 0; background: #fafafa; border: 1px solid #9aa0a6; border-radius: 0 0 6px 6px; z-index: 1; display: flex; align-items: flex-end; justify-content: center; }
.pk.white span { font-size: .7rem; color: #666; padding-bottom: 4px; pointer-events: none; }
.pk.black { height: 60%; background: #23262b; border-radius: 0 0 4px 4px; z-index: 2; }
.pk.on { background: var(--bs-primary) !important; }
.pk.white.on span { color: #fff; }
.harm-canvas { touch-action: none; cursor: crosshair; background: var(--bs-tertiary-bg); }
@media (max-width: 575px) { .piano { height: 110px; } }

/* ---------------------------------------------------------------- DAW (no jeito do FL Studio) */
.daw-main { display: grid; gap: .5rem; grid-template-columns: 1fr; }
@media (min-width: 1200px) { .daw-main { grid-template-columns: minmax(440px, 40%) minmax(0, 1fr); align-items: start; } }
.daw-rack { background: var(--bs-tertiary-bg); min-width: 0; }
.rack-rows { display: flex; flex-direction: column; gap: 3px; max-height: 420px; overflow: auto; }
.rack-row { display: grid; grid-template-columns: 16px 26px 26px 54px 92px minmax(0, 1fr) auto auto; align-items: center; gap: 4px; padding: 2px 4px; border-radius: 4px; border-left: 3px solid var(--c); background: var(--bs-body-bg); }
.rack-row.sel { outline: 2px solid var(--bs-primary); outline-offset: -1px; }
.rack-led { width: 12px; height: 12px; border-radius: 50%; border: 1px solid #555; background: #444; padding: 0; }
.rack-led.on { background: #3fb950; box-shadow: 0 0 6px #3fb950; }
.rack-knob { width: 26px; height: 6px; accent-color: var(--c); }
.rack-ins { font-size: .7rem; padding: 0 2px; height: 22px; max-width: 54px; border-radius: 3px; border: 1px solid var(--bs-border-color); background: var(--bs-body-bg); color: var(--bs-body-color); }
.rack-name { font-size: .75rem; text-align: left; border: 1px solid var(--bs-border-color); border-radius: 3px; padding: 1px 6px; background: color-mix(in srgb, var(--c) 18%, var(--bs-body-bg)); color: var(--bs-body-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rack-steps { display: grid; grid-template-columns: repeat(var(--n), minmax(9px, 1fr)); gap: 2px; min-width: 0; }
.rack-steps .step { height: 20px; padding: 0; border: 1px solid #0003; border-radius: 3px; background: #c8ccd2; }
.rack-steps .step.odd { background: #e2a8a8; }
.rack-steps .step.on { background: var(--c); box-shadow: inset 0 0 0 2px #fff6; }
.rack-steps .step.now { outline: 2px solid var(--bs-warning); outline-offset: -2px; }
[data-bs-theme="dark"] .rack-steps .step { background: #3a3f47; }
[data-bs-theme="dark"] .rack-steps .step.odd { background: #5a3b3f; }
[data-bs-theme="dark"] .rack-steps .step.on { background: var(--c); }
.rack-mini { width: 100%; height: 22px; background: color-mix(in srgb, var(--c) 12%, var(--bs-body-bg)); border-radius: 3px; cursor: pointer; }
.rack-roll { padding: 0 4px; }
@media (max-width: 575.98px) { .rack-row { grid-template-columns: 16px 54px 78px minmax(0, 1fr) auto auto; } .rack-row .rack-knob { display: none; } }
.daw-pl { min-width: 0; overflow: hidden; }
.daw-arrange { display: flex; overflow: hidden; user-select: none; -webkit-user-select: none; }
.daw-heads { flex: 0 0 110px; border-right: 1px solid var(--bs-border-color); background: var(--bs-body-bg); }
.daw-ruler-cell { border-bottom: 1px solid var(--bs-border-color); }
.pl-head { display: flex; align-items: center; gap: 6px; padding: 0 6px; border-bottom: 1px solid var(--bs-border-color); }
.pl-head.muted { opacity: .55; }
.daw-tl { flex: 1 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden; }
.tl-spacer, .pr-spacer { position: relative; }
.tl-canvas { position: sticky; left: 0; display: block; touch-action: none; }
.pr-scroll { height: 320px; overflow: auto; }
.pr-canvas { position: sticky; left: 0; top: 0; display: block; touch-action: none; }
.pr-vel { display: block; height: 64px; touch-action: none; }
.daw-pos { font-variant-numeric: tabular-nums; min-width: 10rem; }
.daw-recording { animation: daw-blink 1s steps(2, start) infinite; }
@keyframes daw-blink { to { opacity: .55; } }
.daw-meter { height: 4px; background: var(--bs-tertiary-bg); border-radius: 2px; overflow: hidden; }
.daw-meter > div { height: 100%; width: 0; background: var(--bs-success); }
.daw-meter > div.clip, .vmeter > div.clip { background: var(--bs-danger); }
.mix-strips { min-width: 0; }
.mix-strip { flex: 0 0 78px; border: 1px solid var(--bs-border-color); border-top: 3px solid var(--c); border-radius: 4px; padding: 4px; background: var(--bs-body-bg); }
.mix-strip.sel { outline: 2px solid var(--bs-primary); outline-offset: -1px; }
.mix-strip.muted { opacity: .6; }
.mix-name { width: 100%; font-size: .72rem; border: 0; background: none; color: var(--bs-body-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0; text-align: left; }
.mix-num { display: inline-block; min-width: 1.2em; font-weight: 700; color: var(--bs-secondary-color); }
.mix-btn { --bs-btn-padding-x: .3rem; --bs-btn-padding-y: 0; --bs-btn-font-size: .7rem; }
.mix-pan { height: 1rem; }
.mix-fxdots { display: flex; gap: 2px; justify-content: center; margin-top: 4px; min-height: 6px; }
.mix-fxdots i { width: 6px; height: 6px; border-radius: 50%; background: var(--bs-secondary-bg); }
.mix-fxdots i.on { background: var(--bs-success); }
.mix-add { flex: 0 0 40px; }
.mix-detail { min-width: 0; }
.mix-slot summary { list-style: none; cursor: pointer; }
.mix-slot summary::-webkit-details-marker { display: none; }
.vfader { writing-mode: vertical-lr; direction: rtl; height: 120px; width: 24px; }
.vmeter { width: 8px; height: 120px; background: var(--bs-tertiary-bg); border-radius: 3px; display: flex; align-items: flex-end; overflow: hidden; }
.vmeter > div { width: 100%; height: 0; background: var(--bs-success); }
.ae-canvas { display: block; }
.rec-menu { width: 20rem; }
