/* The live gig pages' own styles, after base.css: the dancers' pages (gig.html, its help,
   whatwasthatsong.app's home and privacy page, an event's pages), and what the venue screen and the DJ
   view share with them (their own rules: booth.css). A dancer's phone loads only base.css and this. */

button.large { height: 50px; padding: 0 var(--s7); font-size: var(--fs-part); font-weight: 700; }
/* Tonal: the chosen option in the tonal colour, beside a primary button that keeps the accent (the dancers' page). */
.segmented.tonal input:checked + span { background: var(--tonal); color: var(--tonal-text); }

/* ---------- A live gig, for dancers (gig.html) ---------- */
/* Phone first: one column, the song playing now on a card, the songs before it as rows.
   The dancers' pages follow the phone's text size: base.css's type scale in rem, the same sizes at the
   default (16px a rem; Android's text size with <meta name="text-scale">). Safari's rem ignores an
   iPhone's text size, so there the page takes its system font (17px at the default) as the rem; only
   on touch: a Mac's is 13px. */
.gig-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  --text-unit: calc(1rem / 16);
  --fs-caption: calc(12 * var(--text-unit)); --fs-small: calc(14 * var(--text-unit)); --fs-body: calc(15 * var(--text-unit)); --fs-part: calc(16 * var(--text-unit));
  --fs-lead: calc(18 * var(--text-unit)); --fs-section: calc(20 * var(--text-unit)); --fs-title: calc(24 * var(--text-unit)); --fs-page: calc(28 * var(--text-unit));
}
@supports (font: -apple-system-body) {
  @media (hover: none) {
    html:has(> body.gig-page) { font: -apple-system-body; }
    .gig-page { --text-unit: calc(1rem / 17); }
  }
}
main.gig { width: 100%; max-width: 560px; box-sizing: border-box; padding: var(--s6) var(--s4) var(--s8); flex: 1; }
.gig-room-next { display: block; } /* a set in a room: Next: Tom at 17:05, a line of its own under the room's */
.gig-head {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s4);
}
.gig-who { flex: 1; min-width: 0; } /* the Live badge and the help's “?” at the end */
.gig-dj { margin: 0; font-weight: 600; }
.live-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  height: 28px;
  padding: 0 var(--s2);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text); /* the accent ink on the soft tint is 4.2:1 on light; the dot keeps the accent */
  font-size: var(--fs-small);
  font-weight: 700;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
/* An old set whose DJ is live elsewhere now: the way there, under the DJ's name (a link). */
/* No connection: how old the songs are, and that they'll update; quiet, not an alarm. */
.gig-offline { margin: 0 0 var(--s4); padding: var(--s3) var(--s4); border-radius: var(--radius); background: var(--tile); box-shadow: inset 0 0 0 1px var(--tile-edge); color: var(--muted); font-size: var(--fs-small); }
.gig-offline::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: var(--s2); border-radius: 50%; background: var(--muted); vertical-align: middle; }
.gig-live-now {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin: 0 0 var(--s4);
  padding: var(--s3) var(--s4);
  border-radius: var(--radius);
  background: var(--tile);
  box-shadow: inset 0 0 0 1px var(--tile-edge);
  color: var(--accent-ink);
  font-weight: 650;
}
.gig-live-now[hidden] { display: none; }
/* The DJ's message to dancers, under the DJ's name. */
.gig-announcement {
  margin: 0 0 var(--s4);
  padding: var(--s3) var(--s4);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 650;
  font-size: var(--fs-lead);
  overflow-wrap: anywhere;
}
.gig-now {
  display: grid;
  gap: var(--s4);
  margin-bottom: var(--s2);
}
.gig-now-label { margin: 0; font-size: var(--fs-small); font-weight: 600; color: var(--muted); }
.gig-now-song { display: flex; gap: var(--s4); align-items: center; }
.gig-now-cover { width: 96px; height: 96px; border-radius: var(--radius-sm); object-fit: cover; flex: none; }
.gig-now-text { min-width: 0; display: grid; gap: var(--s2); justify-items: start; }
.gig-now-text h1 { margin: 0; font-size: var(--fs-page); line-height: 1.05; overflow-wrap: anywhere; }
/* A long title smaller (gigview.titleLength), so the card stays a card. */
.gig-now-text h1[data-length="long"] { font-size: var(--fs-title); }
/* A song the DJ didn't share, playing now: said quietly, without a cover square. */
.gig-now.hidden-song h1 { color: var(--muted); font-size: var(--fs-lead); font-weight: 600; font-family: inherit; }
.gig-now.hidden-song .gig-cover-none { display: none; }
.gig-now-text p { margin: 0; font-size: var(--fs-part); }
/* Side by side; on a narrow phone (360 px) stacked, never with the text broken over two lines. */
.gig-now-open { display: flex; flex-wrap: wrap; gap: var(--s2); }
.gig-now-open .button { flex: 1 1 120px; border-radius: 999px; white-space: nowrap; }
.gig-now-open:not(:has(.button:not([hidden]), .gig-heart)) { display: none; }
.gig-now-missing { margin: var(--s2) 0 0; }
.gig-played h2, .gig-all h2, .gig-loved h2 { margin: var(--s6) 0 var(--s1); font-size: var(--fs-lead); font-weight: 700; }
.gig-songs { list-style: none; margin: 0; padding: 0; }
.gig-song {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--row-pad) 0;
  border-bottom: 1px solid var(--border);
}
.gig-song-text { flex: 1; min-width: 0; }
/* Nothing cut that a dancer looks for: the title takes two lines, the artist wraps, and who played
   it and when go on a line under them (the heart and the link leave the text ~200px on a phone). */
.gig-song-text p { margin: 0; overflow-wrap: anywhere; }
.gig-song-title { font-weight: 600; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.gig-song-artist, .gig-when, .gig-listen-label { color: var(--muted); font-size: var(--fs-small); }
.gig-song-meta { display: flex; flex-wrap: wrap; gap: 0 var(--s2); color: var(--muted); font-size: var(--fs-small); }
/* Back to back: who played the song, where the DJ changes (the name alone, in the accent ink). */
.gig-song-dj { color: var(--accent-ink); font-weight: 600; }
.gig-now-dj, .gig-now-tempo { margin: 0; color: var(--muted); font-size: var(--fs-small); }
.gig-now-dj:empty, .gig-now-tempo:empty { display: none; }
.gig-when { font-size: var(--fs-small); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gig-all .gig-when, .gig-loved .gig-when { width: 44px; flex: none; }
.gig-cover { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; }
/* No cover: a record (its label and a groove), so it reads as "no cover", not as one that didn't load. */
.gig-cover-none { display: inline-block; background: radial-gradient(circle, var(--tile-edge) 0 12%, transparent 13% 40%, var(--tile-edge) 41% 43%, transparent 44%), var(--tile); box-shadow: inset 0 0 0 1px var(--tile-edge); }
.gig-open {
  width: 44px;
  height: 44px;
  flex: none;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--accent-ink); /* a link: it goes to Spotify or TIDAL */
  box-shadow: inset 0 0 0 1px var(--field-border);
}
/* A heart on a song (while live): pressed, filled in the accent's ink colour, also while hovered (a
   ghost button's hover is the text colour, and a phone keeps the hover after a tap). */
button.gig-heart { width: 44px; height: 44px; padding: 0; flex: none; border-radius: 50%; color: var(--muted); }
button.gig-heart svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
button.gig-heart[aria-pressed="true"], button.gig-heart[aria-pressed="true"]:hover:not(:disabled) { color: var(--accent-ink); }
button.gig-heart[aria-pressed="true"] svg { fill: currentColor; }
/* A heart tapped without a connection: as tapped, a little quieter, until it is sent (offline.js). */
button.gig-heart.waiting { opacity: 0.6; }
/* On the song's line, at the right of its title, as in the list: never alone under the buttons. */
.gig-now-heart { margin-left: auto; flex: none; align-self: center; }
.gig-now-heart:empty { display: none; }
.gig-now-heart .gig-heart { width: 52px; height: 52px; }
.gig-now-heart .gig-heart svg { width: 28px; height: 28px; }
.gig-open:hover { background: var(--raised); }
.gig-open:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.gig-open svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.gig-switch { margin: 0 0 var(--s2); }
.gig-missing h1 { margin: 0 0 var(--s2); font-size: var(--fs-title); }
.gig-foot { padding: var(--s4); text-align: center; }
.gig-foot a { white-space: nowrap; }
/* The way to the help for dancers: a round "?" at the end of the header. */
.gig-help-link {
  width: 44px;
  height: 44px;
  flex: none;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--field-border);
  font-weight: 700;
  text-decoration: none;
}
.gig-help-link:hover { color: var(--text); background: var(--raised); }
/* Help for dancers (gighelp.html). */
.gig-help h1 { margin: var(--s2) 0 var(--s2); font-size: var(--fs-page); }
.gig-help h2 { margin: var(--s6) 0 var(--s2); font-size: var(--fs-lead); }
.gig-help p { margin: 0 0 var(--s2); line-height: 1.5; }
.gig-help-lead { font-size: var(--fs-lead); }
.gig-help-back { font-weight: 600; }
@media (pointer: coarse) { .gig-help-back { display: inline-block; padding: var(--s3) 0; line-height: 20px; } } /* a finger's 44px */
.gig-help-heart { color: var(--accent-ink); }
.gig-help-end { margin-top: var(--s7); }
.gig-help-steps { display: grid; gap: var(--s2); margin: 0 0 var(--s4); padding-left: var(--s6); line-height: 1.5; }
.gig-set { margin: 0 0 var(--s2); }
.gig-set h1 { margin: 0 0 var(--s1); font-size: var(--fs-page); line-height: 1.1; }
/* The setlist's tempo through the night: a bar per song, its height (--size, set by gig.js) from
   its tempo; the fastest in the accent colour. */
.gig-tempo { margin: var(--s4) 0 var(--s1); }
.gig-tempo-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 56px;
  margin-top: var(--s2);
  border-bottom: 1px solid var(--field-border);
}
.gig-tempo-bar {
  flex: 1;
  min-width: 1px;
  height: calc(var(--size) * 100%);
  border-radius: 2px 2px 0 0;
  background: var(--bar);
}
.gig-tempo-bar.peak { background: var(--accent); }
.gig-tempo-axis { display: flex; justify-content: space-between; margin-top: var(--s1); font-size: var(--fs-caption); color: var(--muted); }
/* The setlist's search, the song playing at the time searched, and the DJ's next gig. */
.gig-search { margin: var(--s1) 0 var(--s2); }
.gig-search input { width: 100%; box-sizing: border-box; }
.gig-song[aria-current="true"] { background: var(--accent-soft); border-radius: var(--radius-sm); margin: 0 calc(-1 * var(--s2)); padding-left: var(--s2); padding-right: var(--s2); }

/* The dancers' page: where every song's open button goes, as two buttons side by side; right above
   the songs, with room above it. */
.gig-listen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s3);
  margin: var(--s8) 0 0;
}
/* The set as a playlist on Spotify or TIDAL, under Playing now: a tile per service with its
   logo (28px with room around it: brand/services/README.md), easy to find and to tap. */
.gig-playlist { margin: var(--s4) 0 0; display: grid; gap: var(--s2); }
.gig-playlist[hidden] { display: none; }
.gig-playlist-link {
  display: flex; align-items: center; gap: var(--s4); min-height: 56px; padding: var(--s3) var(--s4);
  border-radius: var(--radius-sm); background: var(--tile); box-shadow: inset 0 0 0 1px var(--tile-edge);
  color: var(--text); text-decoration: none;
}
.gig-playlist-link .service-icon { margin: 0; }
.gig-playlist-link::after { content: '↗' / ''; margin-left: auto; color: var(--accent-ink); font-weight: 650; }
.gig-playlist-link:hover { background: var(--raised); }
.gig-playlist-link:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.gig-playlist-text { display: grid; }
.gig-playlist-text span { color: var(--muted); font-size: var(--fs-small); }
.gig-request { margin: var(--s4) 0 0; display: grid; gap: var(--s2); }
.gig-request[hidden] { display: none; }
.gig-request label { font-weight: 650; }
.gig-request-row { display: flex; gap: var(--s2); }
.gig-request-row input { flex: 1; min-width: 0; }
.gig-request p { margin: 0; }
/* The dancers' page's switches, as tall as its other targets (44 px), tapped on a dark floor. */
.gig-page .segmented span { padding: var(--s3) var(--s4); line-height: 20px; font-size: var(--fs-body); }

/* ---------- whatwasthatsong.app's home page (wwts.html) ---------- */
/* The wordmark: a record with the name beside it (here and on the venue screen). */
.wwts-logo {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.35em;
  font: 500 clamp(26px, 4.4vmin, 52px)/0.95 var(--heading-font);
  letter-spacing: -0.035em;
}
.wwts-mark { width: 2.1em; height: 2.1em; flex: none; }
/* The mark: a dark record (on dark with a fine light edge) with a coral label carrying the "?". */
.wwts-wordmark { display: grid; }
.wwts-song { color: var(--coral); font-weight: 800; }
.wwts-home {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
main.wwts-home-main { max-width: 560px; padding: var(--s12) var(--s6); display: grid; gap: var(--s6); }
.wwts-home-main .wwts-logo { font-size: clamp(34px, 9vw, 56px); }
.wwts-home-lead { margin: 0; font-size: var(--fs-lead); line-height: 1.5; }
.wwts-home-steps { margin: 0; padding-left: var(--s6); display: grid; gap: var(--s2); color: var(--muted); }

/* ---------- An event with rooms, for dancers (event.html) ---------- */
/* Phone first: the event's name, then a card per room, the whole card a link (a finger's target). */
.event-brand { margin: 0 0 var(--s4); font-size: var(--fs-small); font-weight: 600; }
.event-brand a { color: var(--muted); text-decoration: none; }
.event-public-head { margin-bottom: var(--s5); }
.event-public-head h1 { margin: 0 0 var(--s1); font-size: var(--fs-page); }
.event-public-head p { margin: 0; }
.event-missing { margin: 0 0 var(--s4); font-weight: 600; }
.room-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.room-card {
  display: grid; gap: var(--s1); padding: var(--s4); border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow); color: var(--text); text-decoration: none;
}
.room-card:hover { background: var(--raised); }
.room-card:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.room-card.wanted { box-shadow: var(--shadow), inset 0 0 0 2px var(--accent); } /* the room asked for */
.room-card-head { display: flex; align-items: center; gap: var(--s2); min-height: 28px; }
.room-card-name { flex: 1; min-width: 0; font: 600 var(--fs-lead)/1.2 var(--heading-font); overflow-wrap: anywhere; }
.room-card-head::after { /* the whole card goes to the room: a chevron at its end (was: a small › after the name) */
  content: '';
  flex: none;
  width: 9px;
  height: 9px;
  margin-right: var(--s1);
  border-top: 2px solid var(--muted);
  border-right: 2px solid var(--muted);
  transform: rotate(45deg);
}
.room-card-now { overflow-wrap: anywhere; }
.event-public-foot { margin: var(--s6) 0 0; }
/* The whole schedule, once published: a quiet way in under the rooms, then per night a time, who and where. */
.event-schedule { margin-top: var(--s6); }
.event-schedule summary { cursor: pointer; font-weight: 650; color: var(--accent-ink); }
@media (pointer: coarse) {
  .event-schedule summary, #timetable-ics { padding: var(--s3) 0; } /* 44px for a finger */
}
.event-schedule-night { margin: var(--s6) 0 var(--s2); font-size: var(--fs-part); }
.event-schedule-slots { list-style: none; margin: 0; padding: 0; }
.event-schedule-slots li { display: grid; grid-template-columns: 7.5em minmax(0, 1fr) auto; gap: var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--border); }
.event-schedule-time { font-variant-numeric: tabular-nums; color: var(--muted); }
.event-schedule-links { margin: var(--s4) 0 0; }
/* The contest's heat list: a division under its name and line, each round's heats as the schedule's rows. */
.event-heats-line { margin: 0; font-size: var(--fs-small); }
.event-heats-round { margin: var(--s4) 0 var(--s1); font-size: var(--fs-small); font-weight: 650; color: var(--muted); }
.event-schedule-slots.event-heats-list li { grid-template-columns: 6.5em minmax(0, 1fr) auto; }

/* ---- The schedule to print (timetable.html, js/timetable.js): per night the rooms side by side ---- */
main.timetable { width: 100%; max-width: 1100px; box-sizing: border-box; padding: var(--s6) var(--s4) var(--s8); flex: 1; }
.timetable-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); margin: var(--s4) 0 0; }
.timetable-night { margin-top: var(--s8); break-inside: avoid; }
.timetable-night h2 { margin: 0 0 var(--s3); font-size: var(--fs-section); }
.timetable-rooms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: var(--s4); }
.timetable-room { padding: var(--s4); border-radius: var(--radius-sm); background: var(--tile); box-shadow: inset 0 0 0 1px var(--tile-edge); }
.timetable-room h3 { margin: 0 0 var(--s2); font-size: var(--fs-part); }
.timetable-room ol { list-style: none; margin: 0; padding: 0; }
.timetable-room li { padding: var(--s1) 0; }
.timetable-time { display: block; font-size: var(--fs-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.timetable-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); margin-top: var(--s10); break-inside: avoid; }
#timetable-url { overflow-wrap: anywhere; } /* a long address breaks at a large text size */
.timetable-foot p { margin: 0; }
.timetable-qr { flex: none; background: #fff; border-radius: var(--radius-sm); }
/* On paper: light whatever the theme, without the buttons and the brand's link, the rooms in one row. */
@media print {
  :root, :root[data-theme] { color-scheme: light; }
  body { background: #fff; }
  .timetable-actions, .event-brand { display: none; }
  main.timetable { max-width: none; padding: 0; }
  .timetable-rooms { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}
