/* cancion.css — Chrome for standalone song ("cancionero") pages under /canciones.
   Ported from the sibling "cancionero" project's assets/site.css: header, title
   bar with the transpose/zoom/hide-chords controls, teleprompter, and the chord
   diagram modal. The song text itself (.letra/.sobre/.c) is styled encapsulated
   inside <song-sheet>'s shadow root (see ../../shared/song-sheet.45c18c885c.js) — this file
   only styles the page chrome around it. Self-contained (own tokens) so this
   page doesn't depend on site.css. */

:root {
  --ink: #1a1a1a;
  --ink-soft: #555;
  --paper: #fdfaf5;
  --rule: #d8d2c4;
  --accent: #8b0000;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans:
    -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --max-width: 760px;
}

html {
  background: var(--paper);
}

body {
  font-family: var(--serif);
  color: var(--ink);
  background: var(--paper);
  max-width: var(--max-width);
  margin: 1.15rem auto 6rem;
  padding: 0 1.5rem;
  line-height: 1.55;
  font-size: 19px;
}

body.has-song-scroll-region {
  height: 100vh;
  overflow: hidden;
  margin-bottom: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

.privacy-link {
  margin: 5rem 0 0;
  font-family: var(--sans);
  font-size: 0.82rem;
  text-align: right;
}
.privacy-link a {
  color: var(--ink-soft);
  border-bottom: none;
  text-decoration: none;
}
.privacy-link a:hover {
  text-decoration: underline;
}

/* ----- Header / logo ----- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding-bottom: 0.85rem;
  margin-bottom: 1.15rem;
  border-bottom: 1px solid var(--rule);
}
.site-header a.brand {
  display: grid;
  grid-template-columns: 40px auto;
  align-items: center;
  column-gap: 0.7rem;
  border-bottom: none;
  text-decoration: none;
  color: var(--ink);
}
.site-header a.brand:hover {
  color: var(--accent);
}
.site-header .logo {
  width: 40px;
  height: 40px;
  flex: none;
  display: block;
  background: url("../assets/guitar-player-cubist-left-head.0c63192349.svg") center / contain no-repeat;
}
.site-header .logo > * {
  display: none;
}
.site-header .wordmark {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.site-header .wordmark small {
  display: block;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

/* ----- Widget de transposición (inyectado por song-sheet.js en el header) ----- */

.site-header .transpose {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--sans);
}
.site-header .transpose button {
  appearance: none;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0;
}
.site-header .transpose .t-down,
.site-header .transpose .t-up {
  width: 1.6rem;
  height: 1.6rem;
  line-height: 1;
  border-radius: 50%;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.site-header .transpose .t-current {
  width: 6rem;
  border: none;
  text-align: center;
  font-family: var(--sans);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--accent);
}
.site-header .transpose .t-current.is-transposed {
  color: var(--accent-strong, var(--accent));
}
.site-header .transpose button:hover,
.site-header .transpose button:focus-visible {
  color: var(--accent);
  outline: none;
}
.site-header .transpose .t-down:hover,
.site-header .transpose .t-up:hover,
.site-header .transpose .t-down:focus-visible,
.site-header .transpose .t-up:focus-visible {
  border-color: currentColor;
}

@media print {
  .site-header {
    display: none;
  }
}

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 {
  font-size: 2.2rem;
  margin: 0 0 0.08rem;
  line-height: 1.05;
}

.song-titlebar {
  position: relative;
  margin: 0 0 0.2rem;
  z-index: 7;
}

.song-heading {
  min-width: 0;
  padding-right: 2.8rem;
}

.song-titlebar h1 {
  margin: 0;
  font-size: 1.5em;
}

.song-titlebar .lead {
  margin: 0.1rem 0 0;
}

.song-controls {
  position: absolute;
  top: 0;
  right: -0.18rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  width: auto;
  padding: 0.18rem 0.08rem;
  border-radius: 14px;
  background: transparent;
  isolation: isolate;
  z-index: 6;
}

.song-controls::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: color-mix(in srgb, var(--paper) 5%, transparent);
  backdrop-filter: blur(1.5px) saturate(0.95);
  -webkit-backdrop-filter: blur(1.5px) saturate(0.95);
  mask-image: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.8) 48%,
    rgba(0, 0, 0, 0.35) 78%,
    transparent 100%
  );
  -webkit-mask-image: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.8) 48%,
    rgba(0, 0, 0, 0.35) 78%,
    transparent 100%
  );
  z-index: -1;
  pointer-events: none;
}

.teleprompter-slot {
  position: relative;
  width: 2.7rem;
  min-height: 2.3rem;
  flex: 0 0 2.3rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.chord-toggle {
  appearance: none;
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--ink-soft);
  cursor: pointer;
  border-radius: 999px;
  padding: 0;
  flex: 0 0 2.7rem;
  width: 2.7rem;
  height: 2.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform-origin: center;
}

.chord-toggle svg {
  width: 1.75rem;
  height: 1.75rem;
  stroke-width: 1.65;
}

.chord-toggle:hover,
.chord-toggle:focus-visible {
  outline: none;
}

.chord-toggle[aria-pressed="false"] {
  color: var(--ink-soft);
}

.chord-toggle[aria-pressed="true"] {
  color: var(--accent);
}

.teleprompter-toggle {
  appearance: none;
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0;
  width: 2.7rem;
  height: 2.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  -webkit-tap-highlight-color: transparent;
  transform-origin: center;
  transition:
    color 160ms ease,
    opacity 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.teleprompter-toggle svg {
  width: 1.55rem;
  height: 1.55rem;
  stroke-width: 1.8;
}

.teleprompter-toggle:hover,
.teleprompter-toggle:focus-visible,
.teleprompter-toggle[aria-pressed="true"] {
  color: var(--accent);
  outline: none;
}

.teleprompter-toggle.is-zero,
.teleprompter-toggle.is-zero:hover,
.teleprompter-toggle.is-zero:focus-visible,
.teleprompter-toggle.is-zero[aria-pressed="true"] {
  color: #111;
}

.teleprompter-countdown {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-size: clamp(5rem, 22vw, 12rem);
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 19;
  transition:
    opacity 140ms ease,
    visibility 0s linear 140ms;
}

.teleprompter-countdown.is-visible {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 140ms ease,
    visibility 0s linear 0s;
}

.teleprompter-speed {
  position: relative;
  width: 0.8rem;
  height: 6.25rem;
  margin-top: 0.95rem;
  display: block;
  opacity: 0;
  transform: translateY(-0.25rem);
  animation: teleprompter-speed-fade-in 180ms ease forwards;
}

.teleprompter-speed.is-zero .teleprompter-speed__rail {
  background: rgba(17, 17, 17, 0.4);
}

.teleprompter-speed__rail {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 0.12rem;
  height: 100%;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink-soft) 32%, transparent);
}

.teleprompter-speed[hidden] {
  display: none;
}

.teleprompter-speed__input {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6.25rem;
  height: 0.8rem;
  margin: 0;
  background: transparent;
  cursor: ns-resize;
  transform: translate(-50%, -50%) rotate(-90deg);
}

.teleprompter-speed__input:focus {
  outline: none;
}

.teleprompter-speed__input::-webkit-slider-runnable-track {
  width: 100%;
  height: 0.12rem;
  border-radius: 999px;
  background: transparent;
}

.teleprompter-speed__input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0.78rem;
  height: 0.78rem;
  margin-top: -0.33rem;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--paper) 92%, transparent);
}

.teleprompter-speed.is-zero .teleprompter-speed__input::-webkit-slider-thumb {
  background: #111;
}

.teleprompter-speed__input::-moz-range-track {
  width: 100%;
  height: 0.12rem;
  border: none;
  border-radius: 999px;
  background: transparent;
}

.teleprompter-speed__input::-moz-range-thumb {
  width: 0.78rem;
  height: 0.78rem;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--paper) 92%, transparent);
}

.teleprompter-speed.is-zero .teleprompter-speed__input::-moz-range-thumb {
  background: #111;
}

.teleprompter-speed__input::-moz-range-progress {
  background: transparent;
}

.teleprompter-speed__input::-ms-track {
  width: 100%;
  height: 0.12rem;
  border-color: transparent;
  color: transparent;
  background: transparent;
}

.teleprompter-speed__input::-ms-thumb {
  width: 0.78rem;
  height: 0.78rem;
  border: none;
  border-radius: 999px;
  background: var(--accent);
}

.teleprompter-speed.is-zero .teleprompter-speed__input::-ms-thumb {
  background: #111;
}

.teleprompter-speed__input::-ms-fill-lower,
.teleprompter-speed__input::-ms-fill-upper {
  background: transparent;
}

@keyframes teleprompter-speed-fade-in {
  from {
    opacity: 0;
    transform: translateY(-0.25rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.text-size-toggle {
  appearance: none;
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0;
  width: 2.7rem;
  height: 2.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  -webkit-tap-highlight-color: transparent;
  transition:
    color 160ms ease,
    opacity 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.text-size-toggle svg {
  width: 1.4rem;
  height: 1.4rem;
  stroke-width: 1.8;
}

.text-size-toggle:hover,
.text-size-toggle:focus-visible,
.text-size-toggle[aria-expanded="true"] {
  color: var(--accent);
  outline: none;
}

.text-size-panel {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 8rem;
  padding: 0.55rem 0.6rem 0.65rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: color-mix(in srgb, var(--paper) 94%, white);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(8px);
  font-family: var(--sans);
  z-index: 25;
}

.text-size-panel[hidden] {
  display: none;
}

.text-size-panel__label {
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.45rem;
  text-align: center;
}

.text-size-panel__controls {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.text-size-panel__controls button {
  appearance: none;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.text-size-panel__controls button:hover,
.text-size-panel__controls button:focus-visible {
  color: var(--accent);
  outline: none;
  border-color: currentColor;
}

.text-size-panel__controls button:disabled {
  opacity: 0.35;
  cursor: default;
  color: var(--ink-soft);
  border-color: var(--rule);
}

.text-size-down,
.text-size-up {
  width: 1.85rem;
  height: 1.85rem;
  line-height: 1;
  border-radius: 50%;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.text-size-current {
  flex: 1 1 auto;
  height: 1.85rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.text-size-panel__controls button.text-size-current {
  border: none;
}

.text-size-current.is-modified {
  color: var(--accent);
}

body.teleprompter-active .site-header {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: transparent;
  border-bottom-color: transparent;
  position: relative;
  z-index: 2;
  transition:
    opacity 180ms ease,
    visibility 0s linear 180ms;
}

body.teleprompter-active .song-titlebar,
body.teleprompter-active .lead {
  position: relative;
  z-index: 2;
}

body.teleprompter-active .song-titlebar h1,
body.teleprompter-active .lead,
body.teleprompter-active .song-controls .chord-toggle,
body.teleprompter-active .song-controls .text-size-toggle,
body.teleprompter-active .song-controls .text-size-panel {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  animation: none;
  transition:
    opacity 180ms ease,
    visibility 0s linear 180ms;
}

body.teleprompter-active .song-controls {
  z-index: 20;
}

body.teleprompter-active .song-controls .teleprompter-slot {
  position: fixed;
  top: var(--teleprompter-float-top);
  left: var(--teleprompter-float-left);
  width: var(--teleprompter-float-width);
  min-height: calc(var(--teleprompter-float-height) + 7.2rem);
  margin: 0;
  padding: 0;
  z-index: 21;
}

body.teleprompter-active .song-controls .teleprompter-toggle {
  flex: 0 0 auto;
}

.chord-toggle.is-pulsing,
.teleprompter-toggle.is-pulsing,
.text-size-toggle.is-pulsing {
  animation: toggle-pulse 340ms cubic-bezier(0.22, 0.84, 0.31, 1.12);
}

body.teleprompter-active .song-scroll-region {
  scrollbar-width: none;
  scrollbar-color: transparent transparent;
  -ms-overflow-style: none;
  margin-top: calc(-1 * var(--teleprompter-overlay-offset, 0px));
  padding-top: var(--teleprompter-overlay-offset, 0px);
}

body.teleprompter-active .song-scroll-region::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body.teleprompter-active .song-scroll-region::-webkit-scrollbar-track,
body.teleprompter-active .song-scroll-region::-webkit-scrollbar-thumb {
  background: transparent;
}

body.teleprompter-active.teleprompter-manual-scroll .song-scroll-region {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--ink-soft) 45%, transparent)
    transparent;
}

body.teleprompter-active.teleprompter-manual-scroll
  .song-scroll-region::-webkit-scrollbar {
  width: 0.6rem;
  height: 0.6rem;
}

body.teleprompter-active.teleprompter-manual-scroll
  .song-scroll-region::-webkit-scrollbar-track {
  background: transparent;
}

body.teleprompter-active.teleprompter-manual-scroll
  .song-scroll-region::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--ink-soft) 45%, transparent);
  border-radius: 999px;
}

@media (hover: none) and (pointer: coarse) {
  body.teleprompter-active .song-scroll-region {
    margin-right: -0.9rem;
    padding-right: 0.9rem;
  }

  body.teleprompter-active .song-scroll-region::after {
    width: 0.9rem;
    opacity: 1;
  }

  body.teleprompter-active.teleprompter-manual-scroll .song-scroll-region {
    margin-right: 0;
    padding-right: 0;
  }

  body.teleprompter-active.teleprompter-manual-scroll
    .song-scroll-region::after {
    opacity: 0;
  }
}

.site-header,
.song-titlebar h1,
.lead,
.song-controls .chord-toggle,
.song-controls .text-size-toggle,
.song-controls .text-size-panel {
  transition:
    opacity 180ms ease,
    visibility 0s linear 0s;
}

@keyframes toggle-pulse {
  from {
    opacity: 0;
    transform: scale(1);
  }
  65% {
    opacity: 1;
    transform: scale(1.06);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes song-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lead {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin: 0 0 0.65rem;
  line-height: 1.15;
  animation: song-fade-in 420ms ease-out both;
}

.song-scroll-region {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 0 calc(1rem + var(--teleprompter-end-padding, 0px));
  position: relative;
}

.song-scroll-region::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 100%;
  pointer-events: none;
  background: var(--paper);
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .song-titlebar,
  .lead {
    animation: none;
  }
}

/* ----- Modal de diagrama de acorde (../../shared/chord-modal.95b8f0285f.js) ----- */

.chord-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.55);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 100;
}
.chord-modal-overlay.is-open {
  display: flex;
}

.chord-modal {
  position: relative;
  background: var(--paper);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  padding: 1.6rem 1.8rem 1.8rem;
  width: 100%;
  max-width: 260px;
  text-align: center;
}

.chord-modal-close {
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  appearance: none;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0.3rem;
}
.chord-modal-close:hover,
.chord-modal-close:focus-visible {
  color: var(--accent);
  outline: none;
}

.chord-modal-name {
  font-family: var(--sans);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.15rem;
}

.chord-modal-diagram {
  width: 180px;
  height: 210px;
  margin: 0 auto;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.chord-modal-diagram svg {
  display: block;
  width: 100%;
  height: 100%;
}

.attribution {
  margin: 1.8rem 0 0;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-align: center;
}

@media (max-width: 640px) {
  body {
    margin-top: 0.8rem;
    padding: 0 1rem;
  }

  body.has-song-scroll-region {
    height: 100vh;
  }

  .song-titlebar {
    min-height: 0;
  }

  .song-controls {
    right: -0.08rem;
  }

  .text-size-panel {
    right: 2.5rem;
  }
}
