@property --gold {
  syntax: '<color>';
  initial-value: #9C7BE8;
  inherits: true;
}
@property --gold-light {
  syntax: '<color>';
  initial-value: #B89FF5;
  inherits: true;
}

:root {
  --bg: #0e0e0e;
  --surface: #161616;
  --surface2: #1c1c1c;
  --border: #272727;
  --gold: #9C7BE8;
  --gold-light: #B89FF5;
  --text: #e8e4dc;
  --text-muted: #7a7268;
  --text-dim: #3e3a36;
  transition: --gold 2s ease, --gold-light 2s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

header {
  height: 52px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  position: sticky;
  top: 0;
  z-index: 200;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 900;
  color: var(--gold);
}

.header-buttons {
  display: flex;
  gap: 10px;
}

.btn-summary {
  background: color-mix(in srgb, var(--gold) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  color: var(--gold);
  padding: 6px 16px;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.2px;
}

.btn-summary:hover {
  background: color-mix(in srgb, var(--gold) 20%, transparent);
  border-color: var(--gold);
  color: var(--gold-light);
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 500;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: min(600px, 90vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  animation: modalIn 0.18s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.modal-sub {
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 2px;
}

.btn-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.12s;
}

.btn-modal-close:hover { color: #fff; }

.modal-body {
  padding: 22px;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
}

.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.hero {
  background: linear-gradient(160deg, #1c1610 0%, #0e0e0e 60%);
  padding: 44px 0 36px;
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  gap: 36px;
  align-items: flex-start;
}

.hero-left {
  display: flex;
  gap: 28px;
  align-items: flex-end;
  flex: 1;
  min-width: 0;
}

.cover {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  background: #1a1510 url('Streit.jpg') center / cover;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.hero-tag {
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 46px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  letter-spacing: -1px;
  margin-bottom: 6px;
}

.hero-artist {
  font-size: 18px;
  color: var(--gold);
  margin-bottom: 12px;
}

.yt-col {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: center;
}

.yt-thumb-link {
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
  text-decoration: none;
}

.yt-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.yt-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s;
  color: #fff;
}

.yt-thumb-link:hover .yt-thumb-overlay { opacity: 1; }

.yt-play-icon  { font-size: 32px; }
.yt-open-label { font-size: 12px; letter-spacing: 1px; }

.audio-float {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: rgba(16, 16, 16, 0.96);
  border-top: 1px solid var(--border);
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 40px;
  backdrop-filter: blur(12px);
}

.audio-float-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 140px;
  flex-shrink: 0;
}

.audio-song-title {
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
}

.audio-section-name {
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  min-height: 13px;
  transition: color 2s ease;
}

.audio-float-center {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-audio-seek {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.btn-audio-seek:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-audio-play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--gold);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.btn-audio-play:hover {
  background: color-mix(in srgb, var(--gold) 15%, transparent);
  border-color: var(--gold);
}

.audio-float-right {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.audio-track {
  flex: 1;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.audio-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  width: 0%;
  pointer-events: none;
  transition: background 2s ease;
}

.audio-volume {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-mute {
  background: transparent;
  border: none;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.15s;
}

.btn-mute:hover { opacity: 1; }

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 72px;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  transition: background 2s ease;
}

.volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: none;
  cursor: pointer;
}

.audio-time {
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

@media (min-width: 769px) and (max-width: 1100px) {
  .hero-inner { gap: 20px; padding: 0 24px; }
  .yt-col { width: 260px; }
  .hero-title { font-size: 36px; }
  .page { padding: 32px 28px 140px; }
  .audio-float { padding: 0 24px; }

  #anno-float {
    position: fixed;
    bottom: 62px;
    left: 50%;
    transform: translateX(-50%);
    width: min(500px, 90vw);
    right: auto;
    max-height: 52vh;
    overflow-y: auto;
    border-radius: 10px;
  }

  #anno-float::before { display: none; }

  #anno-float.visible { animation: popIn .16s ease; }
}

@media (max-width: 768px) {
  .hero-inner { flex-direction: column; }
  .yt-col { width: 100%; }
  .page { padding: 24px 20px 140px; }
  .audio-float { padding: 0 16px; gap: 12px; }
  .audio-float-left { display: none; }

  #anno-float {
    position: fixed;
    bottom: 62px;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 52vh;
    border-radius: 12px 12px 0 0;
    overflow-y: auto;
  }

  #anno-float::before { display: none; }

  #anno-float.visible { animation: slideUp 0.2s ease; }

  @keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0);    }
  }
}

@media print {
  header, .hero, #audio-float, #anno-float,
  .modal-overlay, .anno-legend { display: none !important; }

  body { background: #fff; color: #111; font-size: 13px; }

  .page { padding: 20px; max-width: 100%; }

  .section-title {
    color: #333;
    border-left-color: #333;
    margin-top: 16px;
  }

  .lyric-line {
    color: #111;
    background: none !important;
    border-left-color: transparent !important;
    page-break-inside: avoid;
    user-select: text;
  }

  .lyric-line.annotated { border-left-color: #bbb !important; }

  .note-pip-group { display: none; }
}

.anno-legend {
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.page {
  max-width: 580px;
  margin: 0 auto;
  padding: 40px 40px 140px;
}

.section-block { margin-bottom: 44px; }

.section-title {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  padding: 5px 0 5px 12px;
  border-left: 2px solid var(--gold);
  margin-bottom: 14px;
}

.lyric-line {
  display: flex;
  align-items: center;
  padding: 5px 10px 5px 10px;
  margin-left: -12px;
  border-radius: 3px;
  border-left: 2px solid transparent;
  font-size: 16px;
  color: var(--text);
  line-height: 1.65;
  user-select: none;
  transition: background 0.12s;
}

.lyric-line.annotated {
  cursor: pointer;
  border-left-color: color-mix(in srgb, var(--gold) 45%, transparent);
  background: color-mix(in srgb, var(--gold) 8%, transparent);
}

.lyric-line.annotated:hover {
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  color: #fff;
}

.lyric-line.active {
  border-left-color: var(--gold-light) !important;
  background: color-mix(in srgb, var(--gold) 22%, transparent) !important;
  color: #fff;
}

.note-pip-group {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
  margin-left: auto;
  padding-left: 14px;
  align-items: center;
}

.note-pip {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0.85;
}

.empty { height: 12px; }

#anno-float {
  position: fixed;
  width: 360px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.65);
  z-index: 150;
  display: none;
  flex-direction: column;
  gap: 10px;
}

#anno-float::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 18px;
  width: 12px;
  height: 12px;
  background: var(--surface2);
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: rotate(45deg);
}

#anno-float.visible {
  display: flex;
  animation: popIn 0.16s ease;
}

@keyframes popIn {
  from { opacity: 0; transform: translateX(8px)  scale(0.97); }
  to   { opacity: 1; transform: translateX(0)     scale(1);    }
}

.anno-line-ref {
  font-size: 12px;
  font-style: italic;
  color: var(--text-muted);
  border-left: 2px solid var(--gold);
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 0 3px 3px 0;
  line-height: 1.5;
}

.anno-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 2px;
}

.anno-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-left: 6px solid #999;
  border-radius: 8px;
  padding: 14px;
}

.anno-card-type {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
}

.anno-card-text {
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
}
