/* ========================================
   Songbook — composition picker (.songbook) + song dossier (.journey)

   One song traced through time and location. Tube Glow tokens only; the VU
   meter + play-button wiring are shared with the catalog. Registered before
   `mobile` so mobile.css can win the cascade.
   ======================================== */

/* ----------------------------------------
   Picker index
   ---------------------------------------- */

.songbook {
  max-width: 1280px;
  margin: 0 auto;
  animation: page-enter 350ms ease-out both;
}

.songbook__head {
  padding: 28px 26px 6px;
}

.songbook__eyebrow {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ink-30);
  margin-bottom: 10px;
}

.songbook__title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 30px;
  letter-spacing: 0.5px;
  color: var(--ink-100);
  margin: 0;
  text-shadow: 0 0 20px rgba(224, 162, 60, 0.18);
}

.songbook__search-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 26px;
  padding: 14px 16px;
  background: var(--inset);
  border: 1px solid rgba(224, 162, 60, 0.22);
  border-radius: 8px;
  box-shadow: inset 0 0 26px -8px rgba(224, 162, 60, 0.25);
}

.songbook__search-prompt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--amber);
  text-shadow: var(--amber-glow);
  white-space: nowrap;
  flex-shrink: 0;
}

.songbook__search {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink-100);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.5px;
  caret-color: var(--amber);
}

.songbook__search::placeholder {
  color: var(--ink-30);
}

.songbook__search-caret {
  width: 9px;
  height: 17px;
  flex-shrink: 0;
  background: var(--amber);
  box-shadow: 0 0 9px rgba(224, 162, 60, 0.7);
  animation: blink 1.1s step-end infinite;
}

.songbook__search-bar:has(.songbook__search:focus) .songbook__search-caret,
.songbook__search-bar:has(.songbook__search:not(:placeholder-shown)) .songbook__search-caret {
  display: none;
}

.songbook__toolbar {
  padding: 4px 26px 12px;
}

.songbook__count {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-70);
}

.songbook__list {
  border-top: 1px solid var(--line);
}

.songbook__row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: baseline;
  gap: 18px;
  padding: 13px 26px;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  transition: background var(--transition-fast);
}

.songbook__row:hover {
  background: rgba(224, 162, 60, 0.04);
  text-decoration: none;
}

.songbook__row-title {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.3px;
  color: var(--ink-100);
  min-width: 0;
}

.songbook__row:hover .songbook__row-title {
  color: var(--amber);
}

.songbook__row-span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.5px;
  color: var(--ink-40);
  white-space: nowrap;
}

.songbook__row-count {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--amber-dim);
  white-space: nowrap;
}

.songbook__empty {
  text-align: center;
  padding: 4rem 2rem;
}

.songbook__empty p {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--ink-40);
  font-size: 1.1rem;
}

.songbook__empty p + p {
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* ----------------------------------------
   Dossier page (.journey) — scoped needle token
   ---------------------------------------- */

.journey {
  max-width: 1280px;
  margin: 0 auto;
  animation: page-enter 350ms ease-out both;
}

/* --- Dossier header --- */

.journey__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  padding: 30px 30px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.journey__eyebrow {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ink-30);
  margin-bottom: 10px;
}

.journey__title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 46px;
  line-height: 1.05;
  letter-spacing: 0.5px;
  color: var(--ink-100);
  margin: 0;
  text-shadow: 0 0 20px rgba(224, 162, 60, 0.25);
}

.journey__aliases {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--ink-40);
  margin-top: 11px;
}

.journey__alias {
  color: var(--ink-70);
}

.journey__plates {
  display: flex;
  gap: 26px;
  padding-bottom: 4px;
}

.journey__plate {
  text-align: right;
  line-height: 1.3;
}

.journey__plate-k {
  display: block;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-20);
}

.journey__plate-v {
  display: block;
  font-family: var(--font-mono);
  font-size: 17px;
  letter-spacing: 0.5px;
  color: var(--amber);
  text-shadow: 0 0 9px rgba(224, 162, 60, 0.45);
  margin-top: 3px;
}

/* --- Through-time dial --- */

.journey__dial-panel {
  padding: 18px 26px 16px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}

.journey__dial-row {
  display: flex;
  align-items: center;
  gap: 22px;
}

.journey__dial-label {
  flex-shrink: 0;
  width: 84px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 2px;
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--ink-30);
}

.journey__dial-well {
  flex: 1;
  position: relative;
  height: 64px;
  border-radius: 8px;
  background: var(--dial-well);
  box-shadow: inset 0 0 36px -8px rgba(224, 162, 60, 0.4), inset 0 0 0 1px rgba(224, 162, 60, 0.12);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 0 16px 9px;
  cursor: ew-resize;
  touch-action: none;
  user-select: none;
}

.journey__dial-well:focus-visible {
  outline: none;
  box-shadow: inset 0 0 36px -8px rgba(224, 162, 60, 0.4), inset 0 0 0 1px rgba(224, 162, 60, 0.12),
    0 0 0 2px var(--border-active);
}

.journey__dial-hint {
  display: block;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-20);
  margin-top: 4px;
}

.journey__dial-glow {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 26px;
  pointer-events: none;
  background: radial-gradient(120% 100% at 50% 0%, rgba(224, 162, 60, 0.2), transparent 70%);
}

.journey__dial-ticks {
  position: relative;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.journey__tick {
  border-radius: 1px;
  flex-shrink: 0;
}

.journey__tick--lit {
  width: 2px;
  background: var(--amber);
  box-shadow: 0 0 6px -1px var(--amber);
}

.journey__tick--empty {
  width: 1px;
  height: 8px;
  background: var(--ink-20);
  opacity: 0.5;
}

.journey__tick--decade {
  width: 2px;
  height: 12px;
  background: var(--ink-20);
  opacity: 0.7;
}

.journey__needle {
  position: absolute;
  top: 6px;
  bottom: 6px;
  width: 2px;
  transform: translateX(-1px);
  background: var(--needle);
  box-shadow: 0 0 12px 2px var(--needle);
  pointer-events: none;
}

.journey__needle-label {
  position: absolute;
  top: 4px;
  transform: translateX(6px);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.5px;
  color: var(--amber);
  text-shadow: 0 0 7px rgba(224, 162, 60, 0.6);
  pointer-events: none;
}

.journey__dial-range {
  flex-shrink: 0;
  text-align: right;
  line-height: 1.3;
}

.journey__dial-range-k {
  display: block;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-20);
}

.journey__dial-range-v {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--amber);
  text-shadow: 0 0 9px rgba(224, 162, 60, 0.45);
}

/* --- Era strip (doubles as the ?era= filter) --- */

.journey__era-strip {
  display: flex;
  gap: 3px;
  margin-top: 12px;
  margin-left: 106px;
}

.journey__era-seg {
  flex-basis: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 4px;
  border-radius: 4px;
  background: var(--field);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  text-decoration: none;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.journey__era-seg:hover {
  border-color: var(--border-active);
  text-decoration: none;
}

.journey__era-seg-label {
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-70);
  white-space: nowrap;
}

.journey__era-seg-count {
  font-family: var(--font-mono);
  font-size: 7.5px;
  color: var(--ink-40);
}

.journey__era-seg--active {
  background: rgba(224, 162, 60, 0.12);
  border-color: var(--border-active);
}

.journey__era-seg--active .journey__era-seg-label {
  color: var(--amber);
  text-shadow: 0 0 7px rgba(224, 162, 60, 0.4);
}

.journey__era-seg--active .journey__era-seg-count {
  color: var(--amber);
}

/* On-deck era = the segment the tuner is parked in. Brighter + a glow so it
   reads distinctly from the server-side filter's --active state. */
.journey__era-seg--on-deck {
  background: rgba(224, 162, 60, 0.18);
  border-color: var(--amber);
  box-shadow: 0 0 10px -3px rgba(224, 162, 60, 0.6);
}

.journey__era-seg--on-deck .journey__era-seg-label {
  color: var(--amber);
  text-shadow: 0 0 7px rgba(224, 162, 60, 0.4);
}

.journey__era-seg--on-deck .journey__era-seg-count {
  color: var(--amber);
}

.journey__era-seg--empty {
  opacity: 0.4;
}

/* --- Two-column body --- */

.journey__body {
  display: grid;
  grid-template-columns: 368px 1fr;
}

.journey__rail {
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.journey__panel {
  padding: 22px 26px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.journey__panel-title {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-30);
  margin-bottom: 16px;
}

.journey__panel-note {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-20);
  margin-top: 15px;
}

.journey__panel-empty {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-30);
}

/* Bar gauges (stations + by-era) */

.journey__gauges {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.journey__gauge {
  display: flex;
  align-items: center;
  gap: 11px;
}

.journey__gauge--dim {
  opacity: 0.45;
}

.journey__gauge-name {
  width: 112px;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3px;
  color: var(--ink-80);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
}

.journey__gauge-track {
  flex: 1;
  height: 6px;
  border-radius: 2px;
  background: var(--inset);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.journey__gauge-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(to right, rgba(224, 162, 60, 0.55), var(--amber));
  box-shadow: 0 0 8px -1px rgba(224, 162, 60, 0.6);
  border-radius: 2px;
}

.journey__gauge-count {
  width: 20px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--amber);
  text-shadow: 0 0 6px rgba(224, 162, 60, 0.4);
}

/* Bookends */

.journey__bookend {
  padding: 12px 14px;
  border-radius: 7px;
  background: var(--metal-badge);
  border: 1px solid rgba(224, 162, 60, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  margin-bottom: 12px;
}

.journey__bookend-k {
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-20);
}

.journey__bookend-date {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.3px;
  color: var(--ink-100);
  margin-top: 6px;
}

.journey__bookend-place {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink-40);
  margin-top: 3px;
}

.journey__bookend-line {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-30);
  margin-top: 2px;
}

/* --- Right column: every version --- */

.journey__versions {
  min-width: 0;
}

.journey__versions-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 26px 12px;
}

.journey__versions-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-70);
}

.journey__controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.journey__toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  overflow: hidden;
  box-shadow: var(--shadow-recessed);
}

.journey__toggle-seg {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink-50);
  padding: 7px 11px;
  text-decoration: none;
  background: var(--field);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.journey__toggle-seg + .journey__toggle-seg {
  border-left: 1px solid var(--border-subtle);
}

.journey__toggle-seg:hover {
  color: var(--amber);
  text-decoration: none;
}

.journey__toggle-seg--active {
  background: rgba(224, 162, 60, 0.12);
  color: var(--amber);
  text-shadow: 0 0 7px rgba(224, 162, 60, 0.4);
}

.journey__sort {
  display: flex;
  align-items: center;
  gap: 8px;
}

.journey__sort-label {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-30);
}

.journey__sort-opt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3px;
  text-transform: lowercase;
  color: var(--ink-50);
  text-decoration: none;
}

.journey__sort-opt:hover {
  color: var(--amber);
  text-decoration: none;
}

.journey__sort-opt--active {
  color: var(--amber);
  text-shadow: 0 0 7px rgba(224, 162, 60, 0.4);
}

/* Column header + rows share one grid template. */

.journey__col-header,
.journey__row {
  display: grid;
  grid-template-columns: 28px 44px 96px 1fr 46px 26px 30px;
  align-items: center;
  gap: 13px;
  padding: 0 26px;
}

.journey__col-header {
  padding-top: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-20);
}

.journey__col-header--right {
  text-align: right;
}

/* Era section header */

.journey__era-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 26px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line-soft);
}

.journey__era-led {
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: var(--ink-20);
}

.journey__era-header--active .journey__era-led {
  background: var(--amber);
  box-shadow: 0 0 8px -1px rgba(224, 162, 60, 0.8);
}

.journey__era-name {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-70);
}

.journey__era-header--active .journey__era-name {
  color: var(--amber);
}

.journey__era-header--unknown .journey__era-name {
  color: var(--ink-30);
}

.journey__era-range {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 1px;
  color: var(--ink-20);
}

.journey__era-spacer {
  flex: 1;
}

.journey__era-count {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-40);
}

/* Version row */

.journey__row {
  padding-top: 11px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line-soft);
  transition: background var(--transition-fast);
}

.journey__row:hover {
  background: rgba(224, 162, 60, 0.04);
}

/* Doubled class (0,0,2,0) so the selection fills beat .journey__row:hover
   (also 0,0,2,0) on source order — otherwise hovering the tuned row, which is
   exactly where the cursor rests after a click-to-tune, wipes the gradient. */
.journey__row.journey__row--playing {
  background: rgba(224, 162, 60, 0.06);
}

/* On-deck = the tuned/selected night. Richer than --playing and carries a
   left-edge amber rail. A row that is both on-deck and --playing keeps this bg
   (defined later) plus the --playing play-button glow, so "selected" and
   "sounding" stay legible together. */
.journey__row.journey__row--on-deck {
  background: linear-gradient(90deg, rgba(224, 162, 60, 0.14), rgba(224, 162, 60, 0.04) 55%, transparent);
  box-shadow: inset 3px 0 0 -1px var(--amber);
}

.journey__badge {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink-70);
  border: 1px solid rgba(224, 162, 60, 0.25);
  border-radius: 3px;
  padding: 3px 4px;
}

.journey__date {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.3px;
  color: var(--ink-50);
}

.journey__meta {
  min-width: 0;
  line-height: 1.3;
}

.journey__link {
  text-decoration: none;
}

.journey__link:hover {
  text-decoration: none;
}

.journey__venue {
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.3px;
  color: var(--ink-100);
}

.journey__link:hover .journey__venue {
  color: var(--amber);
}

.journey__place {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink-40);
  margin-left: 8px;
}

.journey__content-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--amber);
  background: rgba(224, 162, 60, 0.08);
  border: 1px solid rgba(224, 162, 60, 0.3);
  border-radius: var(--radius-pill);
  padding: 2px 6px;
  margin-left: 8px;
  vertical-align: middle;
}

.journey__note {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 11px;
  line-height: 1.4;
  color: var(--ink-30);
  margin-top: 3px;
}

.journey__heard {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--q-excellent);
  margin-top: 3px;
}

.journey__dur {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--ink-70);
  text-align: right;
}

.journey__fav {
  display: flex;
  align-items: center;
  justify-content: center;
}

.journey__play-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.journey__play {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: none;
  border: 1px solid rgba(224, 162, 60, 0.5);
  box-shadow: 0 0 12px -4px rgba(224, 162, 60, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all var(--transition-fast);
}

.journey__play:hover,
.journey__row--playing .journey__play {
  border-color: var(--amber);
  box-shadow: 0 0 14px -3px rgba(224, 162, 60, 0.8);
}

.journey__play-icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 4px 0 4px 7px;
  border-color: transparent transparent transparent var(--amber);
  margin-left: 2px;
}

.journey__play-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ----------------------------------------
   Tablet tier (641-880px): stack the two-column body before mobile.css takes
   over at <=640px. Without this the fixed 368px rail + 1fr column overflows
   horizontally. Mirrors performance.css's 880px single-column precedent.
   ---------------------------------------- */

@media (max-width: 880px) {
  .journey__body {
    grid-template-columns: 1fr;
  }
  .journey__rail {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
}

/* ----------------------------------------
   Entry points on songs#show
   ---------------------------------------- */

.perf__journey-banner {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding: 6px 12px;
  border: 1px solid rgba(224, 162, 60, 0.3);
  border-radius: var(--radius-pill);
  background: rgba(224, 162, 60, 0.06);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--amber);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.perf__journey-banner:hover {
  background: rgba(224, 162, 60, 0.14);
  text-decoration: none;
}

.perf__journey-banner-arrow {
  text-shadow: var(--amber-glow);
}

.perf__setlist-link {
  color: var(--ink-90);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.perf__setlist-link:hover {
  color: var(--amber);
  border-bottom-color: rgba(224, 162, 60, 0.4);
  text-decoration: none;
}
