/* Cancionero Universal — estilos */

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
:root { --song-font: 15px; --audio-h: 0px; }
body {
  font-family: 'Arial', sans-serif;
  background: #f9fbfd;
  color: #202124;
}
body.has-audio { --audio-h: 64px; padding-bottom: var(--audio-h); }

/* ============ CABECERA ============ */
.chrome { position: sticky; top: 0; z-index: 50; background: #f9fbfd; }
.top-bar { padding: 8px 16px 2px; }
.title-row { display: flex; align-items: flex-start; gap: 12px; }
.title-col { flex: 1; min-width: 0; }
.title-line { display: flex; align-items: center; gap: 10px; }
.brand {
  font-weight: bold; font-size: 15px; letter-spacing: .3px;
  background: linear-gradient(135deg, #4285f4, #34a853);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  white-space: nowrap;
}
.logo {
  width: 40px; height: 40px; flex-shrink: 0;
  background: linear-gradient(135deg, #4285f4, #34a853);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: bold; font-size: 20px;
  margin-top: 4px;
}
.doc-title {
  font-size: 18px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  outline: none;
  width: 100%;
  max-width: 560px;
  background: transparent;
}
.doc-title:hover, .doc-title:focus { border-color: #dadce0; background: white; }
.book-name {
  display: flex; align-items: center; gap: 5px; flex-shrink: 1; min-width: 0; max-width: 260px;
  border: 1px solid #d2e3fc; background: #e8f0fe; color: #174ea6; border-radius: 14px;
  padding: 3px 10px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.book-name:hover { background: #d2e3fc; }
.book-label { overflow: hidden; text-overflow: ellipsis; }
.book-name.unsaved { border-style: dashed; background: #fff; color: #5f6368; }
.book-name.dirty::after { content: '●'; color: #e37400; font-size: 11px; }

/* ============ MONTE CARMELO ============ */
.mc-volver {
  flex-shrink: 0; font-size: 13px; font-weight: 600; color: #2f5d50; text-decoration: none;
  padding: 3px 8px; border-radius: 6px; white-space: nowrap;
}
.mc-volver:hover { background: #e6efe9; }
.mc-drive {
  flex-shrink: 0; border: 1px solid #1a73e8; background: #1a73e8; color: #fff; border-radius: 14px;
  padding: 3px 12px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.mc-drive:hover { background: #1765cc; }
.doc-credits {
  flex-shrink: 0; border: 1px solid #dadce0; background: #fff; color: #5f6368; border-radius: 14px;
  padding: 3px 10px; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.doc-credits:hover { background: #f1f3f4; color: #202124; }
.mc-sesion { flex-shrink: 0; font-size: 12px; color: #5f6368; white-space: nowrap; }
.mc-progreso { width: 100%; height: 8px; margin: 10px 0 4px; }
.mc-lista { list-style: none; max-height: 50vh; overflow: auto; margin: 8px 0; }
.mc-lista li { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid #eee; }
.mc-lista li span { flex: 1; min-width: 0; }
.mc-lista li small { color: #5f6368; display: block; }
.mc-lista li[hidden] { display: none; }
.mc-solo-audio { font-style: normal; font-size: 11px; background: #fef7e0; color: #8a5a00; border: 1px solid #f9d77e; border-radius: 9px; padding: 0 6px; margin-left: 4px; }
.mc-letra { display: block; font-style: italic; }
.mc-letra mark { background: #fde2c8; color: inherit; font-style: normal; border-radius: 3px; padding: 0 2px; }
.mc-campos { display: grid; gap: 6px; margin: 8px 0; }
.mc-campos label { font-size: 13px; font-weight: 600; }
.mc-campos input, .mc-campos select { padding: 6px 8px; font-size: 14px; border: 1px solid #dadce0; border-radius: 4px; }
@media (max-width: 900px) {
  .mc-volver { font-size: 12px; padding: 3px 4px; }
  .mc-sesion { display: none; }
}

/* ============ MENÚ ============ */
.menubar { display: flex; flex-wrap: wrap; gap: 2px; margin: 2px 0 4px; user-select: none; }
.menu { position: relative; }
.menu-title {
  background: transparent; border: none;
  padding: 4px 9px; border-radius: 4px;
  font-size: 14px; color: #202124; cursor: pointer;
}
.menu-title:hover { background: #e8eaed; }
.menu.open .menu-title { background: #d3e3fd; }
.menu-dropdown {
  display: none;
  position: absolute; top: 100%; left: 0; z-index: 1000;
  min-width: 290px;
  background: white;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(60,64,67,.3), 0 6px 18px rgba(60,64,67,.15);
  padding: 6px 0;
}
.menu.open .menu-dropdown { display: block; }
.menu-item {
  position: relative;
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 18px 6px 34px;
  font-size: 14px; cursor: pointer; white-space: nowrap;
}
.menu-item:hover { background: #f1f3f4; }
.menu-item.checked::before { content: '✓'; position: absolute; left: 13px; font-weight: bold; color: #1a73e8; }
.menu-item.disabled { color: #bdc1c6; pointer-events: none; }
.menu-item .shortcut { color: #80868b; font-size: 12px; margin-left: 28px; }
.menu-label { display: inline-flex; align-items: center; gap: 8px; }
.menu-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.menu-sep { height: 1px; background: #e0e0e0; margin: 6px 0; }
.menu-item .sub-arrow { color: #80868b; margin-left: 28px; font-size: 12px; }
.menu.open .menu-item.has-sub > .menu-sub { display: none; top: -6px; left: 100%; min-width: 270px; }
.menu.open .menu-item.has-sub.sub-open > .menu-sub { display: block; }
.menu-item.has-sub.sub-open { background: #f1f3f4; }
.menu-group { padding: 6px 18px 2px; font-size: 11px; color: #80868b; text-transform: uppercase; letter-spacing: .4px; }

/* ============ BARRA DE HERRAMIENTAS ============ */
.toolbar {
  background: #edf2fa;
  padding: 5px 12px;
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  border-radius: 20px;
  margin: 0 12px 6px;
}
.toolbar button {
  background: transparent;
  border: 1px solid transparent;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  color: #444;
  min-width: 32px;
}
.toolbar button:hover { background: #d3e3fd; }
.toolbar .separator { width: 1px; height: 22px; background: #c0c0c0; margin: 0 4px; }
.mode-toggle { margin-left: auto; display: flex; gap: 4px; }
.toolbar .mode-toggle button {
  padding: 5px 14px;
  border: 1px solid #dadce0;
  background: white;
  border-radius: 20px;
  font-size: 13px;
}
.toolbar .mode-toggle button.active { background: #4285f4; color: white; border-color: #4285f4; }
body.mode-atril .edit-only { display: none; }

/* ============ TRANSPOSITOR ============ */
.transposer {
  background: white;
  padding: 10px 16px;
  border-top: 1px solid #e0e0e0;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.transposer-label { font-size: 14px; color: #5f6368; font-weight: 500; }
.notes-container { display: flex; gap: 4px; flex-wrap: wrap; }
.note-btn {
  min-width: 46px; height: 42px;
  border: 2px solid #dadce0;
  background: white;
  border-radius: 21px;
  cursor: pointer;
  font-size: 13px; font-weight: 600;
  color: #202124;
  transition: all 0.2s;
  padding: 0 8px;
}
.note-btn:hover:not(:disabled) { background: #e8f0fe; border-color: #4285f4; transform: translateY(-2px); }
.note-btn:disabled { opacity: .45; cursor: not-allowed; }
.note-btn.active { background: #4285f4; color: white; border-color: #1a73e8; box-shadow: 0 2px 6px rgba(66,133,244,0.4); }
.note-btn.sharp { background: #fff3e0; border-color: #ff9800; }
.note-btn.sharp.active { background: #ff9800; border-color: #e65100; color: white; }
.key-info { font-size: 13px; color: #5f6368; }
.key-info b { color: #d93025; }
.notation-badge {
  background: #34a853; color: white;
  padding: 3px 8px; border-radius: 10px;
  font-size: 11px; font-weight: bold;
  cursor: pointer; margin-left: auto;
}

/* ============ PESTAÑAS ============ */
.tabs {
  display: flex; align-items: flex-end; gap: 3px;
  padding: 6px 12px 0;
  background: #f1f3f4;
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #dadce0;
  overflow-x: auto;
  scrollbar-width: thin;
}
.tab {
  display: flex; align-items: center; gap: 6px;
  max-width: 230px; min-width: 110px;
  padding: 6px 6px 6px 12px;
  background: #e3e6ea;
  border: 1px solid #dadce0; border-bottom: none;
  border-radius: 8px 8px 0 0;
  cursor: pointer; font-size: 13px; color: #3c4043;
  user-select: none;
  margin-bottom: -1px;
  flex-shrink: 0;
}
.tab:hover { background: #eceef1; }
.tab.active { background: white; color: #202124; font-weight: bold; border-bottom: 1px solid white; }
.tab.drag-over { box-shadow: inset 3px 0 0 #1a73e8; }
.tab-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-audio { font-size: 11px; }
.tab-dirty { color: #1a73e8; font-size: 10px; }
.tab-close {
  border: none; background: transparent;
  width: 20px; height: 20px; border-radius: 50%;
  cursor: pointer; color: #5f6368; font-size: 15px; line-height: 1;
}
.tab-close:hover { background: #dadce0; color: #202124; }
.tab-add {
  border: none; background: transparent;
  width: 30px; height: 30px; border-radius: 50%;
  font-size: 20px; color: #5f6368; cursor: pointer;
  margin: 0 0 3px 4px; flex-shrink: 0;
}
.tab-add:hover { background: #dadce0; }

.info-banner {
  background: #e8f0fe;
  color: #1967d2;
  padding: 8px 40px 8px 16px;
  font-size: 13px;
  line-height: 1.5;
  border-bottom: 1px solid #c6dafc;
  position: relative;
}
.info-banner code { background: #d2e3fc; padding: 0 4px; border-radius: 3px; }
.banner-close {
  position: absolute; right: 10px; top: 6px;
  background: transparent; border: none; font-size: 18px; color: #1967d2; cursor: pointer;
}
body.mode-atril .info-banner, body.is-fullscreen .info-banner { display: none; }

/* ============ DOCUMENTO ============ */
.doc-area { padding: 24px 20px 40px; }
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 850px);
  justify-content: center;
  gap: 24px;
}
.document {
  background: white;
  width: 100%;
  min-height: 70vh;
  padding: 50px 60px;
  box-shadow: 0 1px 3px rgba(60,64,67,0.15), 0 4px 8px rgba(60,64,67,0.1);
  color: #202124;
}
body.mode-atril #editorPane { display: none; }
body.mode-edit #viewPane { display: none; }
@media (min-width: 1150px) {
  body.mode-edit.show-preview .workspace { grid-template-columns: repeat(2, minmax(0, 820px)); }
  body.mode-edit.show-preview #viewPane { display: block; }
  body.mode-edit.show-preview .document { padding: 40px 40px; }
}
@media (max-width: 700px) {
  .document { padding: 24px 16px; }
  .doc-area { padding: 12px 6px 30px; }
}

/* El editor imita al atril: misma página, cabecera, letra e interlineado (acordes sin color) */
#editor {
  display: block;
  width: 100%;
  min-height: 500px;
  border: none; outline: none;
  font-family: 'Courier New', monospace;
  font-size: var(--song-font);
  line-height: 1.5;
  resize: none;
  overflow: hidden;
  color: #202124;
  background: transparent;
  tab-size: 4;
}

/* ============ RENDER DE LA CANCIÓN ============ */
.song-render {
  font-family: 'Courier New', monospace;
  font-size: var(--song-font);
  line-height: 1.5;
  overflow-x: auto;
}
.song-header { font-family: Arial, sans-serif; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.song-title { font-size: 1.6em; font-weight: bold; }
.song-meta { font-size: 0.85em; color: #5f6368; margin-top: 4px; }
.song-credits { font-size: 0.8em; font-style: italic; color: #5f6368; margin-top: 2px; cursor: pointer; }
.song-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; font-size: 0.72em; cursor: pointer; }

/* ============ TAGS ============ */
.tag-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 12px;
  background: #e8f0fe; color: #1967d2; font-family: Arial, sans-serif; font-size: 12px; line-height: 1.5;
}
.tag-chip.fam { background: #fce8b2; color: #7a4f01; font-weight: bold; }
.song-tags .tag-chip { font-size: 1em; }
.tag-chip button { border: none; background: none; color: inherit; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 0 0 2px; opacity: .7; }
.tag-chip button:hover { opacity: 1; }
.tag-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; align-items: center; padding: 6px 0; }
.tag-add { display: flex; gap: 8px; margin: 4px 0 10px; }
.tag-add input, .tag-search { flex: 1; width: 100%; box-sizing: border-box; padding: 7px 10px; border: 1px solid #dadce0; border-radius: 6px; font-size: 14px; }
.tag-fams { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tag-fams button {
  border: 1px solid #dadce0; background: white; border-radius: 16px;
  padding: 5px 12px; font-size: 13px; cursor: pointer;
}
.tag-fams button:hover { background: #f1f3f4; }
.tag-fams button.on { background: #1a73e8; border-color: #1a73e8; color: white; }
.tag-hint { font-size: 13px; color: #3c4043; background: #f8f9fa; border-radius: 6px; padding: 8px 10px; margin-bottom: 10px; line-height: 1.7; }
.tag-hint:empty { display: none; }
.tag-groups { max-height: 46vh; overflow: auto; padding-right: 4px; }
.tag-group { margin-bottom: 10px; }
.tag-group > b { display: block; font-size: 12px; color: #5f6368; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.tag-group > div { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-opt {
  border: 1px solid #dadce0; background: white; border-radius: 14px;
  padding: 3px 10px; font-size: 13px; cursor: pointer;
}
.tag-opt:hover { background: #e8f0fe; border-color: #aecbfa; }
.tag-opt.on { background: #e8f0fe; border-color: #1a73e8; color: #1967d2; font-weight: bold; }
.tag-opt.on::before { content: '✓ '; }
.tag-opt small { color: #80868b; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; }
.tag-results { max-height: 50vh; overflow: auto; margin-top: 10px; }
.tag-res-head { font-size: 12px; font-weight: bold; color: #5f6368; text-transform: uppercase; margin: 10px 0 4px; }
.tag-result {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%;
  text-align: left; border: none; border-bottom: 1px solid #f1f3f4; background: none;
  padding: 7px 6px; cursor: pointer; font-size: 14px;
}
.tag-result:hover { background: #f1f3f4; }
.tag-result small { color: #80868b; }
.tag-result > span { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.line { white-space: pre; min-height: 1.5em; }
.chord-line { color: #d93025; font-weight: bold; }
.chord { color: #d93025; font-weight: bold; }
.chord-extra { color: #80868b; font-weight: normal; }
.lyric-line { color: #202124; }
.section-heading {
  font-family: Arial, sans-serif; font-weight: bold; color: #1a73e8;
  margin: 10px 0 2px; white-space: pre-wrap;
}
.section-heading.h1 { font-size: 1.3em; }
.section-heading.h2 { font-size: 1.1em; }
.section-heading.h3 { font-size: 1em; }
.comment-line {
  font-family: Arial, sans-serif; font-style: italic; font-size: 0.9em;
  color: #5f6368;
  background: #fef7e0;
  border-left: 3px solid #f9ab00;
  padding: 3px 10px; margin: 4px 0;
  border-radius: 0 4px 4px 0;
  white-space: pre-wrap;
}
body.hide-comments .comment-line { display: none; }
.voice-section {
  border-left: 4px solid var(--vc);
  background: color-mix(in srgb, var(--vc) 6%, transparent);
  padding: 4px 0 6px 14px;
  margin: 10px 0;
  border-radius: 0 6px 6px 0;
  transition: opacity .2s;
}
.voice-section .lyric-line { color: color-mix(in srgb, var(--vc) 45%, #202124); }
.voice-section.dim { opacity: .3; }
.voice-section.focus { box-shadow: 0 0 0 2px color-mix(in srgb, var(--vc) 35%, transparent); }
.voice-label {
  display: inline-block;
  font-family: Arial, sans-serif; font-size: 11px; font-weight: bold;
  color: white; background: var(--vc);
  padding: 2px 9px; border-radius: 10px; margin: 2px 0 4px;
}
.empty-hint { font-family: Arial, sans-serif; color: #80868b; padding: 30px 0; text-align: center; }
.song-render .chord[data-chord] { cursor: pointer; }
.song-render .chord[data-chord]:hover { text-decoration: underline; }

/* ============ RASGUEOS ============ */
.strum-line {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  white-space: normal; margin: 6px 0;
  font-family: Arial, sans-serif;
}
.strum-name { font-size: 0.85em; font-weight: bold; color: #5f6368; }
.strum-svg { display: block; flex-shrink: 0; }
.strum-fields { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 10px; }
.strum-grid { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0; }
.strum-bar { display: flex; gap: 3px; padding-right: 14px; border-right: 2px solid #bdc1c6; }
.strum-bar:last-child { border-right: none; }
.strum-cell {
  width: 32px; height: 40px; border: 1px solid #dadce0; border-radius: 6px;
  background: white; font-size: 20px; cursor: pointer; position: relative; color: #202124;
}
.strum-cell:hover { background: #e8f0fe; }
.strum-cell.soft { color: #9aa0a6; }
.strum-cell.acc::before { content: '>'; position: absolute; top: -2px; left: 3px; font-size: 11px; font-weight: bold; color: #d93025; }
.strum-preview { min-height: 62px; overflow-x: auto; }

/* ============ HOJAS (partitura / tablatura) ============ */
.sheet-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-family: Arial, sans-serif; font-size: 14px; }
.sheet-bar select { padding: 5px 8px; border: 1px solid #dadce0; border-radius: 6px; }
.sheet-name { font-weight: bold; color: #3c4043; }
.sheet-remove { margin-left: auto; border: 1px solid #dadce0; background: white; border-radius: 14px; padding: 3px 10px; cursor: pointer; font-size: 12px; color: #5f6368; }
.sheet-remove:hover { background: #fce8e6; color: #d93025; }
.sheet-note { font-family: Arial, sans-serif; font-size: 13px; background: #fef7e0; border-left: 3px solid #f9ab00; padding: 4px 10px; margin-bottom: 10px; border-radius: 0 4px 4px 0; }
.sheet-note.ok { background: #e6f4ea; border-color: #34a853; }
.sheet-host { font-family: Arial, sans-serif; }
.sheet-img, .sheet-page { display: block; max-width: 100%; height: auto; margin: 0 auto 12px; }
.sheet-page { box-shadow: 0 0 0 1px #eee; }
.sheet-loading, .sheet-missing { color: #5f6368; padding: 30px 0; text-align: center; line-height: 1.8; }
.sheet-drop {
  border: 2px dashed #bdc1c6; border-radius: 10px; padding: 22px 12px; text-align: center;
  color: #5f6368; font-size: 13px; margin-bottom: 6px;
}
.sheet-drop.over { border-color: #1a73e8; background: #e8f0fe; color: #1a73e8; }
.view-switch { display: flex; border: 1px solid #dadce0; border-radius: 16px; overflow: hidden; }
.atril-controls .view-switch button { border: none; border-radius: 0; padding: 4px 9px; }
.atril-controls .view-switch button + button { border-left: 1px solid #dadce0; }
.atril-controls .view-switch button:disabled { color: #bdc1c6; cursor: default; }

/* ============ PANEL DE ACORDES ============ */
body.show-panel .workspace { grid-template-columns: minmax(0, 850px) 310px; }
@media (min-width: 1150px) {
  body.mode-edit.show-preview.show-panel .workspace { grid-template-columns: repeat(2, minmax(0, 1fr)) 310px; }
}
.side-panel {
  position: sticky; top: calc(var(--chrome-h, 170px) + 8px); align-self: start;
  max-height: calc(100vh - var(--chrome-h, 170px) - var(--audio-h) - 24px); overflow-y: auto;
  background: white; border-radius: 8px;
  box-shadow: 0 1px 3px rgba(60,64,67,0.15), 0 4px 8px rgba(60,64,67,0.1);
  font-family: Arial, sans-serif; font-size: 13px;
}
.panel-head {
  position: sticky; top: 0; z-index: 1; background: white;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px 8px; border-bottom: 1px solid #eee; font-weight: bold; font-size: 14px;
}
.panel-close { border: none; background: none; font-size: 20px; line-height: 1; cursor: pointer; color: #5f6368; width: 28px; height: 28px; border-radius: 50%; }
.panel-close:hover { background: #f1f3f4; color: #202124; }
.panel-sec { padding: 10px 12px; border-bottom: 1px solid #f1f3f4; }
.panel-sec select { width: 100%; padding: 6px 8px; border: 1px solid #dadce0; border-radius: 6px; margin-bottom: 6px; font-size: 13px; background: white; }
.panel-row { display: flex; gap: 6px; }
.panel-row select { flex: 1; }
.panel-link { border: none; background: none; color: #1a73e8; cursor: pointer; font-size: 13px; padding: 0 4px; }
.panel-link:hover { text-decoration: underline; }
.panel-row .panel-link { font-size: 17px; margin-bottom: 6px; }
.panel-strings { margin: 2px 0 6px; }
.panel-capo { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; flex-wrap: wrap; }
.panel-capo button[data-capo="-1"], .panel-capo button[data-capo="1"] {
  width: 24px; height: 24px; border: 1px solid #dadce0; border-radius: 50%; background: white; cursor: pointer;
}
.panel-sec .hint { margin-top: 3px; }
.panel-sec-title { font-size: 11px; color: #80868b; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 8px; }
.panel-tip { background: #e8f0fe; color: #174ea6; border-radius: 6px; padding: 6px 8px; margin-bottom: 8px; line-height: 1.4; }
.chord-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.chord-card {
  border: 1px solid #eee; border-radius: 8px; padding: 4px 4px 2px; text-align: center;
  display: flex; flex-direction: column; align-items: center; min-width: 88px; transition: box-shadow .2s;
}
.chord-card.hl { border-color: #d93025; box-shadow: 0 0 0 2px rgba(217,48,37,.25); }
.chord-name { font-weight: bold; color: #d93025; font-size: 14px; }
.chord-name small { color: #5f6368; font-weight: normal; font-size: 11px; }
.chord-svg { display: block; }
.chord-none { color: #9aa0a6; padding: 30px 6px; font-size: 12px; }
.chord-foot { display: flex; align-items: center; gap: 3px; min-height: 18px; font-size: 10px; color: #80868b; }
.v-nav { border: none; background: #f1f3f4; border-radius: 4px; cursor: pointer; width: 18px; height: 18px; line-height: 1; font-size: 13px; }
.v-nav:hover { background: #d3e3fd; }
.chord-origin { padding: 0 4px; border-radius: 6px; background: #f1f3f4; }
.chord-origin.tradicional { background: #e6f4ea; color: #137333; }
.chord-origin.calculada { background: #fef7e0; color: #8a6100; }
.panel-strum { margin-bottom: 8px; overflow-x: auto; }
.panel-strum .strum-name { margin-bottom: 2px; }
.inst-list { margin-bottom: 10px; }
.inst-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid #f1f3f4; flex-wrap: wrap; }
.inst-row b { min-width: 150px; }
.inst-row select, .pick-row select { padding: 6px 8px; border: 1px solid #dadce0; border-radius: 6px; font-size: 13px; }
.inst-capo { display: flex; align-items: center; gap: 4px; font-size: 13px; color: #5f6368; }
.inst-capo input { width: 56px; padding: 5px; border: 1px solid #dadce0; border-radius: 6px; }
.inst-row .btn { margin-left: auto; padding: 4px 10px; font-size: 12px; }
.about-credits { margin-top: 14px; font-size: 12px; color: #5f6368; line-height: 1.6; text-align: left; }
@media (max-width: 900px) {
  body.show-panel .workspace { grid-template-columns: minmax(0, 1fr); }
  .side-panel { position: static; max-height: none; }
}

/* ============ ATRIL ============ */
.atril-controls {
  display: none;
  position: fixed; right: 16px; bottom: calc(var(--audio-h) + 16px); z-index: 40;
  background: white; border-radius: 24px; padding: 6px 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
  align-items: center; gap: 6px; font-size: 13px;
}
body.mode-atril .atril-controls { display: flex; }
.atril-controls button {
  border: 1px solid #dadce0; background: white; border-radius: 16px;
  padding: 4px 10px; cursor: pointer; font-size: 13px;
}
.atril-controls button.on { background: #1a73e8; color: white; border-color: #1a73e8; }
.atril-controls input[type=range] { width: 110px; accent-color: #1a73e8; }
.atril-controls button.round { width: 28px; height: 28px; padding: 0; font-size: 16px; line-height: 1; }
.scroll-level { min-width: 22px; text-align: center; font-weight: bold; color: #1a73e8; }

/* ============ AUDIO (solo controles, abajo) ============ */
.audio-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: var(--audio-h);
  background: #f1f3f4;
  border-top: 1px solid #dadce0;
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px;
}
.audio-bar audio { flex: 1; height: 44px; min-width: 0; }
.audio-bar select { max-width: 240px; padding: 6px; border: 1px solid #dadce0; border-radius: 6px; background: white; }
.relink-btn {
  border: 1px solid #1a73e8; background: #e8f0fe; color: #1a73e8; border-radius: 16px;
  padding: 6px 12px; cursor: pointer; font-size: 13px; white-space: nowrap;
}
.relink-btn:hover { background: #d2e3fc; }
.page-btn {
  border: none; background: #c4302b; color: white; border-radius: 22px;
  padding: 10px 20px; cursor: pointer; font-size: 15px; font-weight: 600; white-space: nowrap;
}
.page-btn:hover { background: #a52722; }
.install-title { font-size: 15px; margin: 16px 0 6px; }
.install-step .install-get { display: inline-block; text-decoration: none; }
.install-cmd { display: flex; gap: 8px; align-items: center; background: #202124; border-radius: 8px; padding: 8px 8px 8px 12px; }
.install-cmd code { flex: 1; color: #e8eaed; font-size: 13px; overflow-wrap: anywhere; user-select: all; }
.install-other { font-size: 13px; color: #5f6368; }
.install-skip { margin-top: 10px; font-size: 13px; text-align: right; }
.install-skip a { color: #5f6368; }
.install-status { padding: 8px 12px; background: #f1f3f4; border-radius: 8px; }
.install-spin {
  display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px;
  border: 2px solid #1a73e8; border-right-color: transparent; border-radius: 50%; animation: install-spin .8s linear infinite;
}
@keyframes install-spin { to { transform: rotate(360deg); } }
.audio-bar.page-mode audio, .audio-bar.page-mode .speed { display: none; }
.audio-bar.page-mode { justify-content: center; }
.audio-bar.yt-mode audio { display: none; }
.audio-bar.yt-mode { justify-content: center; }
.audio-bar.yt-mode .page-btn { min-width: 170px; }

/* YouTube dentro de la app (mini ventana; YouTube pide al menos 200x200 px visibles) */
.yt-mini {
  position: fixed; z-index: 1200; left: 0; top: 0;
  width: 200px; background: #0f0f0f; border-radius: 10px; overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,.35);
}
.yt-mini.big { width: min(480px, calc(100vw - 16px)); }
.yt-mini.dragging { opacity: .85; }
.yt-mini-bar {
  display: flex; align-items: center; gap: 2px; padding: 2px 4px 2px 8px;
  color: #e8eaed; font-size: 12px; cursor: grab; touch-action: none; user-select: none;
}
.yt-mini.dragging .yt-mini-bar { cursor: grabbing; }
.yt-mini-grip { flex: 1; white-space: nowrap; }
.yt-mini-bar button {
  border: none; background: none; color: #e8eaed; cursor: pointer;
  width: 34px; height: 30px; border-radius: 6px; font-size: 16px; line-height: 1;
}
.yt-mini-bar button:active, .yt-mini-bar button:hover { background: rgba(255,255,255,.15); }
.yt-mini-video { width: 200px; height: 200px; }
.yt-mini.big .yt-mini-video { width: 100%; height: auto; aspect-ratio: 16 / 9; min-height: 200px; }
.yt-mini-video iframe { display: block; width: 100%; height: 100%; border: 0; }
.pick-row { display: flex; align-items: center; gap: 10px; }
.speed { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.speed button { border: none; background: none; cursor: pointer; font-size: 16px; padding: 4px; border-radius: 6px; }
.speed button:hover { background: #e2e5e8; }
.speed input { width: 110px; accent-color: #1a73e8; }
.speed .speed-label { font-size: 13px; font-weight: bold; min-width: 48px; color: #5f6368; }
.speed .speed-label.slow { color: #1a73e8; }
.speed .speed-label.fast { color: #d93025; }
@media (max-width: 640px) { .speed input { width: 70px; } }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--audio-h) + 24px);
  transform: translateX(-50%) translateY(20px);
  background: #323232; color: white;
  padding: 10px 18px; border-radius: 6px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 2000;
  max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ DIÁLOGOS ============ */
dialog {
  border: none; border-radius: 12px; padding: 0;
  width: min(520px, 92vw);
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  margin: auto;
}
dialog.wide { width: min(780px, 94vw); }
dialog::backdrop { background: rgba(32,33,36,.45); }
dialog form { padding: 20px 24px; }
dialog h2 { font-size: 18px; margin-bottom: 12px; }
.modal-body { font-size: 14px; line-height: 1.5; }
.modal-body p { margin: 6px 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.btn { padding: 8px 16px; border-radius: 6px; border: 1px solid #dadce0; background: white; cursor: pointer; font-size: 14px; }
.btn:hover { background: #f1f3f4; }
.btn.primary { background: #1a73e8; color: white; border-color: #1a73e8; }
.btn.primary:hover { background: #1765cc; }
.btn:disabled, .btn:disabled:hover { opacity: .4; cursor: default; }
.field { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; font-size: 13px; color: #5f6368; }
.field input, .field select { padding: 8px 10px; border: 1px solid #dadce0; border-radius: 6px; font-size: 14px; color: #202124; }
.hint { font-size: 12px; color: #5f6368; }
.field small { color: #80868b; }
.field textarea { padding: 8px 10px; border: 1px solid #dadce0; border-radius: 6px; font: inherit; font-size: 14px; color: #202124; resize: vertical; }
.support-copy { padding: 2px 10px; font-size: 12px; margin: 0 4px; }
.support-form { background: #f8f9fa; border: 1px solid #e8eaed; border-radius: 10px; padding: 4px 16px 12px; margin: 12px 0; }
.support-check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: #3c4043; margin-top: 4px; }
.support-honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.support-sent { padding: 14px 0 6px; font-size: 15px; }
.support-thanks { border-top: 1px solid #e8eaed; padding-top: 10px; }
.support-thanks h3 { font-size: 15px; margin-bottom: 6px; }
.support-names { columns: 2; margin: 6px 0 10px 18px; font-weight: 600; }
.advanced { margin-top: 10px; font-size: 13px; color: #5f6368; }
.advanced summary { cursor: pointer; user-select: none; }
.modal-error { color: #d93025; font-size: 13px; min-height: 1em; margin-top: 6px; }
.modal-textarea {
  width: 100%; min-height: 320px; margin-top: 8px;
  font-family: 'Courier New', monospace; font-size: 13px;
  border: 1px solid #dadce0; border-radius: 6px; padding: 10px; resize: vertical;
}
.book-list { max-height: 160px; overflow-y: auto; margin: 6px 0 6px 22px; font-size: 13px; }
.about { text-align: center; }
.about .logo { width: 64px; height: 64px; font-size: 32px; margin: 0 auto 10px; border-radius: 14px; }
.about-name { font-size: 20px; font-weight: bold; }
.about table { margin: 14px auto 0; border-collapse: collapse; text-align: left; }
.about th { color: #5f6368; font-weight: normal; padding: 4px 14px 4px 0; vertical-align: top; }
.about td { font-weight: bold; padding: 4px 0; }
.about-path { font-family: 'Courier New', monospace; font-size: 12px; word-break: break-all; max-width: 320px; }
.syntax-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.syntax-table td { border-bottom: 1px solid #eee; padding: 6px 4px; vertical-align: top; }
.syntax-table code { font-family: 'Courier New', monospace; background: #f1f3f4; padding: 1px 5px; border-radius: 3px; white-space: pre; }

/* ============ VISTA PREVIA DE IMPRESIÓN ============ */
body.pv-open { overflow: hidden; }
.pv {
  position: fixed; inset: 0; z-index: 3000;
  display: grid; grid-template-columns: 330px 1fr;
  background: #e8eaed; font-family: Arial, sans-serif;
}
.pv-side {
  background: white; overflow-y: auto; padding: 16px 18px 0;
  box-shadow: 2px 0 6px rgba(0,0,0,.12);
  display: flex; flex-direction: column; gap: 14px;
}
.pv-side h2 { font-size: 18px; }
.pv-group { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #3c4043; }
.pv-group > b { font-size: 12px; color: #5f6368; text-transform: uppercase; letter-spacing: .3px; }
.pv-group > b .hint { text-transform: none; letter-spacing: 0; font-weight: normal; }
.pv-question { background: #e8f0fe; border-radius: 8px; padding: 10px 12px; }
.pv-question > b { color: #1967d2; }
.pv-seg { display: flex; border: 1px solid #dadce0; border-radius: 8px; overflow: hidden; background: white; }
.pv-seg label { flex: 1; position: relative; }
.pv-seg input { position: absolute; opacity: 0; pointer-events: none; }
.pv-seg span { display: block; height: 100%; text-align: center; padding: 6px 6px; cursor: pointer; font-size: 13px; border-left: 1px solid #dadce0; }
.pv-seg label:first-child span { border-left: none; }
.pv-seg span:hover { background: #f1f3f4; }
.pv-seg input:checked + span { background: #1a73e8; color: white; }
.pv-seg input:focus-visible + span { outline: 2px solid #174ea6; outline-offset: -2px; }
.pv-side input[type=text], .pv-side select { padding: 6px 8px; border: 1px solid #dadce0; border-radius: 6px; font-size: 13px; width: 100%; }
.pv-side input[type=range] { width: 100%; accent-color: #1a73e8; }
.pv-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.pv-songs { max-height: 190px; overflow-y: auto; border: 1px solid #e0e0e0; border-radius: 6px; padding: 4px 8px; }
.pv-songs label { display: flex; gap: 6px; align-items: center; padding: 2px 0; cursor: pointer; }
.pv-row { display: flex; gap: 6px; }
.btn.small { padding: 4px 10px; font-size: 12px; }
.export-head { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #5f6368; margin: 12px 0 4px; }
.export-head span { flex: 1; font-weight: bold; }
.export-list { max-height: 36vh; overflow: auto; border: 1px solid #e0e0e0; border-radius: 6px; padding: 6px 10px; }
.export-list label { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 14px; cursor: pointer; }
.export-embed { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; font-size: 14px; font-weight: bold; cursor: pointer; }
.export-embed input { margin-top: 2px; }
.slide-themes { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.slide-themes label { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.slide-swatch { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 26px;
  border: 1px solid #bdc1c6; border-radius: 4px; font: bold 15px Arial, sans-serif; }
.share-file { font-size: 15px; overflow-wrap: anywhere; }
.linkish { border: none; background: none; color: #1a73e8; cursor: pointer; font-size: 12px; text-decoration: underline; padding: 0; }
.pv-tip { font-size: 12px; line-height: 1.5; color: #5f6368; background: #fef7e0; border-left: 3px solid #f9ab00; padding: 6px 10px; border-radius: 0 6px 6px 0; }
.pv-status { font-size: 13px; line-height: 1.5; }
.pv-status ul { margin: 4px 0 0 18px; }
.pv-status p + p { margin-top: 4px; }
.pv-warn { color: #d93025; }
.pv-actions {
  display: flex; gap: 8px; justify-content: flex-end;
  margin-top: auto; position: sticky; bottom: 0;
  background: white; padding: 10px 0 14px; border-top: 1px solid #eee;
}
.pv-stage { overflow: auto; position: relative; }
.pv-zoombar {
  position: sticky; top: 0; z-index: 2;
  display: flex; gap: 6px; align-items: center; justify-content: center;
  padding: 8px; background: rgba(232,234,237,.94); font-size: 13px; color: #3c4043;
}
.pv-sheets { padding: 8px 24px 40px; }
.pv-empty { text-align: center; color: #5f6368; padding: 40px; }
.pv-wrap { width: max-content; margin: 0 auto 26px; }
.pv-label { font-size: 13px; color: #5f6368; margin-bottom: 4px; }
.pv-page { position: relative; background: white; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.25); color: #202124; }
.pv-cols { position: absolute; display: grid; }
.pv-col { overflow: hidden; }
.pv-col .song-header { margin-bottom: .7em; padding-bottom: .35em; }
.pv-col .voice-section { margin: .3em 0; padding: .2em 0 .3em .8em; }
.pv-col .voice-section.dim { opacity: 1; }
.pv-col .section-heading { margin: .15em 0 0; }
.pv-item, .pv-unit { display: flow-root; }
.pv-item { padding-bottom: .6em; }
.pv-foot { position: absolute; left: 0; right: 0; bottom: 5mm; text-align: center; font-size: 9pt; color: #80868b; }
.pv-book-cover { position: absolute; font-family: Arial, sans-serif; }
.pv-book-cover h1 { font-size: 26pt; text-align: center; margin-bottom: 10mm; }
.pv-book-cover ol { list-style: none; font-size: 12pt; line-height: 1.7; counter-reset: idx; }
.pv-book-cover ol.two { columns: 2; column-gap: 10mm; font-size: 10pt; }
.pv-book-cover li { display: flex; gap: 6px; break-inside: avoid; counter-increment: idx; }
.pv-book-cover li::before { content: counter(idx) '.'; color: #80868b; min-width: 2em; }
.pv-book-cover li i { flex: 1; border-bottom: 1px dotted #bdc1c6; margin-bottom: .45em; }
/* Solo letra (público y asamblea): la línea larga baja con sangría, sin cortar palabras */
.pv-lyrics { font-family: Arial, sans-serif; line-height: 1.3; }
.pv-lyrics .line { white-space: pre-wrap; min-height: 0; padding-left: 1em; text-indent: -1em; }
.pv-lyrics .line.blank { display: none; }
.pv-lyrics .section-heading { font-size: .72em; text-transform: uppercase; letter-spacing: .5px; color: #5f6368; }
.pv-lyrics .pv-item { padding-bottom: .5em; }
.pv-song-title { font-weight: bold; font-size: 1.12em; border-bottom: 1px solid #bdc1c6; margin-bottom: .3em; padding-bottom: .1em; }
.pv-cover { text-align: center; padding: .3em 0 .8em; }
.pv-cover-title { font-size: 1.5em; font-weight: bold; line-height: 1.15; }
.pv-cover-sub { font-size: .85em; color: #5f6368; margin-top: .25em; }
.pv-cover ol { text-align: left; margin: 1em 0 0 1.4em; font-size: .85em; line-height: 1.5; }
.pv-panel { position: absolute; top: 0; bottom: 0; }
.pv-num { position: absolute; top: 2mm; right: 3mm; font-size: 10px; color: #9aa0a6; }
.pv-stage .pv-panel + .pv-panel { border-left: 1px dashed #c6c9cc; }
.pv-stage .pv-item { cursor: pointer; }
.pv-stage .pv-item:hover { background: rgba(26,115,232,.08); }
.pv-stage .pv-item.pv-break { box-shadow: inset 0 3px 0 #1a73e8; }
@media (max-width: 800px) {
  .pv { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .pv-side { max-height: 45vh; }
}

/* ============ COLECCIÓN (canciones, audios y videos de las carpetas) ============ */
.book-picker {
  position: fixed; z-index: 1350; right: 16px;
  top: calc(var(--chrome-h, 170px) + 8px);
  bottom: calc(var(--audio-h) + 16px);
  width: min(420px, calc(100vw - 32px));
  display: flex; flex-direction: column; gap: 8px;
  background: white; border-radius: 12px; padding: 12px 14px;
  box-shadow: 0 6px 28px rgba(0,0,0,.25);
  font-family: Arial, sans-serif; font-size: 14px;
}
.book-picker.drop-over { box-shadow: 0 0 0 3px #1a73e8, 0 6px 28px rgba(0,0,0,.25); }
.bp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; font-size: 16px; }
.bp-source { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.book-picker .bp-search { flex: none; }
.book-picker > * { flex-shrink: 0; }
.bp-tags { margin: 0; max-height: 92px; overflow-y: auto; }
.book-picker .bp-list { flex: 1 1 auto; flex-shrink: 1; }
.bp-list { flex: 1; min-height: 80px; overflow-y: auto; border: 1px solid #e0e0e0; border-radius: 8px; overscroll-behavior: contain; }
.bp-row {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: start;
  padding: 8px 10px; border-bottom: 1px solid #f1f3f4; cursor: pointer;
}
.bp-row:hover { background: #f8f9fa; }
.bp-row input { width: 20px; height: 20px; margin-top: 1px; accent-color: #1a73e8; }
.bp-row:has(input:checked) { background: #e8f0fe; }
.bp-title { display: flex; flex-direction: column; min-width: 0; }
.bp-title small { color: #80868b; font-size: 11px; overflow-wrap: anywhere; }
.bp-chips { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px; }
.bp-chips .tag-chip { font-size: 11px; padding: 0 7px; }
.bp-empty { padding: 20px 12px; text-align: center; }
.bp-drop {
  border: 2px dashed #bdc1c6; border-radius: 8px; padding: 8px; text-align: center;
  color: #5f6368; font-size: 12px;
}
.book-picker.drop-over .bp-drop { border-color: #1a73e8; background: #e8f0fe; color: #1a73e8; }
.cl-folders { width: 100%; font-size: 13px; }
.cl-folders[open] { max-height: 30vh; overflow-y: auto; }
.cl-folders > summary { cursor: pointer; color: #3c4043; font-weight: bold; padding: 2px 0; }
.cl-folder { display: flex; align-items: center; gap: 8px; padding: 4px 2px; border-bottom: 1px solid #f1f3f4; }
.cl-folder-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-folder small { color: #80868b; white-space: nowrap; }
.cl-folder.locked .cl-folder-name { color: #80868b; }
.cl-folder .cl-main { color: #188038; }
.cl-remove { border: none; background: none; color: #80868b; cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; }
.cl-remove:hover { color: #d93025; }
.cl-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.cl-kinds { margin: 0; }
.cl-tag-btn { border: none; background: none; cursor: pointer; font-size: 13px; padding: 0 2px; opacity: .6; }
.cl-tag-btn:hover { opacity: 1; }
.bp-foot { display: flex; align-items: center; gap: 8px; }
.bp-count { flex: 1; font-size: 13px; color: #5f6368; }
@media (pointer: coarse) { .bp-drop { display: none; } }

/* ============ GRABAR ============ */
.rec-panel { bottom: auto; max-height: calc(100vh - var(--chrome-h, 170px) - var(--audio-h) - 24px); overflow-y: auto; z-index: 1360; }
.rc-error { background: #fce8e6; color: #a50e0e; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.rc-meter { width: 100%; height: 26px; border-radius: 6px; display: block; }
.rc-status { min-height: 18px; font-size: 12px; }
.rc-status[data-kind="clip"] { color: #d93025; font-weight: bold; }
.rc-status[data-kind="limit"] { color: #b06000; }
.rc-status[data-kind="low"] { color: #b06000; }
.rc-controls { display: flex; align-items: center; gap: 10px; }
.rc-rec {
  width: 52px; height: 52px; border-radius: 50%; border: 3px solid #dadce0; background: white;
  display: grid; place-items: center; cursor: pointer; flex: none;
}
.rc-rec span { width: 24px; height: 24px; border-radius: 50%; background: #d93025; transition: border-radius .15s; }
.rc-rec:hover:not(:disabled) { border-color: #d93025; }
.rc-rec:disabled { cursor: default; }
.rc-rec:disabled:not(.on) span { background: #f6aea9; }
.rc-rec.on { border-color: #d93025; animation: rc-pulse 1.2s ease-in-out infinite; }
.rc-rec.on span { border-radius: 4px; background: #d93025; }
@keyframes rc-pulse { 50% { box-shadow: 0 0 0 6px rgba(217,48,37,.2); } }
.rc-time { font: bold 22px/1 monospace; min-width: 64px; color: #202124; }
.rc-time.paused { color: #80868b; animation: rc-blink 1s steps(2) infinite; }
@keyframes rc-blink { 50% { opacity: .3; } }
.rc-controls .btn { flex: 1 1 auto; }
.rc-settings > summary { cursor: pointer; color: #3c4043; font-weight: bold; font-size: 13px; padding: 2px 0; }
.rc-settings .field input[type=range] { width: 100%; }
.rc-check { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 6px 0; font-size: 13px; }
.rc-check small { flex-basis: 100%; padding-left: 24px; }
.rc-take { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid #e0e0e0; padding-top: 8px; }
.rc-preview { width: 100%; }

/* ============ TELÉFONO Y TABLET ============ */
/* Piezas que solo aparecen en pantallas chicas */
.menu-toggle, .key-toggle, .key-sheet-head, .banner-more, .fit-btn { display: none; }
.key-sheet { display: contents; }
.menu-sub.flip { left: auto !important; right: 100%; }

.drawer { position: fixed; inset: 0; z-index: 2500; background: rgba(32,33,36,.45); }
.drawer-panel {
  position: absolute; top: 0; bottom: 0; left: 0; width: min(86vw, 340px);
  background: white; overflow-y: auto; overscroll-behavior: contain;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  box-shadow: 2px 0 12px rgba(0,0,0,.25);
  animation: drawer-in .18s ease-out;
}
@keyframes drawer-in { from { transform: translateX(-100%); } }
.drawer-head {
  position: sticky; top: 0; z-index: 1; background: white;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px 16px; border-bottom: 1px solid #eee;
}
.drawer .drawer-head .logo { display: flex; margin: 0; width: 34px; height: 34px; font-size: 18px; }
.drawer .drawer-head .brand { display: block; flex: 1; font-size: 16px; }
.drawer-menu > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 18px; font-size: 16px; font-weight: bold; color: #202124;
  border-bottom: 1px solid #f1f3f4;
}
.drawer-menu > summary::-webkit-details-marker { display: none; }
.drawer-menu > summary::after { content: '▾'; color: #80868b; transition: transform .15s; }
.drawer-menu[open] > summary::after { transform: rotate(180deg); }
.drawer-menu[open] > summary { background: #f8f9fa; }
.drawer-items { padding: 4px 0 8px; }
.drawer-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: none; background: none; text-align: left; cursor: pointer;
  padding: 11px 18px 11px 34px; font-size: 15px; color: #202124; position: relative;
}
.drawer-item:active { background: #e8f0fe; }
.drawer-item:disabled { color: #bdc1c6; }
.drawer-item.checked::before { content: '✓'; position: absolute; left: 13px; font-weight: bold; color: #1a73e8; }
.drawer-group { padding: 10px 18px 2px; font-size: 11px; color: #80868b; text-transform: uppercase; letter-spacing: .4px; }
.drawer-sep { height: 1px; background: #eee; margin: 6px 0; }
.drawer-sub > summary { list-style: none; padding: 11px 18px 11px 34px; font-size: 15px; cursor: pointer; display: flex; justify-content: space-between; }
.drawer-sub > summary::-webkit-details-marker { display: none; }
.drawer-sub > summary::after { content: '▸'; color: #80868b; }
.drawer-sub[open] > summary::after { content: '▾'; }
.drawer-sub .drawer-item { padding-left: 50px; }
.drawer-sub .drawer-item.checked::before { left: 30px; }

.sheet-backdrop { position: fixed; inset: 0; z-index: 1490; background: rgba(32,33,36,.35); }
.install-hint {
  position: fixed; left: 8px; right: 8px; z-index: 1300;
  bottom: calc(var(--atril-h, 0px) + var(--audio-h) + 10px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 8px;
  background: #202124; color: white; border-radius: 12px; padding: 8px 8px 8px 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,.3); font-size: 14px;
}
.install-hint span { flex: 1; }
.install-hint .panel-close { color: #e8eaed; }
.install-steps { margin: 8px 0 4px 20px; line-height: 1.9; }
.install-steps b { white-space: nowrap; }

/* Teléfono */
@media (max-width: 700px) {
  :root { --atril-h: 0px; }
  body.has-audio { --audio-h: calc(56px + env(safe-area-inset-bottom)); }
  body.mode-atril { --atril-h: 52px; }

  .top-bar { padding: calc(4px + env(safe-area-inset-top)) 8px 4px; }
  .title-row { align-items: center; gap: 6px; }
  .logo, .brand, .menubar { display: none; }
  .menu-toggle {
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 42px; height: 42px; border: none; border-radius: 50%;
    background: transparent; font-size: 22px; color: #3c4043; cursor: pointer;
  }
  .menu-toggle:active { background: #e8eaed; }
  .doc-title { font-size: 16px; max-width: none; padding: 6px 8px; }
  .book-name { max-width: 34vw; padding: 5px 8px; }
  .book-icon { display: none; }

  .toolbar {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin: 0 6px 4px; padding: 3px 6px; border-radius: 14px;
  }
  .toolbar::-webkit-scrollbar { display: none; }
  .toolbar button { min-width: 38px; min-height: 38px; padding: 4px 8px; flex-shrink: 0; }
  .toolbar #btnNotation { display: none; }
  .toolbar .mode-toggle { position: sticky; right: -6px; background: #edf2fa; padding: 0 6px 0 4px; box-shadow: -6px 0 6px -4px rgba(0,0,0,.15); }
  .toolbar .mode-toggle button { padding: 4px 12px; font-size: 16px; }
  .mode-toggle .lbl { display: none; }

  .transposer { padding: 6px 10px; gap: 8px; flex-wrap: nowrap; }
  .transposer-label { display: none; }
  .key-toggle {
    display: block; border: 1px solid #dadce0; background: white; border-radius: 18px;
    padding: 7px 14px; font-size: 15px; font-weight: 600; color: #202124; cursor: pointer;
  }
  .key-toggle:active { background: #e8f0fe; }
  .key-sheet {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1500;
    background: white; border-radius: 16px 16px 0 0;
    padding: 6px 14px calc(16px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0,0,0,.2);
    transform: translateY(110%); transition: transform .2s ease-out; visibility: hidden;
  }
  body.key-open .key-sheet { transform: none; visibility: visible; }
  .key-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 0 10px; font-size: 16px; }
  .key-sheet .notes-container { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
  .key-sheet .note-btn { min-width: 0; height: 48px; padding: 0 2px; font-size: 14px; }
  .key-sheet .key-info { display: block; margin-top: 12px; font-size: 14px; }

  .tabs { padding: 4px 6px 0; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { min-width: 92px; max-width: 170px; padding: 9px 6px 9px 11px; font-size: 14px; }
  .tab:not(.active) .tab-close { display: none; }
  .tab-close { width: 26px; height: 26px; }
  .tab-add { width: 38px; height: 38px; }

  .info-banner { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 8px 110px 8px 10px; font-size: 12px; }
  .banner-more {
    display: block; position: absolute; right: 40px; top: 5px;
    border: 1px solid #aecbfa; background: white; color: #1967d2; border-radius: 12px;
    padding: 2px 9px; font-size: 12px; cursor: pointer;
  }
  .banner-close { top: 4px; font-size: 22px; }
  body.banner-full .info-banner { white-space: normal; padding-right: 40px; }
  body.banner-full .banner-more { display: none; }

  .doc-area { padding: 6px 0 calc(var(--atril-h) + 24px); }
  .document { padding: 16px 12px 24px; box-shadow: none; min-height: 60vh; }
  #editor { font-size: max(16px, var(--song-font)); white-space: pre; overflow-x: auto; overflow-y: hidden; overflow-wrap: normal; }
  body.editing-focus .top-bar, body.editing-focus .transposer, body.editing-focus .tabs { display: none; }
  body.editing-focus .toolbar { margin-top: calc(4px + env(safe-area-inset-top)); }

  .atril-controls {
    left: 0; right: 0; bottom: var(--audio-h);
    border-radius: 0; gap: 4px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    justify-content: space-between; flex-wrap: wrap;
    box-shadow: 0 -1px 6px rgba(0,0,0,.15);
  }
  body.has-audio .atril-controls { padding-bottom: 6px; }
  .atril-controls { gap: 2px; padding-left: 6px; padding-right: 6px; }
  .atril-controls button { min-width: 38px; min-height: 38px; padding: 4px 6px; font-size: 14px; }
  .atril-controls button.round { width: 36px; height: 36px; min-width: 36px; }
  .scroll-level { min-width: 16px; }
  .atril-controls input[type=range] { display: none; }
  .atril-controls .view-switch { order: -1; width: 100%; justify-content: center; }
  .atril-controls .view-switch button { flex: 1; }
  .fit-btn { display: inline-block; }
  .atril-controls .fit-btn.on { background: #e8f0fe; color: #1967d2; border-color: #aecbfa; }
  body.autoscrolling .atril-controls > :not(#btnScroll):not(.round):not(.scroll-level) { display: none; }
  body.autoscrolling .atril-controls { justify-content: center; gap: 14px; background: rgba(255,255,255,.92); }

  .audio-bar { gap: 4px; padding: 0 6px env(safe-area-inset-bottom); }
  .audio-bar audio { height: 40px; }
  .audio-bar select { max-width: 28vw; }
  .speed input { display: none; }
  .speed .speed-label { min-width: 40px; }
  .page-btn { padding: 9px 14px; font-size: 14px; }

  .panel-close { width: 36px; height: 36px; font-size: 24px; }

  dialog, dialog.wide {
    width: 100%; max-width: 100%; margin: auto 0 0;
    max-height: 94vh; max-height: 94dvh;
    border-radius: 16px 16px 0 0; overscroll-behavior: contain;
  }
  dialog form { padding: 16px 14px 0; }
  dialog h2 { font-size: 17px; padding-right: 8px; }
  .modal-actions {
    position: sticky; bottom: 0; z-index: 2; background: white;
    margin: 12px -14px 0; padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid #f1f3f4;
  }
  .modal-actions .btn { flex: 1 1 auto; min-height: 44px; }
  .field input, .field select, .field textarea, .tag-add input, .tag-search,
  .panel-sec select, .pv-side input[type=text], .pv-side select { font-size: 16px; }
  .modal-textarea { min-height: 40vh; font-size: 16px; }
  .strum-fields { grid-template-columns: 1fr 1fr; }
  .support-names { columns: 1; }
  .inst-row b { min-width: 0; flex-basis: 100%; }
  .about-path { max-width: 220px; }
  .toast { bottom: calc(var(--atril-h) + var(--audio-h) + 16px); }

  .book-picker {
    left: 0; right: 0; top: auto; bottom: 0; width: 100%;
    max-height: 75vh; max-height: 75dvh; height: 75dvh;
    border-radius: 16px 16px 0 0; padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
  .bp-search { font-size: 16px; }
  .bp-foot .btn { min-height: 42px; }
  .rec-panel { height: auto; max-height: 85dvh; }
  .rc-controls .btn { min-height: 44px; }
  .rc-take .field input { font-size: 16px; }
}

/* Panel de acordes como hoja inferior cuando no cabe al costado */
@media (max-width: 900px), (max-width: 950px) and (max-height: 500px) {
  body.show-panel .workspace { grid-template-columns: minmax(0, 1fr); }
  .side-panel {
    position: fixed; left: 0; right: 0; top: auto; z-index: 1400;
    bottom: calc(var(--atril-h, 0px) + var(--audio-h));
    max-height: 52vh; max-height: 52dvh; overscroll-behavior: contain;
    border-radius: 16px 16px 0 0; box-shadow: 0 -4px 20px rgba(0,0,0,.2);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .chord-grid { justify-content: center; }
}

/* Teléfono acostado: cabecera de una sola línea para dejar ver la canción */
@media (max-width: 950px) and (max-height: 500px) {
  .chrome { position: relative; }
  .key-info { display: none; }
  .doc-area { padding: 8px 8px 30px; }
  .document { padding: 20px 24px; }
  .top-bar { padding: 2px 8px 0; }
  .title-row { align-items: center; gap: 6px; }
  .logo, .brand, .menubar { display: none; }
  .menu-toggle {
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 38px; height: 38px; border: none; border-radius: 50%;
    background: transparent; font-size: 20px; color: #3c4043; cursor: pointer;
  }
  .doc-title { font-size: 16px; padding: 3px 8px; }
  .transposer { padding: 4px 10px; }
  .note-btn { height: 36px; }
  .tab { padding-top: 6px; padding-bottom: 6px; min-height: 0; }
  .side-panel { max-height: 70vh; max-height: 70dvh; }
}

/* Pantallas táctiles (tablet y teléfono): objetivos más grandes */
@media (pointer: coarse) {
  .menu-title { padding: 8px 12px; font-size: 15px; }
  .menu-item { padding: 11px 20px 11px 36px; font-size: 15px; }
  .toolbar button { min-height: 40px; min-width: 40px; }
  .atril-controls button { min-height: 40px; min-width: 40px; }
  .atril-controls button.round { width: 40px; height: 40px; }
  .tab-close { width: 28px; height: 28px; }
  .tab { min-height: 40px; }
  .v-nav { width: 28px; height: 28px; }
  .panel-capo button[data-capo="-1"], .panel-capo button[data-capo="1"] { width: 34px; height: 34px; }
  .btn { min-height: 40px; }
  .speed button { padding: 8px; }
  .fit-btn { display: inline-block; }
}
@media (hover: none) {
  .note-btn:hover:not(:disabled) { transform: none; }
}

/* ============ MODO NOCHE (solo el atril, para el escenario) ============ */
/* Negro y blanco muy contrastados para no deslumbrar; los acordes en amarillo se distinguen de la letra */
@media screen {
  :root:has(body.night.mode-atril) { color-scheme: dark; background: #000; }
  body.night.mode-atril { background: #000; color: #fff; }
  body.night.mode-atril .chrome { background: #000; }
  body.night.mode-atril .menu-title, body.night.mode-atril .menu-toggle { color: #e8eaed; }
  body.night.mode-atril .menu-title:hover, body.night.mode-atril .menu.open .menu-title { background: #262626; }
  body.night.mode-atril .menu-dropdown { background: #1a1a1a; box-shadow: 0 0 0 1px #333, 0 6px 18px rgba(0,0,0,.6); }
  body.night.mode-atril .menu-item { color: #e8eaed; }
  body.night.mode-atril .menu-item:hover, body.night.mode-atril .menu-item.has-sub.sub-open { background: #333; }
  body.night.mode-atril .menu-item.disabled { color: #5f6368; }
  body.night.mode-atril .menu-sep { background: #333; }
  body.night.mode-atril .doc-title { color: #fff; }
  body.night.mode-atril .doc-title:hover, body.night.mode-atril .doc-title:focus { background: #111; border-color: #444; }
  body.night.mode-atril .book-name { background: #111; border-color: #444; color: #e8eaed; }
  body.night.mode-atril .toolbar, body.night.mode-atril .toolbar .mode-toggle { background: #111; }
  body.night.mode-atril .toolbar button { color: #e8eaed; }
  body.night.mode-atril .toolbar button:hover { background: #333; }
  body.night.mode-atril .toolbar .separator { background: #444; }
  body.night.mode-atril .toolbar .mode-toggle button { background: #000; border-color: #555; }
  body.night.mode-atril .toolbar .mode-toggle button.active { background: #fff; color: #000; border-color: #fff; }
  body.night.mode-atril .transposer { background: #000; border-color: #333; }
  body.night.mode-atril .transposer-label, body.night.mode-atril .key-info { color: #bbb; }
  body.night.mode-atril .key-info b { color: #ffd400; }
  body.night.mode-atril .note-btn, body.night.mode-atril .key-toggle { background: #000; border-color: #555; color: #fff; }
  body.night.mode-atril .note-btn:hover:not(:disabled) { background: #222; border-color: #fff; }
  body.night.mode-atril .note-btn.sharp { background: #1a1400; border-color: #b38f00; }
  body.night.mode-atril .note-btn.active { background: #fff; color: #000; border-color: #fff; box-shadow: none; }
  body.night.mode-atril .notation-badge { background: #333; }
  body.night.mode-atril .key-sheet { background: #111; }
  body.night.mode-atril .tabs { background: #000; border-color: #333; }
  body.night.mode-atril .tab { background: #111; border-color: #333; color: #bbb; }
  body.night.mode-atril .tab:hover { background: #1a1a1a; }
  body.night.mode-atril .tab.active { background: #000; color: #fff; border-bottom-color: #000; }
  body.night.mode-atril .tab-close, body.night.mode-atril .tab-add, body.night.mode-atril .panel-close { color: #aaa; }
  body.night.mode-atril .tab-close:hover, body.night.mode-atril .tab-add:hover, body.night.mode-atril .panel-close:hover { background: #333; color: #fff; }
  body.night.mode-atril .document { background: #000; color: #fff; box-shadow: none; }
  body.night.mode-atril .song-header { border-color: #333; }
  body.night.mode-atril .song-meta, body.night.mode-atril .song-credits, body.night.mode-atril .strum-name { color: #bbb; }
  body.night.mode-atril .lyric-line { color: #fff; }
  body.night.mode-atril .chord-line, body.night.mode-atril .chord, body.night.mode-atril .chord-name { color: #ffd400; }
  body.night.mode-atril .chord-extra { color: #9e9e9e; }
  body.night.mode-atril .section-heading { color: #8ab4f8; }
  body.night.mode-atril .comment-line { background: #1a1a1a; color: #e0e0e0; border-color: #b38f00; }
  body.night.mode-atril .voice-section { background: color-mix(in srgb, var(--vc) 14%, #000); }
  body.night.mode-atril .voice-section .lyric-line { color: color-mix(in srgb, var(--vc) 30%, #fff); }
  body.night.mode-atril .empty-hint, body.night.mode-atril .sheet-loading, body.night.mode-atril .sheet-missing { color: #9e9e9e; }
  body.night.mode-atril .strum-svg, body.night.mode-atril .chord-svg,
  body.night.mode-atril .sheet-img, body.night.mode-atril .sheet-page { filter: invert(1) hue-rotate(180deg); }
  body.night.mode-atril .sheet-bar, body.night.mode-atril .sheet-name { color: #e8eaed; }
  body.night.mode-atril .sheet-bar select, body.night.mode-atril .sheet-remove { background: #000; color: #fff; border-color: #555; }
  body.night.mode-atril .sheet-note { background: #1a1a1a; color: #e0e0e0; }
  body.night.mode-atril .tag-chip { background: #1a2433; color: #aecbfa; }
  body.night.mode-atril .side-panel, body.night.mode-atril .panel-head { background: #111; color: #e8eaed; border-color: #333; }
  body.night.mode-atril .panel-sec { border-color: #262626; }
  body.night.mode-atril .panel-sec select { background: #000; color: #fff; border-color: #555; }
  body.night.mode-atril .panel-tip { background: #1a2433; color: #cfe2ff; }
  body.night.mode-atril .chord-card { border-color: #333; }
  body.night.mode-atril .chord-name small, body.night.mode-atril .chord-foot { color: #9e9e9e; }
  body.night.mode-atril .v-nav, body.night.mode-atril .chord-origin { background: #333; color: #e8eaed; }
  body.night.mode-atril .atril-controls { background: #111; box-shadow: 0 0 0 1px #333, 0 2px 10px rgba(0,0,0,.6); }
  body.night.mode-atril .atril-controls button { background: #000; border-color: #555; color: #fff; }
  body.night.mode-atril .atril-controls button.on { background: #fff; color: #000; border-color: #fff; }
  body.night.mode-atril .atril-controls .view-switch { border-color: #555; }
  body.night.mode-atril .atril-controls .view-switch button:disabled { color: #5f6368; }
  body.night.mode-atril.autoscrolling .atril-controls { background: rgba(0,0,0,.9); }
  body.night.mode-atril .scroll-level { color: #fff; }
  body.night.mode-atril .audio-bar { background: #111; border-color: #333; }
  body.night.mode-atril .audio-bar select { background: #000; color: #fff; border-color: #555; }
  body.night.mode-atril .speed button:hover { background: #333; }
  body.night.mode-atril .speed .speed-label { color: #bbb; }
  body.night.mode-atril .drawer-panel, body.night.mode-atril .drawer-head { background: #111; border-color: #333; }
  body.night.mode-atril .drawer-menu > summary, body.night.mode-atril .drawer-item, body.night.mode-atril .drawer-sub > summary { color: #e8eaed; border-color: #222; }
  body.night.mode-atril .drawer-menu[open] > summary { background: #1a1a1a; }
  body.night.mode-atril .drawer-item:disabled { color: #5f6368; }
  body.night.mode-atril .drawer-sep { background: #333; }
}

/* ============ IMPRESIÓN ============ */
.print-all { display: none; }
@media print {
  .chrome, .info-banner, .audio-bar, .atril-controls, .toast, #editorPane, .side-panel, .sheet-bar, .sheet-note,
  .drawer, .sheet-backdrop, .install-hint, .key-sheet, .yt-mini, .book-picker { display: none !important; }
  .strum-line svg { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: white; padding: 0 !important; }
  .doc-area { padding: 0; }
  .workspace { display: block !important; }
  #viewPane { display: block !important; box-shadow: none; padding: 0; min-height: 0; }
  .song-render { overflow: visible; }
  .chord, .chord-line, .voice-label, .voice-section, .comment-line {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .voice-section.dim { opacity: 1; }

  body.printing-all > *:not(#printAll) { display: none !important; }
  body.printing-all .print-all { display: block; }
  #printAll .pv-wrap { margin: 0; }
  #printAll .pv-page { box-shadow: none; break-after: page; }
  #printAll .pv-wrap:last-child .pv-page { break-after: auto; }
  #printAll * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pv-only { display: none !important; }
}
