/* ---------- fonts (self-hosted) ---------- */
@font-face {
  font-family: "Big Shoulders Display"; font-style: normal; font-weight: 700 900; font-display: swap;
  src: url(/fonts/bigshoulders-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Big Shoulders Display"; font-style: normal; font-weight: 700 900; font-display: swap;
  src: url(/fonts/bigshoulders-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Figtree"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/fonts/figtree-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/fonts/figtree-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;
  --bg: #17122b;
  --panel: #2b2347;
  --panel-deep: #211a3c;
  --field: #1b1532;
  --line: #57499a;
  --rule: #40356b;
  --text: #ffffff;
  --muted: #c9c2e0;
  --faint: #a79fc4;
  --pink: #ff3f86;
  --pink-hot: #ff5c98;
  --gold: #ffc23d;
  --mint: #7fe3c0;
  --sky: #8fd3ff;
  --red: #ff8a8a;

  --font-display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif-condensed, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line) var(--bg); accent-color: var(--pink); }
body {
  margin: 0; color: var(--text); min-height: 100dvh;
  background:
    radial-gradient(90% 420px at 50% -120px, rgba(255, 63, 134, .22), transparent 70%),
    radial-gradient(60% 300px at 100% 0, rgba(143, 211, 255, .08), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
  font-family: var(--font-body); font-size: 16px; line-height: 1.5; letter-spacing: .005em;
  -webkit-font-smoothing: antialiased; font-optical-sizing: auto;
}
::selection { background: var(--pink); color: #fff; }
main { max-width: 560px; margin: 0 auto; padding: 20px 16px 40px; display: flex; flex-direction: column; gap: 16px; }
main.wide { max-width: 860px; }

/* ---------- type roles ---------- */
h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; }
h1 {
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(2.5rem, 11vw, 3.4rem); line-height: .92; letter-spacing: .005em; margin: 0;
}
h2 {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: 1.6rem; line-height: 1; letter-spacing: .02em; margin: 10px 0 0;
}
a { color: var(--sky); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
.muted { color: var(--muted); font-size: 15px; }
.small { font-size: 14px; }
.hidden { display: none !important; }
.show-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); font-size: 17px; font-weight: 600; margin-top: 8px; }

/* LIVE badge with a breathing dot */
.live {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; vertical-align: middle;
  font-family: var(--font-body); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: #ffd6d6; background: rgba(255, 138, 138, .14); border: 1px solid rgba(255, 138, 138, .5);
  padding: 3px 10px 3px 8px; border-radius: 999px;
}
.live::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 0 rgba(255, 138, 138, .7); animation: onair 1.8s var(--ease-out) infinite;
}
@keyframes onair {
  0% { box-shadow: 0 0 0 0 rgba(255, 138, 138, .7); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(255, 138, 138, 0); }
}

/* ---------- buttons ---------- */
button, .btn {
  font: inherit; font-weight: 700; color: var(--text); background: var(--rule); border: 0; border-radius: 10px;
  padding: 11px 14px; min-height: 44px; cursor: pointer; text-decoration: none; display: inline-block; text-align: center;
  transition: background-color .15s, transform .12s var(--ease-out), box-shadow .2s, filter .15s;
  -webkit-tap-highlight-color: transparent;
}
button:active:not([disabled]), .btn:active { transform: scale(.98); }
button:focus-visible, .btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
button[disabled] { opacity: .55; cursor: default; }

.btn-signup, .btn-tip {
  display: block; width: 100%; font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  letter-spacing: .03em; line-height: 1; border-radius: 16px;
}
.btn-signup {
  background: linear-gradient(180deg, var(--pink-hot), var(--pink)); font-size: 2rem; padding: 22px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 12px 30px -10px rgba(255, 63, 134, .75);
}
.btn-signup:hover:not([disabled]) { filter: brightness(1.06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 16px 38px -10px rgba(255, 63, 134, .9); }
/* The main call to action on the singer pages: bigger, with a slow glow so it pulls the eye */
.btn-signup.btn-hero {
  font-size: clamp(1.45rem, 7.4vw, 2.4rem); padding: 24px 10px; border-radius: 20px; white-space: nowrap; border: 2px solid rgba(255, 255, 255, .35);
  animation: herobeat 2.6s ease-in-out infinite;
}
.btn-hero::before {
  content: ""; display: inline-block; width: .82em; height: .82em; margin-right: .28em; vertical-align: -.08em; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5A4.5 4.5 0 0 0 7.5 6v6a4.5 4.5 0 0 0 9 0V6A4.5 4.5 0 0 0 12 1.5z'/%3E%3Cpath d='M5 11.2a1.3 1.3 0 0 1 1.3 1.3 5.7 5.7 0 0 0 11.4 0 1.3 1.3 0 0 1 2.6 0 8.3 8.3 0 0 1-7 8.2v1.5a1.3 1.3 0 0 1-2.6 0v-1.5a8.3 8.3 0 0 1-7-8.2A1.3 1.3 0 0 1 5 11.2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5A4.5 4.5 0 0 0 7.5 6v6a4.5 4.5 0 0 0 9 0V6A4.5 4.5 0 0 0 12 1.5z'/%3E%3Cpath d='M5 11.2a1.3 1.3 0 0 1 1.3 1.3 5.7 5.7 0 0 0 11.4 0 1.3 1.3 0 0 1 2.6 0 8.3 8.3 0 0 1-7 8.2v1.5a1.3 1.3 0 0 1-2.6 0v-1.5a8.3 8.3 0 0 1-7-8.2A1.3 1.3 0 0 1 5 11.2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
@keyframes herobeat {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 12px 30px -10px rgba(255, 63, 134, .75); }
  50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 0 0 6px rgba(255, 63, 134, .25), 0 16px 44px -8px rgba(255, 63, 134, .95); }
}
.btn-tip {
  background: linear-gradient(180deg, #ffd166, var(--gold)); color: #241a00; font-size: 1.7rem; padding: 17px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 10px 26px -12px rgba(255, 194, 61, .6);
}
.btn-tip:hover { filter: brightness(1.05); }
.btn-quiet { background: transparent; border: 1px solid var(--line); }
.btn-quiet:hover { background: rgba(87, 73, 154, .25); }
.btn-danger { background: transparent; border: 1px solid var(--red); color: var(--red); }
.btn-primary { background: var(--pink); }
.btn-primary:hover { background: var(--pink-hot); }

/* ---------- surfaces ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.panel > h2:first-child { margin-top: 0; }

/* Your place in line */
.place {
  display: block; width: 100%; text-align: left; font-weight: 400; color: inherit;
  background: linear-gradient(160deg, #33295a, var(--panel) 60%); border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px 16px;
}
.place:hover { background: linear-gradient(160deg, #382d63, #2e254c 60%); }
.place b {
  display: block; font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: 2.3rem; line-height: .95; letter-spacing: .01em; color: var(--text); margin-bottom: 6px;
}
.place .place-num { color: var(--gold); font-variant-numeric: tabular-nums; display: inline-block; }
.place .place-sub { font-size: 17px; font-weight: 600; }
.place .place-sub .wait { color: var(--gold); font-weight: 700; white-space: nowrap; }
label .optional { font-weight: 500; color: var(--faint); }
.place .muted { margin-top: 2px; }
.place .link { display: inline-flex; align-items: center; gap: 6px; color: var(--sky); font-weight: 700; font-size: 15px; margin-top: 12px; }
.place .link::after {
  content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .2s var(--ease-out);
}
.place[aria-expanded="true"] .link::after { transform: rotate(45deg) translate(-2px, -2px); }
.place .added { display: block; color: var(--mint); font-weight: 800; font-size: 15px; margin-bottom: 6px; }

.place-home { margin-top: 14px; text-decoration: none; }
.place-home + .share-qr { margin-top: 20px; }

/* Venue page, once you're in line: your place comes straight after the
   heading, and the sign-up button steps back to a smaller "again". */
.venue-head { order: -2; }
.place.first { order: -1; }
.btn-signup.btn-again { font-size: 1.5rem; padding: 15px 12px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }

/* The next few singers, inside the place card */
.place .up-next { list-style: none; margin: 10px 0 2px; padding: 8px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.place .up-next li { display: flex; gap: 10px; align-items: baseline; font-size: 16px; }
.place .up-next .num { color: var(--gold); font-weight: 800; min-width: 1.2em; font-variant-numeric: tabular-nums; }
.place .up-next .who { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place .up-next li.mine .who { color: var(--mint); }
.place .up-next li.mine .who::after { content: " (you)"; font-weight: 400; color: var(--muted); }

/* Almost up: a gold edge so it reads at a glance */
.place.soon { border-color: var(--gold); }
.place .soon-note { display: block; color: var(--gold); font-weight: 800; font-size: 15px; margin-bottom: 6px; }
.song-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
/* Narrow phones: keep the song readable and drop the buttons onto their own line under it */
.list li:has(> .song-actions) { flex-wrap: wrap; }
.list li:has(> .song-actions) > .song { min-width: 9rem; }
.list li > .song-actions { margin-left: auto; }

/* It's your turn: the card takes the spotlight */
.place.up { border-color: var(--pink); background: linear-gradient(160deg, #5a2050, #33244e 65%); animation: spotlight 2.4s ease-in-out infinite; }
.place.up b { color: #fff; }
@keyframes spotlight {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 63, 134, 0), 0 10px 40px -12px rgba(255, 63, 134, .5); }
  50% { box-shadow: 0 0 0 4px rgba(255, 63, 134, .25), 0 14px 50px -10px rgba(255, 63, 134, .8); }
}

/* Just signed up: the card lights up once and the number lands */
.place.lit { animation: lightup 1.4s var(--ease-out) 1; }
.place.lit .place-num { animation: numland .7s var(--ease-out) .1s 1 backwards; }
@keyframes lightup {
  0% { border-color: var(--mint); box-shadow: 0 0 0 6px rgba(127, 227, 192, .35), 0 0 60px rgba(127, 227, 192, .4); }
  100% { border-color: var(--line); box-shadow: 0 0 0 0 rgba(127, 227, 192, 0), 0 0 0 rgba(127, 227, 192, 0); }
}
@keyframes numland {
  0% { transform: translateY(-.35em) scale(1.3); opacity: 0; filter: blur(4px); }
  100% { transform: none; opacity: 1; filter: none; }
}

/* ---------- forms ---------- */
label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; }
input, textarea, select {
  width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--field);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; min-height: 48px; caret-color: var(--pink);
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }
input:focus, textarea:focus, select:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255, 63, 134, .25); }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 0; }
textarea { min-height: 76px; resize: vertical; }
input[type="file"] { padding: 7px; color: var(--muted); cursor: pointer; }
input[type="file"]::file-selector-button {
  font: inherit; font-weight: 700; color: var(--text); background: var(--rule); border: 0; border-radius: 7px;
  padding: 6px 12px; margin-right: 12px; cursor: pointer;
}
input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; padding: 0; margin: 0 8px 0 0; vertical-align: -4px; }
h2 + .field { margin-top: 12px; }
.field { margin-bottom: 14px; position: relative; }
.error { color: var(--red); font-weight: 700; margin: 0 0 10px; }
.ok { color: var(--mint); font-weight: 700; }

.suggest {
  list-style: none; margin: 6px 0 0; padding: 4px; background: #2a2150; border: 1px solid var(--line); border-radius: 12px;
  max-height: min(60vh, 420px); overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 14px 34px -6px rgba(0, 0, 0, .6);
}
.suggest button { display: block; width: 100%; background: transparent; color: var(--text); text-align: left; font-weight: 400; border-radius: 8px; padding: 10px 12px; }
.suggest li + li button { margin-top: 2px; }
.suggest button:hover, .suggest button:focus { background: rgba(255, 63, 134, .18); outline: 0; }
.suggest b { display: block; font-weight: 700; }
.suggest span { color: var(--muted); font-size: 14px; }
.suggest .suggest-count { color: var(--muted); font-size: 13px; padding: 6px 12px 4px; }

dialog {
  width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); background: var(--panel-deep); color: var(--text);
  border: 1px solid var(--line); border-radius: 20px; padding: 18px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8);
}
dialog[open] { animation: rise .35s var(--ease-out); }
dialog::backdrop { background: rgba(10, 6, 22, .72); backdrop-filter: blur(3px); }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1 1 160px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.dialog-head h2 { margin: 0; }

/* ---------- lists ---------- */
.list { list-style: none; margin: 10px 0 0; padding: 0; }
.list li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); align-items: flex-start; }
.list li:first-child { border-top: 0; }
.list li.mine { background: rgba(127, 227, 192, .12); border-radius: 10px; padding-left: 10px; padding-right: 10px; }
.list li.mine:has(+ li.mine.stacked) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.list li.mine.stacked { border-top-left-radius: 0; border-top-right-radius: 0; }
.num { font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; line-height: 1; color: var(--mint); min-width: 28px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.song { min-width: 0; overflow-wrap: anywhere; }
.song .who { font-weight: 700; font-size: 17px; }

/* Home, no show live: the next show leads */
.next-show { background: linear-gradient(160deg, #33295a, var(--panel) 60%); }
.next-show h2.next-when { font-weight: 900; font-size: 2.3rem; line-height: .95; margin: 0; }
.next-when .next-time { color: var(--gold); font-variant-numeric: tabular-nums; }
.next-venue { font-size: 19px; font-weight: 700; margin: 6px 0 2px; }
.next-hint { margin: 10px 0 0; }

/* Show schedule on the home page */
.sched li { gap: 14px; }
.day {
  flex: 0 0 52px; font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: 1.45rem; line-height: 1; letter-spacing: .02em; color: var(--muted); padding-top: 2px;
}
.day.today { color: var(--gold); }
.sched .song { flex: 1; }
.sched .when { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

details summary { cursor: pointer; font-weight: 700; min-height: 28px; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: ""; flex: 0 0 auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s var(--ease-out);
}
details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }

/* KJ */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 430px) { .tabs button { flex: 1 1 auto; font-size: 15px; padding-left: 8px; padding-right: 8px; } }
.tabs button[aria-selected="true"] { background: var(--pink); }
.q-row { border-top: 1px solid var(--rule); padding: 12px 0; }
.q-row:first-child { border-top: 0; }
.q-stacked { margin-left: 22px; padding-left: 12px; border-top: 0; border-left: 1px solid var(--line); }
.list li.stacked { border-top: 0; padding-top: 0; padding-left: 40px; }
.list li.mine.stacked { padding-left: 50px; }
.q-title { font-size: 18px; font-weight: 800; overflow-wrap: anywhere; }
.q-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.q-actions button { padding: 8px 12px; }
.q-actions .btn-danger { margin-left: auto; }
.q-actions .move { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; }
.q-actions .move svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.q-count { color: var(--muted); font-size: 15px; margin: 0 0 4px; }
@media (max-width: 520px) {
  /* Phones: Sang + Added on the first line, the arrows and Remove on the second */
  .q-actions [data-act="entered"] { flex: 1 1 calc(100% - 80px); }
  form.sched { display: grid; grid-template-columns: 1fr 1fr; }
  form.sched > :first-child, form.sched > button { grid-column: 1 / -1; }
}
.q-actions .done { background: #15795a; }
.tag { display: inline-block; font-size: 12px; font-weight: 800; padding: 2px 7px; border-radius: 6px; margin-left: 4px; }
.tag-new { background: var(--gold); color: #241a00; }
.tag-get { background: var(--red); color: #300; }
.note { background: var(--rule); border-radius: 8px; padding: 6px 9px; margin-top: 6px; font-size: 14px; overflow-wrap: anywhere; }
.qr-box { background: #fff; padding: 14px; border-radius: 14px; display: inline-block; line-height: 0; box-shadow: 0 0 0 6px rgba(255, 255, 255, .06), 0 14px 40px -14px rgba(143, 211, 255, .45); }
.qr-box svg { width: 220px; height: 220px; }
.share-qr { text-align: center; }
.panel .btn-signup + .share-qr { margin-top: 20px; }
.share-qr h2 { margin: 0; }
.share-qr p { margin: 6px 0 14px; }
.venue-card { border-top: 1px solid var(--rule); padding: 14px 0; }
.venue-card:first-child { border-top: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  body { background: #fff; color: #000; }
}
