/* ==========================================================================
   y4ttaze 歌詞アーカイブ (Official Lyrics Archive) - CSS
   ========================================================================== */
:root {
  --bg-main: #f4f4f0;
  --panel-bg: #ffffff;
  --border-dark: #333333;
  --border-light: #cccccc;
  --text-main: #222222;
  --text-muted: #666666;
  --accent-red: #8b0000;
  --mono-font: "Courier New", Courier, "MS Gothic", monospace;
  --serif-font: "Hiragino Mincho ProN", "Yu Mincho", "MS PMincho", "Georgia", serif;
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--mono-font);
  font-size: 13px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 10px 80px 10px;
}

.lyrics-container {
  width: 100%;
  max-width: 880px;
  background-color: var(--panel-bg);
  border: 2px solid var(--border-dark);
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.15);
  padding: 18px 24px;
}

/* Header */
.lyrics-header {
  border-bottom: 2px solid var(--border-dark);
  padding-bottom: 10px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.lyrics-title {
  font-family: var(--serif-font);
  font-size: 21px;
  font-weight: 900;
  color: var(--accent-red);
  letter-spacing: 0.05em;
}

.lyrics-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.back-link {
  font-size: 12px;
  color: #0033cc;
  text-decoration: underline;
}
.back-link:hover {
  color: #cc0000;
}

/* Album & Song Filter / Navigation */
.song-filter-section {
  margin-bottom: 20px;
  background: #fafafa;
  border: 1px solid var(--border-light);
  padding: 12px 14px;
}

.album-group-label {
  font-size: 11px;
  font-weight: bold;
  color: #8b0000;
  margin-bottom: 6px;
}

.song-selector {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.song-selector:last-child {
  margin-bottom: 0;
}

.song-tab-btn {
  padding: 4px 10px;
  font-family: var(--mono-font);
  font-size: 12px;
  background: #ffffff;
  border: 1px solid #aaa;
  box-shadow: 1px 1px 0px rgba(0,0,0,0.1);
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.1s;
}
.song-tab-btn:hover {
  background: #f0f0f0;
  border-color: #666;
}
.song-tab-btn.active {
  background: #8b0000;
  border-color: #550000;
  color: #ffffff;
  font-weight: bold;
  box-shadow: inset 1px 1px 2px rgba(0,0,0,0.3);
}

/* Lyrics Card Area */
.lyrics-card {
  background: #ffffff;
  border: 1px solid #dddddd;
  padding: 24px 30px;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.04);
  position: relative;
}

/* Song Header in Card */
.song-card-header {
  border-bottom: 1px solid #eeeeee;
  padding-bottom: 14px;
  margin-bottom: 24px;
}

.song-card-title {
  font-family: var(--serif-font);
  font-size: 22px;
  font-weight: bold;
  color: #111111;
  margin-bottom: 4px;
}

.song-card-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--mono-font);
}

.song-card-overview {
  font-size: 12px;
  color: #555555;
  background: #faf8f5;
  border-left: 3px solid #8b0000;
  padding: 8px 12px;
  margin-top: 10px;
  line-height: 1.6;
}

/* Lyric Lines (Booklet Style) */
.lyrics-body {
  font-family: var(--serif-font);
  font-size: 16px;
  line-height: 2.3;
  color: #1a1a1a;
  letter-spacing: 0.04em;
}

.lyric-section-name {
  font-family: var(--mono-font);
  font-size: 12px;
  font-weight: bold;
  color: #888888;
  margin-top: 24px;
  margin-bottom: 8px;
  display: block;
}
.lyric-section-name:first-child {
  margin-top: 0;
}

.lyric-line {
  display: block;
  padding: 1px 4px;
  border-radius: 2px;
  transition: all 0.15s;
}

/* Subtle Note Indicator (Understated Genius style) */
.lyric-line.has-note {
  border-bottom: 1.5px dotted #b8860b;
  cursor: pointer;
}
.lyric-line.has-note:hover {
  background-color: rgba(255, 235, 59, 0.25);
}
.lyric-line.active {
  background-color: #fff9c4 !important;
  font-weight: bold;
  outline: 1px solid #fbc02d;
}

/* Note Modal / Bottom Sheet Popup */
.note-popup-wrapper {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 90%;
  max-width: 420px;
  background: #fffdf5;
  border: 2px solid #d4af37;
  box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.2);
  padding: 14px 16px;
  z-index: 1000;
  display: none;
  animation: slideUp 0.2s ease-out;
}
.note-popup-wrapper.open {
  display: block;
}

.note-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed #d4af37;
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.note-popup-badge {
  font-size: 10px;
  background: #cc0000;
  color: #ffffff;
  padding: 1px 6px;
  font-weight: bold;
  border-radius: 2px;
}

.note-target-quote {
  font-family: var(--serif-font);
  font-size: 13px;
  font-weight: bold;
  color: #8b0000;
  margin-bottom: 8px;
  padding-left: 6px;
  border-left: 2px solid #d4af37;
}

.note-content-text {
  font-size: 12px;
  line-height: 1.6;
  color: #333333;
}

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

/* Mobile */
@media (max-width: 600px) {
  .lyrics-container {
    padding: 12px 14px;
  }
  .lyrics-card {
    padding: 16px 14px;
  }
  .lyrics-body {
    font-size: 15px;
    line-height: 2.1;
  }
  .note-popup-wrapper {
    bottom: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    border-left: none;
    border-right: none;
    border-bottom: none;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.25);
  }
}
