/* Band room (/band) and admin login (/login). Phone first; same dark theme as style.css. */

:root {
  --bg: #0b0d12;
  --panel: #141821;
  --panel-2: #1b2130;
  --line: #262d3d;
  --text: #e4e8f1;
  --muted: #8691a6;
  --accent: #7c9cff;
  --accent-ink: #0b0e16;
  --ok: #4ade80;
  --err: #f87171;
  --warn: #fbbf24;
  --radius: 8px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

h1 { font-size: 24px; margin: 0 0 6px; font-weight: 650; }
h2 { font-size: 13px; margin: 18px 0 8px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

.top {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel);
  position: sticky; top: 0; z-index: 2;
}
.logo { font-size: 18px; font-weight: 700; letter-spacing: .02em; }
.tag { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }

.wrap { max-width: 560px; margin: 0 auto; padding: 16px 16px 48px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.msg { min-height: 1.4em; margin: 8px 0; font-size: 14px; color: var(--muted); }
.msg.err { color: var(--err); }

.btn {
  min-height: 48px; padding: 10px 16px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:focus-visible, .song:focus-visible, .part:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled { opacity: .4; cursor: default; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent); min-height: 40px; padding: 6px 4px; }
.btn.toggle[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.block { width: 100%; }

/* song list */
.songs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.song {
  display: block; padding: 14px 16px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none;
}
.song:hover { border-color: #3a4560; }
.song-title { font-size: 18px; font-weight: 600; }
.song-sub { font-size: 14px; color: var(--muted); margin-top: 2px; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }
.song.numbered { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); column-gap: 6px; }
.song.numbered .pos { grid-row: 1 / span 2; align-self: center; color: var(--muted); font-weight: 650; font-variant-numeric: tabular-nums; }
.song.greyed { opacity: .5; cursor: default; }
.song.greyed:hover { border-color: var(--line); }

/* song page */
.meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }

.parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.part {
  min-height: 60px; padding: 10px 8px; border-radius: var(--radius); font: inherit; font-weight: 650;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line); cursor: pointer;
  overflow-wrap: anywhere;
}
.part[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.part.whole { grid-column: 1 / -1; min-height: 48px; font-weight: 500; color: var(--muted); }
.part.whole[aria-pressed="true"] { background: var(--panel-2); color: var(--text); border-color: var(--accent); }

.player {
  margin-top: 18px; padding: 16px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.play {
  min-width: 152px; height: 64px; padding: 0 24px; border-radius: 999px; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; font-size: 18px;
}
.play svg { width: 22px; height: 22px; flex: none; }
.play:disabled { opacity: .4; cursor: default; }
.timeline { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.timeline input[type="range"] { width: 100%; accent-color: var(--accent); height: 28px; }
#time { font-variant-numeric: tabular-nums; text-align: center; font-size: 17px; }

.toggles { display: flex; gap: 8px; margin-top: 14px; }
.toggles .btn { font-size: 14px; padding: 8px 6px; }
.live, .mixer, .downloads { margin-top: 10px; }

.speed { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.speed select {
  min-height: 44px; padding: 6px 10px; border-radius: var(--radius); font: inherit;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
}

/* login */
.login { max-width: 360px; margin: 12vh auto 0; padding: 0 16px; }
.login form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.login input {
  min-height: 52px; padding: 10px 14px; font: inherit; font-size: 22px; letter-spacing: .2em; text-align: center;
  border-radius: var(--radius); background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
}
.login input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* password show/hide (common.js addPasswordToggle) */
.pw-wrap { position: relative; display: block; width: 100%; min-width: 0; }
.pw-wrap > input.pw-input { width: 100%; box-sizing: border-box; padding-right: 48px; }
.pw-toggle {
  position: absolute; top: 50%; right: 0; transform: translateY(-50%);
  width: 44px; height: 44px; margin: 0; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--muted); border: 0; border-radius: var(--radius); cursor: pointer;
}
.pw-toggle:hover { color: var(--text); }
.pw-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pw-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 380px) {
  .parts { grid-template-columns: 1fr; }
}

/* lyrics with chords (common.js builds the lines) */
.lyrics-panel { margin-top: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.lyrics-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.lyrics-head h2 { margin: 0; }
.lyrics-warn { color: var(--warn); }
.lyrics-toggle { margin-left: auto; }
.lyrics-body { max-height: 260px; overflow-y: auto; margin-top: 6px; }
.lyric-line { padding: 6px 6px; border-radius: 4px; line-height: 1.25; }
.lyric-line.current { background: rgba(124, 156, 255, 0.18); }
.lw { display: inline-flex; flex-direction: column; vertical-align: bottom; }
.lc { min-height: 1.1em; font: 600 12px ui-monospace, Menlo, monospace; color: var(--accent); white-space: pre; }
.lt { font-size: 17px; white-space: pre; }
.lyric-gap { font: 600 12px ui-monospace, Menlo, monospace; color: var(--muted); margin-top: 2px; }
