/* The school song on the school's website (owner 2026-11-01, release SONG;
   plan/song/PLAN_SONG.md §3.6, D-19). song.js (the same bytes as the
   teacher and new-family portals') brings the header's music-note button to
   life and hangs its small player under the header. The home page carries the
   button as the last item of its main menu, the supply lists before
   "← School home". The pages are English only, so the words are English.

   The button is a 44 px round ghost on the dark header, hidden until the
   server says it may show, and hidden on Shabbos and Yom Tov — and then its
   menu item takes no room either, so the header is exactly as before. The
   sheet is a card in the page's paper and ink, under the header at its end;
   its controls are 44 px, its time reads left to right in tabular figures
   and sits outside every button. Nothing moves: no animation, no transition.
   Gone in print. */
.nav { position: relative; }
#song-btn[hidden], #song-sheet[hidden] { display: none !important; }
nav li:has(> #song-btn[hidden]) { display: none; }

.song-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  width: 44px; height: 44px; margin: 0; padding: 0;
  border: 1px solid #ffffff3d; border-radius: 999px;
  background: transparent; color: #f8f1df;
  font: inherit; cursor: pointer;
}
.song-btn:hover { background: #ffffff12; }
.song-btn:focus-visible { outline: 3px solid var(--focus, #1f5f9b); outline-offset: 4px; }
/* On the supply lists the button stands beside "← School home", at the end. */
.nav > .song-btn { margin-inline-start: auto; }
.song-btn .song-ico, .song-btn .song-ico svg { display: block; width: 20px; height: 20px; }
.song-dot {
  position: absolute; inset-block-start: 8px; inset-inline-end: 8px;
  width: 8px; height: 8px; border-radius: 999px;
  background: #e1bd70; box-shadow: 0 0 0 2px var(--night, #17120a);
}
.song-dot[hidden] { display: none; }
.song-vh {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

#song-sheet {
  position: absolute; inset-block-start: calc(100% + 0.4rem); inset-inline-end: 0;
  width: min(20rem, calc(100vw - 2rem)); z-index: 20;
  background: var(--card, #fffdf7); color: var(--ink, #241d12);
  border: 1px solid var(--line, #ded4bc); border-radius: 18px;
  box-shadow: 0 18px 45px #00000040;
  padding: 0.75rem 0.85rem 0.85rem;
  text-align: start; line-height: 1.4;
}
#song-sheet .song-title { display: block; font: 600 1.05rem/1.3 Georgia, serif; }
/* The title is the song's own (English) name, dir="ltr" — so `start` is its
   left even in Hebrew. There it sits at the sheet's start, the right, as in
   the React consoles (rtl:text-right; SONG walk S2-3, review RW1-3). The
   website is English today; song.js is the same bytes as the portals', and
   so is this rule. */
[dir="rtl"] #song-sheet .song-title { text-align: right; }
#song-sheet .song-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.55rem;
}
#song-sheet .song-ctl {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-width: 44px; min-height: 44px; margin: 0; padding: 0 0.9rem;
  border: 1px solid var(--line, #ded4bc); border-radius: 999px;
  background: transparent; color: var(--ink, #241d12);
  font: inherit; font-weight: 700; cursor: pointer;
}
#song-sheet .song-ctl:hover { background: var(--warm, #f2e6c8); }
#song-sheet .song-ctl:focus-visible { outline: 3px solid var(--focus, #1f5f9b); outline-offset: 2px; }
#song-sheet .song-main { background: var(--night, #17120a); border-color: var(--night, #17120a); color: #e1bd70; }
#song-sheet .song-main:hover { background: #2a2113; }
#song-sheet .song-ctl .song-ico svg { display: block; width: 18px; height: 18px; }
#song-sheet .song-time {
  margin-inline-start: auto; color: var(--muted, #695f4c); font-size: 0.85rem;
  direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; white-space: nowrap;
}
#song-sheet .song-bar {
  position: relative; height: 6px; margin-top: 0.7rem;
  border-radius: 999px; background: var(--line, #ded4bc); overflow: hidden;
}
#song-sheet .song-fill {
  position: absolute; inset-block: 0; inset-inline-start: 0; width: 0;
  background: var(--gold, #876415); border-radius: inherit;
}
#song-sheet .song-failed { margin: 0; color: var(--muted, #695f4c); font-size: 0.9rem; }
#song-sheet .song-failed:not(:empty) { margin-top: 0.6rem; }

@media print { #song-btn, #song-sheet { display: none !important; } }
