/* Nomad Karaoke — singer-facing request form. Mobile-first. */

:root {
  --nk-bg: #0a0a0a;
  --nk-card: #141414;
  --nk-card-2: #1c1c1c;
  --nk-text: #f2f2f2;
  --nk-text-dim: #aaa;
  --nk-accent: #ff4dcf;       /* Nomad pink */
  --nk-accent-hover: #ff6fd9;
  --nk-good: #32d58a;
  --nk-warn: #f4a83a;
  --nk-error: #ff6b6b;
  --nk-border: #2a2a2a;

  /* Layout tokens — every top-level block (header, cards, footers) shares ONE
     column width and gutter so edges line up on every tab. */
  --nk-shell-w: 480px;
  --nk-gutter: 0.75rem;          /* screen edge → column, on phones */
  --nk-pad: 1.25rem;             /* inside a card */
  --nk-gap: 0.75rem;             /* between stacked top-level blocks */
  --nk-radius: 12px;             /* cards */
  --nk-radius-sm: 10px;          /* tiles, inner panels */
  --nk-tile-pad: 0.65rem 0.9rem;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--nk-bg);
  color: var(--nk-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}

body.sing {
  padding: 0;
  /* Room for the fixed bottom tab bar (+ iOS home-indicator inset). */
  padding-bottom: calc(3.6rem + env(safe-area-inset-bottom, 0px));
}

/* --- Bottom tab bar -------------------------------------------------------- */

.sing-tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  justify-content: space-around;
  background: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--nk-border);
  padding: 0.3rem 0.5rem calc(0.3rem + env(safe-area-inset-bottom, 0px));
}
.sing-tab {
  flex: 1;
  max-width: 10rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  background: none;
  border: 0;
  color: var(--nk-text-dim);
  font-size: 0.7rem;
  padding: 0.25rem 0.4rem;
  cursor: pointer;
  position: relative;
  border-radius: 8px;
}
.sing-tab .sing-tab-icon { font-size: 1.15rem; line-height: 1.2; }
.sing-tab.active { color: var(--nk-accent); }
.sing-tab:active { background: var(--nk-card-2); }
.sing-tab-badge {
  position: absolute;
  top: 0;
  right: calc(50% - 1.6rem);
  background: var(--nk-accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 1.1rem;
  height: 1.1rem;
  line-height: 1.1rem;
  border-radius: 999px;
  text-align: center;
  padding: 0 0.2rem;
}

/* The shared column. Anything top-level uses this width so the header,
   status tiles, cards and footers have identical left/right edges. */
.sing-shell,
.sing-card,
.rules-footer,
.sing-event-footer {
  width: calc(100% - 2 * var(--nk-gutter));
  max-width: var(--nk-shell-w);
  margin-left: auto;
  margin-right: auto;
}

.sing-card {
  margin-top: var(--nk-gap);
  margin-bottom: 1.5rem;
  padding: var(--nk-pad);
  background: var(--nk-card);
  border-radius: var(--nk-radius);
  border: 1px solid var(--nk-border);
}

.sing-closed { text-align: center; }

h1 { font-size: 1.6rem; margin: 0 0 0.75rem; }
h2 { font-size: 1.35rem; margin: 0 0 0.75rem; }
h3 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em;
     color: var(--nk-text-dim); margin: 1rem 0 0.5rem; }

p { margin: 0.5rem 0; }
.hint { color: var(--nk-text-dim); font-size: 0.9rem; }
.error { color: var(--nk-error); font-size: 0.9rem; min-height: 1em; }

/* Persistent self-rename affordance (landing / search / done). Underlined so
   it reads as tappable, with a comfortable touch target on mobile. */
.edit-name-link {
  color: var(--nk-accent, #ff4dcf);
  text-decoration: underline;
  white-space: nowrap;
  padding: 0.15rem 0;
}
.done-identity { margin-top: -0.25rem; }
/* "song for a friend" sits beside "edit my name" — same tappable link style,
   and any other in-hint link (e.g. "Switch singer") stays readable on dark. */
.friend-song-link,
.hint a {
  color: var(--nk-accent, #ff4dcf);
  text-decoration: underline;
  padding: 0.15rem 0;
}
.friend-song-link { white-space: nowrap; }
/* Rename guard: full-width stacked choices, friend first. */
.rename-confirm-actions { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1rem; }
.rename-confirm-actions .btn { width: 100%; }
.request-for-friend { width: 100%; margin: 0 0 12px; }

label {
  display: block;
  margin: 0.75rem 0;
  color: var(--nk-text-dim);
  font-size: 0.85rem;
}

input[type="text"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="email"] {
  display: block;
  width: 100%;
  padding: 0.75rem;
  margin-top: 0.25rem;
  background: var(--nk-card-2);
  color: var(--nk-text);
  border: 1px solid var(--nk-border);
  border-radius: 8px;
  font-size: 1rem;
}
input:focus {
  outline: none;
  border-color: var(--nk-accent);
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--nk-text);
}
.btn.primary {
  background: var(--nk-accent);
  color: #0a0a0a;
}
.btn.primary:hover { background: var(--nk-accent-hover); }
.btn.primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn.ghost { border-color: var(--nk-border); }

.row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}
.row .btn { flex: 1; }

.result-row {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  margin: 0.3rem 0;
  background: var(--nk-card-2);
  border: 1px solid var(--nk-border);
  border-radius: 8px;
  color: var(--nk-text);
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
}
.result-row:hover { border-color: var(--nk-accent); }
.r-title { font-weight: 600; }
.r-sub { color: var(--nk-text-dim); font-size: 0.85rem; flex: 1; }

/* Grouped-result card — one per unique song. Column layout so the primary
   CTA sits cleanly below the title and the expander (Phase B) flows below
   that without disturbing alignment. */
.result-row.grouped {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.3rem;
  padding: 0.9rem;
  cursor: default;
}
.result-row.grouped .r-title { font-weight: 600; }
.result-row.grouped .r-sub { color: var(--nk-text-dim); font-size: 0.85rem; }
.result-row.grouped .badge { align-self: flex-start; }
.result-row.grouped .btn-primary-cta {
  width: 100%;
  padding: 0.75rem;
  margin-top: 0.4rem;
  background: var(--nk-accent);
  color: var(--nk-bg);
  border: 0;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.result-row.grouped .btn-primary-cta:hover { opacity: 0.9; }

/* Phase B — inline version expander. Toggle button flips the caret/label
   between collapsed and expanded. */
.sing-versions-toggle {
  background: transparent;
  border: 0;
  color: var(--nk-text-dim);
  padding: 0.25rem 0;
  margin-top: 0.1rem;
  font-size: 0.8rem;
  cursor: pointer;
  text-align: left;
  align-self: flex-start;
}
.sing-versions-toggle:hover { color: var(--nk-accent); }
.sing-version-expander {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--nk-border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.sing-version-section h4 {
  margin: 0 0 0.3rem 0;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--nk-text-dim);
}
.sing-version-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  margin-bottom: 0.3rem;
  background: var(--nk-card);
  border: 1px solid var(--nk-border);
  border-radius: 6px;
}
.sing-version-card:last-child { margin-bottom: 0; }
.sing-version-main { flex: 1; min-width: 0; }
.sing-version-primary { font-weight: 600; font-size: 0.9rem; }
.sing-version-brand {
  background: none;
  border: 0;
  padding: 0;
  color: var(--nk-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline dotted var(--nk-text-dim);
  text-underline-offset: 3px;
}
.sing-version-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.25rem 0;
}
.sing-pill {
  border: 1px solid var(--nk-border);
  background: var(--nk-card-2);
  color: var(--nk-text-dim);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.1rem 0.55rem;
  cursor: pointer;
  min-height: 0;
}
.sing-pill-community {
  color: var(--nk-good);
  border-color: rgba(50, 213, 138, 0.5);
  background: rgba(50, 213, 138, 0.1);
}
.sing-pill-commercial {
  color: #7ab8ff;
  border-color: rgba(122, 184, 255, 0.45);
  background: rgba(122, 184, 255, 0.1);
}
.sing-pill-format {
  color: var(--nk-accent);
  border-color: rgba(255, 77, 207, 0.45);
  background: rgba(255, 77, 207, 0.08);
}
.sing-version-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: stretch;
}
.sing-version-preview {
  padding: 0.3rem 0.7rem;
  background: none;
  border: 1px solid var(--nk-border);
  color: var(--nk-text-dim);
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
}
.sing-version-preview:hover { color: var(--nk-accent); border-color: var(--nk-accent); }
.sing-version-pick {
  padding: 0.4rem 0.7rem;
  background: var(--nk-card-2);
  border: 1px solid var(--nk-accent);
  color: var(--nk-accent);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.sing-version-pick:hover { background: var(--nk-accent); color: var(--nk-bg); }

/* --- 💜 Tip tab ------------------------------------------------------------ */

.sing-tip-perk {
  background: rgba(142, 90, 214, 0.12);
  border: 1px solid rgba(142, 90, 214, 0.4);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  font-size: 0.9rem;
}
.sing-tip-title {
  text-align: center;
  font-size: 1.6rem;
}
.sing-tip-heart {
  color: var(--nk-accent);
  font-weight: 400;
}
.sing-tip-sub {
  text-align: center;
  color: var(--nk-text-dim);
  margin-top: -0.25rem;
}
.sing-tip-amount-heading {
  margin: 1.1rem 0 0.5rem;
  color: var(--nk-text);
  text-transform: none;
  letter-spacing: 0;
  font-size: 1.05rem;
}
.sing-tip-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}
.sing-tip-preset {
  border: 1px solid var(--nk-border);
  background: var(--nk-card-2);
  color: var(--nk-text-dim);
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.7rem 0;
  cursor: pointer;
  text-align: center;
}
.sing-tip-preset.active {
  border-color: var(--nk-accent);
  color: #fff;
  background: var(--nk-accent);
  box-shadow: 0 0 16px rgba(255, 77, 207, 0.35);
}
.sing-tip-custom-input {
  width: 100%;
  margin-top: 0.5rem;
  border-radius: 10px;
}
.sing-tip-methods {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 1.1rem 0 0.5rem;
}
.sing-tip-method {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  filter: saturate(1);
}
.sing-tip-method:active { filter: brightness(0.88); }
.sing-tip-icon { display: inline-flex; }
.sing-tip-icon svg { width: 1.2rem; height: 1.2rem; }
.sing-tip-method-sub {
  font-weight: 500;
  font-size: 0.95rem;
  opacity: 0.9;
}
.sing-tip-choose { text-align: center; }
.sing-tip-claim {
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--nk-border);
}
.sing-tip-claim h3 { margin-top: 0; }
.sing-tip-method-select {
  width: 100%;
  background: var(--nk-card-2);
  color: var(--nk-text);
  border: 1px solid var(--nk-border);
  border-radius: 8px;
  padding: 0.6rem;
  font-size: 1rem;
}
.sing-tip-submit { margin-top: 0.5rem; }
.sing-tip-claims { margin-top: 1.25rem; }

/* --- Shared singer modal (pill info, tech details, preview) --------------- */

.sing-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.sing-modal-backdrop.hidden { display: none; }
.sing-modal {
  background: var(--nk-card);
  border: 1px solid var(--nk-border);
  border-radius: 12px;
  max-width: 440px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 1rem 1.1rem 1.1rem;
}
.sing-preview-modal { max-width: 560px; }
.sing-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.sing-modal-title { margin: 0; font-size: 1.05rem; color: var(--nk-accent);
  text-transform: none; letter-spacing: 0; }
.sing-modal-close {
  background: none;
  border: 0;
  color: var(--nk-text-dim);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem 0.4rem;
  min-height: 0;
}
.sing-modal-close:hover { color: var(--nk-text); }
.sing-modal-hint { color: var(--nk-text-dim); font-size: 0.82rem; margin: 0.6rem 0 0; }
.sing-info-list { margin: 0; }
.sing-info-list dt {
  color: var(--nk-text-dim);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.6rem;
}
.sing-info-list dt:first-child { margin-top: 0; }
.sing-info-list dd { margin: 0.1rem 0 0; font-size: 0.9rem; }
.sing-brand-class { font-size: 0.8rem; font-weight: 700; margin: 0 0 0.5rem; }
.sing-brand-class-community { color: var(--nk-good); }
.sing-brand-class-commercial { color: #7ab8ff; }

/* Preview player internals (classes come from the shared preview.js) */
.preview-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-height: 80px;
  justify-content: center;
}
.preview-body video,
.preview-body canvas.preview-cdg-canvas {
  width: 100%;
  max-width: 520px;
  background: #000;
  border-radius: 6px;
}
.preview-body canvas.preview-cdg-canvas { image-rendering: pixelated; }
.preview-body audio { width: 100%; max-width: 520px; }
.preview-body iframe.preview-yt {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 6px;
}
.preview-loading,
.preview-unavailable { color: var(--nk-text-dim); padding: 18px; text-align: center; }
.preview-unavailable { color: var(--nk-error); }
.preview-type-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: normal;
  color: var(--nk-text-dim);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 1px 7px;
  margin-left: 8px;
  vertical-align: middle;
}
.preview-footer { display: none; }   /* KJ-only link flow — no footer for singers */

/* Phase B — Commercial vs Community explainer. One-time strip, dismissed
   permanently via localStorage. Styled as a soft info callout. */
.sing-cc-explainer {
  padding: 0.7rem 0.8rem;
  background: var(--nk-card);
  border: 1px solid var(--nk-accent);
  border-radius: 6px;
  margin-bottom: 0.5rem;
}
.sing-cc-title { font-weight: 700; font-size: 0.85rem; margin-bottom: 0.3rem; }
.sing-cc-list { margin: 0.2rem 0; padding-left: 1.1rem; font-size: 0.8rem; line-height: 1.45; }
.sing-cc-list li { margin-bottom: 0.25rem; }
.sing-cc-hint { color: var(--nk-text-dim); font-size: 0.75rem; margin: 0.3rem 0 0.5rem 0; }
.sing-cc-dismiss {
  padding: 0.3rem 0.7rem;
  background: var(--nk-accent);
  color: var(--nk-bg);
  border: 0;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

/* Phase C — empty-state triage. Three stacked cards each explain what the
   singer is committing to in terms of time and effort. */
.sing-empty-triage {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.6rem;
}
.sing-empty-header h3 {
  margin: 0 0 0.3rem 0;
  font-size: 1rem;
  font-weight: 700;
}
.sing-empty-header p {
  margin: 0;
  color: var(--nk-text-dim);
  font-size: 0.85rem;
}
.sing-empty-card {
  padding: 0.9rem 1rem;
  background: var(--nk-card-2);
  border: 1px solid var(--nk-border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
/* "Not the version you wanted? We can make it" — under non-empty results. */
.sing-make-offer {
  margin-top: var(--nk-gap);
}
.sing-make-offer-btn {
  width: 100%;
  background: none;
  border: 1px dashed var(--nk-border);
  border-radius: var(--nk-radius-sm);
  color: var(--nk-accent);
  font-weight: 600;
  padding: 0.8rem 1rem;
  cursor: pointer;
}
.sing-make-offer-btn:hover { color: var(--nk-accent-hover); }
.sing-empty-missing { margin: 0; }
.sing-empty-card h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}
.sing-empty-desc {
  margin: 0;
  color: var(--nk-text-dim);
  font-size: 0.85rem;
  line-height: 1.4;
}
.sing-empty-label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.8rem;
  color: var(--nk-text-dim);
}
.sing-empty-input {
  padding: 0.55rem 0.7rem;
  background: var(--nk-card);
  border: 1px solid var(--nk-border);
  border-radius: 6px;
  color: var(--nk-text);
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}
.sing-empty-submit {
  width: 100%;
  padding: 0.7rem;
  margin-top: 0.1rem;
  background: var(--nk-accent);
  color: var(--nk-bg);
  border: 0;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}
.sing-empty-submit:hover { opacity: 0.9; }
.sing-empty-external { /* hint that this one opens a new tab */ }

.sing-empty-howto {
  padding: 0.5rem 0.7rem;
  background: var(--nk-card);
  border: 1px solid var(--nk-border);
  border-radius: 6px;
}
.sing-empty-howto summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--nk-accent);
}
.sing-empty-howto-steps {
  margin: 0.5rem 0 0 1.2rem;
  padding: 0;
  font-size: 0.82rem;
  line-height: 1.45;
}
.sing-empty-howto-steps li { margin-bottom: 0.25rem; }
.sing-empty-howto-note {
  margin: 0.45rem 0 0 0;
  color: var(--nk-text-dim);
  font-size: 0.75rem;
  font-style: italic;
}

.badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge.good { background: var(--nk-good); color: #0a0a0a; }
.badge.warn { background: var(--nk-warn); color: #0a0a0a; }

.fallback {
  margin-top: 1rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--nk-border);
}
.fallback summary {
  cursor: pointer;
  padding: 0.5rem 0;
  color: var(--nk-text-dim);
}
.fallback summary:hover { color: var(--nk-text); }

.pick-summary {
  padding: 1rem;
  background: var(--nk-card-2);
  border-radius: 8px;
  border: 1px solid var(--nk-border);
  margin: 1rem 0;
}
.pick-label { font-weight: 600; }

.status-live {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1rem 0;
  padding: 1rem;
  background: var(--nk-card-2);
  border-radius: 8px;
  text-align: center;
}

/* --- Notifications section (My songs) -------------------------------------- */
.notify-heading {
  margin: 1.25rem 0 0.4rem;
  color: var(--nk-text);
  text-transform: none;
  letter-spacing: 0;
  font-size: 1rem;
}
.notify-lines { display: flex; flex-direction: column; gap: 0.4rem; }
.notify-line { margin: 0; font-size: 0.9rem; }
.notify-on { color: var(--nk-good); }
.notify-off { color: var(--nk-warn); }
.notify-enable { align-self: flex-start; }
.notify-ios summary { cursor: pointer; color: var(--nk-text); font-weight: 600; }
.notify-ios p { color: var(--nk-text-dim); font-size: 0.85rem; }
.notify-phone-editor {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.notify-phone-input { flex: 1; min-width: 180px; }
.notify-phone-editor .error { width: 100%; margin: 0; }
.notify-summary { margin-top: 0.4rem; }


/* --- "Sung here before?" inspiration section (search screen) -------------- */
.sing-history {
  margin: 0.75rem 0 0.25rem;
  border: 1px solid var(--nk-border);
  border-radius: 10px;
  background: var(--nk-card-2);
  padding: 0.5rem 0.9rem;
}
.sing-history-summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--nk-text-dim);
  list-style: none;
  padding: 0.2rem 0;
}
.sing-history-summary::-webkit-details-marker { display: none; }
.sing-history-summary::before { content: "▸ "; }
.sing-history[open] > .sing-history-summary::before { content: "▾ "; }
.sing-history[open] > .sing-history-summary { color: var(--nk-text); }
.sing-history-body h4 {
  margin: 0.75rem 0 0.25rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nk-text-dim);
}
.sing-history-list { display: flex; flex-direction: column; }
.sing-history-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--nk-border);
  color: var(--nk-text);
  font-size: 0.9rem;
  text-align: left;
  padding: 0.45rem 0.1rem;
  cursor: pointer;
  min-height: 0;
}
.sing-history-row:last-child { border-bottom: 0; }
.sing-history-row:active .sing-history-song { color: var(--nk-accent); }
.sing-history-song {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sing-history-plays {
  color: var(--nk-accent);
  font-size: 0.8rem;
  white-space: nowrap;
}
.queue-list { max-height: 320px; overflow-y: auto; }
.queue-row {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--nk-border);
  font-size: 0.9rem;
}
.q-name { font-weight: 600; }
.q-song { color: var(--nk-text-dim); }
.q-status { color: var(--nk-accent); font-size: 0.8rem; }

/* --- Code-entry card ------------------------------------------------------ */
.sing-enter-code { text-align: center; }
.sing-enter-code h1 { font-size: 1.4rem; }
.sing-enter-code p { color: var(--nk-text-dim); }
.sing-enter-code #sing-code-input {
  font-size: 2rem;
  letter-spacing: 0.8rem;
  text-align: center;
  padding-left: 0.8rem;  /* compensate for letter-spacing pushing last char off-centre */
  font-variant-numeric: tabular-nums;
  margin: 1rem auto;
  max-width: 12rem;
}
.sing-enter-code button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--nk-accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.sing-code-error { color: var(--nk-error); font-size: 0.9rem; margin-top: 0.75rem; }

/* --- Rules footer (collapsed one-liner on every page) ---------------------- */
.rules-footer {
  margin-bottom: 1rem;
  padding: 0.6rem 1.5rem;
  background: var(--nk-card-2);
  border: 1px solid var(--nk-border);
  border-radius: 12px;
  color: var(--nk-text-dim);
  font-size: 0.9rem;
}
.rules-footer[open] { padding: 0.6rem 1.5rem 1.25rem; }
.rules-footer-summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--nk-text);
  list-style: none;
  padding: 0.2rem 0;
}
.rules-footer-summary::-webkit-details-marker { display: none; }
.rules-footer-summary::before { content: "▸ "; color: var(--nk-text-dim); }
.rules-footer[open] > .rules-footer-summary::before { content: "▾ "; }
.rules-footer .rules-short { list-style: none; padding-left: 0; margin: 0.25rem 0 0.75rem; }
.rules-footer .rules-short li { padding: 0.35rem 0; border-bottom: 1px solid var(--nk-border); }
.rules-footer .rules-short li:last-child { border-bottom: 0; }
.rules-footer .rules-full summary { cursor: pointer; font-weight: 600; color: var(--nk-text); }
.rules-footer .rules-list { list-style: decimal; padding-left: 1.25rem; margin-top: 0.75rem; }
.rules-footer .rules-list li { margin-bottom: 0.75rem; }
.rules-footer .rules-list h4 { margin: 0 0 0.2rem; color: var(--nk-text); font-size: 0.95rem; }
.rules-footer .rules-list p { margin: 0; }

/* --- App shell header ------------------------------------------------------ */
/* Brand + 🌐 language on one row (a real flex row — the pill used to be
   absolutely positioned inside each card and overlapped whatever came first),
   then the status tiles. Outside #sing-root, so tab switches never blank it. */
.sing-header {
  padding-top: 0.6rem;
}
.sing-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 1.9rem;
  padding: 0 0.15rem;
}
.sing-topbar .sing-brand { margin: 0; min-width: 0; }
.sing-topbar .sing-brand-host {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* --- Status tiles ------------------------------------------------------------ */
/* ONE component for every "where are things at" readout: your next song
   (.status-tile--you, green when you're nearly up) and who's on stage
   (.status-tile--stage). Same width, radius, padding and three-line type
   scale everywhere — label / primary / detail. */
/* Not sticky: two pinned tiles would eat a phone screen over a long
   rotation, and the bottom tab bar already reaches My songs from anywhere. */
.sing-status-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.sing-status-stack[hidden] { display: none; }
.status-tile {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 3.6rem;
  padding: var(--nk-tile-pad);
  border-radius: var(--nk-radius-sm);
  border: 1px solid var(--nk-border);
  background: linear-gradient(135deg, rgba(255,77,207,0.08), rgba(111,0,255,0.08)), var(--nk-card);
  color: var(--nk-text);
  font: inherit;
  font-size: 0.95rem;
  text-align: left;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
button.status-tile { cursor: pointer; }
button.status-tile:active { transform: scale(0.99); }
.status-tile--you {
  border-color: rgba(255, 77, 207, 0.55);
  background: linear-gradient(135deg, rgba(255,77,207,0.16), rgba(111,0,255,0.12)), var(--nk-card);
}
.status-tile--urgent {
  border-color: var(--nk-good);
  background: linear-gradient(135deg, rgba(50,213,138,0.2), rgba(255,77,207,0.12)), var(--nk-card);
}
.status-tile-icon { font-size: 1.15rem; flex: none; width: 1.4rem; text-align: center; }
.status-tile-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  line-height: 1.3;
}
.status-tile-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nk-text-dim);
}
.status-tile-primary {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-tile-detail {
  color: var(--nk-accent-hover);
  font-size: 0.88rem;
  font-weight: 500;
  /* Wraps rather than truncating — "#70 in line · ~5h 5m–5h 11m" is the
     part a singer actually came to read. */
  overflow-wrap: anywhere;
}
.status-tile--urgent .status-tile-detail { color: var(--nk-good); }
.status-tile--stage .status-tile-detail { color: var(--nk-text-dim); display: flex; flex-direction: column; }
.status-tile-song { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-tile-next { color: var(--nk-accent-hover); }
.status-tile-chevron { flex: none; color: var(--nk-text-dim); font-size: 1.2rem; }
/* Skeleton while the very first stage read is in flight — same box, so
   nothing below it moves when the real text lands. */
.status-tile--loading .status-tile-primary,
.status-tile--loading .status-tile-detail {
  color: transparent;
  border-radius: 4px;
  background: linear-gradient(90deg, #222 0%, #2e2e2e 50%, #222 100%);
  background-size: 200% 100%;
  animation: nk-shimmer 1.2s linear infinite;
}
.status-tile--loading .status-tile-primary { width: 60%; }
.status-tile--loading .status-tile-detail { width: 40%; margin-top: 0.25rem; }
@keyframes nk-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .status-tile--loading .status-tile-primary,
  .status-tile--loading .status-tile-detail { animation: none; }
}

/* --- Offline banner --------------------------------------------------------- */
.offline-banner {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #8a3a00;
  color: #fff;
  padding: 0.6rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* --- Push opt-in notification prompt -------------------------------------- */
.push-optin { margin: 0.75rem 0; text-align: center; }
.push-optin .btn { min-width: 240px; }
.push-optin.push-on { color: #6ad29a; font-size: 0.9rem; }
.push-optin.push-blocked { color: var(--nk-text-dim); font-size: 0.9rem; font-style: italic; }
.push-optin.ios-install {
  padding: 0.9rem;
  border-radius: 10px;
  background: rgba(255,77,207,0.08);
  border: 1px solid rgba(255,77,207,0.25);
  text-align: left;
}
.push-optin.ios-install strong { display: block; margin-bottom: 0.4rem; }
.push-optin.ios-install p { font-size: 0.9rem; color: var(--nk-text-dim); margin-bottom: 0.6rem; }
.push-optin.ios-install .btn { width: 100%; }

/* --- Full rotation expander (landing page) -------------------------------- */
.rotation-expander {
  margin: 0 0 1rem 0;
  padding: 0;
  background: var(--nk-card-2);
  border: 1px solid var(--nk-border);
  border-radius: 10px;
}
.rotation-expander > summary {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--nk-text);
  list-style: none;
}
.rotation-expander > summary::marker { content: ""; }
.rotation-expander > summary::-webkit-details-marker { display: none; }
.rotation-expander > summary::before {
  content: "▸ ";
  display: inline-block;
  margin-right: 0.25rem;
  transition: transform 0.15s ease;
}
.rotation-expander[open] > summary::before {
  content: "▾ ";
}

.rotation-body {
  padding: 0 1rem 0.75rem;
}
.rotation-caveat {
  margin: 0 0 0.75rem 0;
  font-size: 0.85rem;
  color: var(--nk-text-dim);
}
.rotation-loading,
.rotation-empty,
.rotation-error {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--nk-text-dim);
  font-style: italic;
}
.rotation-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 360px;
  overflow-y: auto;
}
.rotation-row {
  display: grid;
  grid-template-columns: 2.4rem 1fr 2fr auto;
  gap: 0.5rem;
  align-items: baseline;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--nk-border);
  font-size: 0.9rem;
}
.rotation-row:last-child { border-bottom: 0; }
.rotation-pos {
  color: var(--nk-text-dim);
  font-variant-numeric: tabular-nums;
}
.rotation-name {
  font-weight: 600;
  color: var(--nk-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rotation-song {
  color: var(--nk-text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rotation-wait {
  color: var(--nk-accent);
  font-size: 0.85rem;
  white-space: nowrap;
  text-align: right;
}
.rotation-fresh-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin: 0.5rem 0 0;
}
.rotation-updated {
  margin: 0;
  font-size: 0.75rem;
  color: var(--nk-text-dim);
  text-align: right;
}
.rotation-refresh {
  background: none;
  border: 1px solid var(--nk-border);
  border-radius: 999px;
  color: var(--nk-text-dim);
  font-size: 0.75rem;
  padding: 0.2rem 0.65rem;
  cursor: pointer;
  min-height: 0;
}
.rotation-refresh:disabled { opacity: 0.6; cursor: default; }
.rotation-refresh:active { color: var(--nk-text); }

@media (max-width: 480px) {
  .rotation-row {
    grid-template-columns: 1.8rem 1fr auto;
    grid-template-areas:
      "pos name wait"
      "pos song wait";
    row-gap: 0.1rem;
  }
  .rotation-pos  { grid-area: pos; align-self: center; }
  .rotation-name { grid-area: name; }
  .rotation-song { grid-area: song; font-size: 0.8rem; }
  .rotation-wait { grid-area: wait; align-self: center; }
}

/* Duet partners on confirm screen. */
.partners-section {
  margin: 14px 0;
  padding: 10px 12px;
  background: rgba(255, 77, 207, 0.06);
  border: 1px solid rgba(255, 77, 207, 0.18);
  border-radius: 6px;
}
.partners-title {
  font-size: 0.95em;
  color: #ddd;
  margin-bottom: 8px;
}
.partner-row {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) auto;
  gap: 6px;
  margin-bottom: 6px;
}
.partner-row input {
  font-size: 0.95em;
  padding: 8px;
}
.partner-remove {
  background: transparent;
  border: 1px solid #555;
  color: #ccc;
  width: 36px;
  border-radius: 4px;
  cursor: pointer;
}
.partner-remove:hover { background: #2a2a2a; color: #fff; }
.partners-add-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.partners-add {
  background: transparent;
  border: 1px dashed var(--nk-accent);
  color: var(--nk-accent);
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
}
/* A partner picked from tonight's list: name + "On tonight's list", no
   fields to fill. */
.partner-row-existing { grid-template-columns: 1fr auto; align-items: center; }
.partner-existing {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 6px 10px;
  background: var(--nk-card-2);
  border: 1px solid var(--nk-border);
  border-radius: 8px;
  line-height: 1.3;
}
.partner-existing-name { font-weight: 600; overflow-wrap: anywhere; }
.partner-existing-note { font-size: 0.78rem; color: var(--nk-good); }
.partner-row-existing .partner-remove { height: 100%; min-height: 40px; }

/* "Existing singer" picker modal — built for 50+ names: fixed-height dialog,
   filter pinned on top, only the list scrolls. */
.sing-modal.partner-picker {
  display: flex;
  flex-direction: column;
  height: min(85vh, 640px);
  overflow: hidden;
}
.partner-picker .sing-modal-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.partner-picker-hint { margin: 0 0 0.5rem; }
.partner-picker-filter { margin: 0 0 0.5rem; flex: none; }
.partner-picker-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  margin: 0 -0.25rem;
  padding: 0 0.25rem;
}
.partner-picker-letter {
  position: sticky;
  top: 0;
  background: var(--nk-card);
  color: var(--nk-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.45rem 0.25rem 0.2rem;
}
.partner-picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  min-height: 46px;
  padding: 0.55rem 0.75rem;
  margin: 0 0 4px;
  background: var(--nk-card-2);
  border: 1px solid var(--nk-border);
  border-radius: 8px;
  color: var(--nk-text);
  font: inherit;
  font-size: 1rem;
  text-align: start;
  cursor: pointer;
}
.partner-picker-row:active { border-color: var(--nk-accent); }
.partner-picker-row.added { opacity: 0.55; cursor: default; }
.partner-picker-name { overflow-wrap: anywhere; }
.partner-picker-added { font-size: 0.8rem; color: var(--nk-good); white-space: nowrap; }
.partner-picker-empty { margin: 0.5rem 0.25rem; }
.partner-picker-new { width: 100%; margin-top: 0.25rem; }
.partners-add:hover { background: rgba(255, 77, 207, 0.08); }
.partners-cap-hint {
  font-size: 0.85em;
  color: #888;
  font-style: italic;
}

/* Multi-song done-screen list. */
.songs-list { margin: 10px 0; }
.song-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 8px 0;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid #ff4dcf;
  border-radius: 4px;
}
.song-card[data-status="rejected"] { border-left-color: #ff6655; }
.song-card[data-status="pending"]  { border-left-color: #888; }
.song-card-main { flex: 1; min-width: 0; }
.song-card-title { font-weight: 600; margin-bottom: 4px; }
.song-card-status { font-size: 0.92em; color: #ccc; }
.song-card-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: stretch;
  flex-shrink: 0;
}
/* Three or more actions: a column of them made the card ~5 buttons tall, so
   they become one wrapping row under the song text instead. */
.song-card:has(> .song-card-actions > :nth-child(3)) .song-card-actions {
  flex-basis: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: 6px;
}
.song-card:has(> .song-card-actions > :nth-child(3)) .song-card-action { padding: 0.3rem 0.4rem; }
.song-card-action {
  background: none;
  border: 1px solid var(--nk-border);
  border-radius: 6px;
  color: var(--nk-text-dim);
  font-size: 0.78rem;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  min-height: 0;
  white-space: nowrap;
}
.song-card-action:active { color: var(--nk-text); border-color: var(--nk-text-dim); }
.song-card-action-cancel:active { color: var(--nk-error); border-color: var(--nk-error); }
.song-card-partners {
  font-size: 0.85em;
  color: #ff4dcf;
  margin-top: 4px;
}
.request-another {
  width: 100%;
  margin: 12px 0;
}


/* Hardened confirm screen (mis-tap safety) */
.sing-confirm .confirm-song { margin: 12px 0 8px; }
.sing-confirm .confirm-title { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.sing-confirm .confirm-artist { font-size: 1.05rem; opacity: 0.9; margin-top: 2px; }
.sing-confirm .confirm-source { font-size: 0.85rem; opacity: 0.7; margin-top: 6px; }
.sing-confirm .confirm-searched { font-size: 0.8rem; opacity: 0.6; margin: 4px 0 12px; }
.sing-confirm .confirm-actions { gap: 10px; }
.sing-confirm .confirm-actions .submit-btn { flex: 1; }


/* Version-list Best/trusted markers + commercial collapse (mis-tap surface) */
.sing-version-best { display: inline-block; font-size: 0.7rem; font-weight: 700;
  background: #ffce54; color: #1a1a1a; border-radius: 4px; padding: 1px 6px; }
.sing-version-star { font-size: 0.85rem; }
.sing-online-toggle { display: block; width: 100%; text-align: left; background: none;
  border: 1px dashed rgba(255,255,255,0.25); color: inherit; opacity: 0.75;
  border-radius: 8px; padding: 8px 10px; margin-top: 6px; cursor: pointer; }


/* Self-service cancel on the done screen */
.song-card-cancel { margin-top: 8px; font-size: 0.85rem; opacity: 0.85; }
.song-card[data-status="cancelled"] .song-card-title { text-decoration: line-through; opacity: 0.6; }


/* Self-service change + reorder on the done screen */
.song-card-change { margin-top: 6px; font-size: 0.85rem; opacity: 0.85; }
/* Drag-to-reorder mode (replaces the old per-card ▲▼ buttons) */
.reorder-controls { margin: 0 0 0.5rem; }
.reorder-toggle { width: 100%; }
.reorder-notice { color: var(--nk-good); margin: 0 0 0.5rem; }
.reorder-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.reorder-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  background: var(--nk-card-2);
  border: 1px solid var(--nk-border);
  border-radius: 8px;
  user-select: none;
}
.reorder-row.dragging {
  border-color: var(--nk-accent);
  background: rgba(255, 77, 207, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}
.reorder-handle {
  touch-action: none;   /* the handle drags; the rest of the list scrolls */
  cursor: grab;
  color: var(--nk-text-dim);
  font-size: 1.4rem;
  padding: 0.3rem 0.5rem;   /* a thumb-sized grab target */
}
.reorder-row.dragging .reorder-handle { cursor: grabbing; }
.reorder-num { color: var(--nk-text-dim); font-variant-numeric: tabular-nums; }
.reorder-song {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.reorder-move {
  flex: none;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--nk-border);
  border-radius: 6px;
  background: transparent;
  color: var(--nk-text);
  font-size: 0.9rem;
}
.reorder-move[disabled] { opacity: 0.3; }
.reorder-instructions { color: var(--nk-text); }
.song-card-reorder button[disabled] { opacity: 0.4; }


/* "Already sung tonight" — collapsed history so the active list stays clean */
.sung-section[hidden] { display: none; }
.sung-details > summary {
  padding: 8px 0;
  color: var(--nk-text-dim);
  cursor: pointer;
  font-size: 0.9rem;
}
.sung-details .song-card-done {
  border-left-color: #4a4a4a;
  opacity: 0.7;
}
.sung-details .song-card-done .song-card-status { color: #7ecb7e; }

/* --- i18n / language pill ---------------------------------------------------- */
.sing-card { position: relative; }
.sing-lang-pill {
  flex: none;
  background: none;
  border: 1px solid var(--nk-border);
  border-radius: 999px;
  color: var(--nk-text-dim);
  font-size: 0.72rem;
  font-family: inherit;
  padding: 0.15rem 0.55rem;
  cursor: pointer;
  min-height: 0;
  line-height: 1.4;
  z-index: 2;
}
.sing-lang-pill:hover, .sing-lang-pill:active { color: var(--nk-text); border-color: var(--nk-text-dim); }
/* Pages without the app shell (code entry, closed) still carry the pill in
   their card — pin it to the card's corner there only. */
.sing-enter-code .sing-lang-pill,
.sing-closed .sing-lang-pill { position: absolute; top: 0.6rem; right: 0.6rem; }
[dir="rtl"] .sing-enter-code .sing-lang-pill,
[dir="rtl"] .sing-closed .sing-lang-pill { right: auto; left: 0.6rem; }
.sing-lang-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.sing-lang-option {
  background: var(--nk-card-2);
  border: 1px solid var(--nk-border);
  border-radius: 8px;
  color: var(--nk-text);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.55rem 0.6rem;
  text-align: start;
  cursor: pointer;
}
.sing-lang-option.active { border-color: var(--nk-accent); color: var(--nk-accent); }
.sing-lang-option:active { background: var(--nk-border); }

/* --- Brand strip (first screen) ---------------------------------------------- */
.sing-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nk-accent);
}
[dir="rtl"] .sing-brand { margin: 0 0 0.6rem 3.2rem; }
.sing-brand-name { font-weight: 700; }
.sing-brand-host { color: var(--nk-text-dim); text-transform: none; letter-spacing: 0; }

/* --- Results: an open song row's risk note + format ----------------------- */
.sing-song-format { letter-spacing: 0.02em; }
/* An open row has room to wrap, so the format never gets cut off. */
.result-row.grouped.open .sing-song-facts { white-space: normal; }
.result-row.grouped.open .sing-song-facts > span { white-space: nowrap; }   /* wrap between items, never inside a brand */

/* --- Change-song mode banner ------------------------------------------------- */
.sing-change-banner {
  background: rgba(255, 77, 207, 0.08);
  border: 1px solid rgba(255, 77, 207, 0.35);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  margin: 0 0 0.75rem;
}
.sing-change-title { font-weight: 700; }
.sing-change-hint { color: var(--nk-text-dim); font-size: 0.85rem; margin: 0.15rem 0 0.5rem; }
.sing-change-keep { width: 100%; }
.song-card-replaces { font-size: 0.82em; color: var(--nk-text-dim); margin-top: 3px; }

/* --- Make-it quick (draft) version offer on a My-songs card ------------------ */
.song-card-quick { font-size: 0.85em; color: var(--nk-text-dim); margin-top: 0.35rem; }
.song-card-quick-offer {
  color: var(--nk-text);
  background: rgba(255, 214, 10, 0.08);
  border: 1px solid rgba(255, 214, 10, 0.4);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
}
.song-card-quick-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.5rem; }
.song-card-quick-actions .song-card-quick-btn { flex: 1 1 9rem; width: auto; min-height: 2.4rem; padding: 0.4rem 0.7rem; }

/* --- Notification block: links keep the accent colour on the "on" line ------- */
.notify-line a { color: var(--nk-accent); text-decoration: underline; }

/* --- RTL: mirror the few places that hard-code a side ------------------------ */
[dir="rtl"] .result-row { text-align: right; }
[dir="rtl"] .rotation-wait { text-align: left; }
[dir="rtl"] .status-tile { text-align: right; }
[dir="rtl"] .status-tile-chevron { transform: scaleX(-1); }
[dir="rtl"] .sing-tab-badge { right: auto; left: calc(50% - 1.6rem); }

/* --- Event footer: KJ message + venue notices ---------------------------------- */
.sing-event-footer {
  margin-bottom: 1rem;
}
.sing-notices {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.sing-notice {
  color: var(--nk-text-dim);
  font-size: 0.85rem;
  line-height: 1.4;
  padding: 0.45rem 0.7rem;
  background: var(--nk-card);
  border: 1px solid var(--nk-border);
  border-radius: 8px;
}
.sing-footer-message {
  margin-top: 0.5rem;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  background: rgba(255, 77, 207, 0.07);
  border: 1px solid rgba(255, 77, 207, 0.3);
  white-space: pre-wrap;
  word-break: break-word;
}
.sing-footer-message-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nk-accent);
  margin-bottom: 0.2rem;
}
.sing-footer-message-body { font-size: 0.9rem; }

/* Social link icons (KJ-configured) under the notices. */
.sing-social {
  margin-top: 0.75rem;
  text-align: center;
}
.sing-social-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nk-text-dim);
  margin-bottom: 0.4rem;
}
.sing-social-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.sing-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: var(--nk-card);
  border: 1px solid var(--nk-border);
  color: var(--nk-text);
}
.sing-social-link:hover,
.sing-social-link:focus-visible { color: var(--nk-accent); border-color: var(--nk-accent); }
.sing-social-link svg { width: 1.15rem; height: 1.15rem; }
button.sing-social-link { padding: 0; font: inherit; cursor: pointer; }
.sing-social-link[aria-expanded="true"] { color: var(--nk-accent); border-color: var(--nk-accent); }
/* "Follow us" (left) + "Contact us" (right); one group alone centres. */
.sing-social-groups { display: flex; justify-content: center; align-items: flex-start; gap: 1.25rem 2rem; flex-wrap: wrap; }
.sing-social-group { min-width: 0; }
.sing-contact-phone {
  margin: 0.6rem auto 0;
  max-width: 20rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--nk-border);
  border-radius: var(--nk-radius-sm);
  background: var(--nk-card);
}
.sing-contact-number { font-weight: 600; font-size: 1.05rem; margin-bottom: 0.45rem; user-select: all; }
.sing-contact-actions { display: flex; gap: 0.5rem; }
.sing-contact-actions .btn { flex: 1 1 0; text-decoration: none; }

/* Social-media photo/video consent picker (confirm step + My songs). */
.photo-consent {
  margin: 0.75rem 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--nk-border);
  border-radius: var(--nk-radius-sm);
  background: var(--nk-card);
}
.photo-consent-question { margin: 0 0 0.5rem; font-size: 0.92rem; }
.photo-consent-choices { gap: 0.5rem; }
.photo-consent-choices .photo-consent-btn { flex: 1 1 0; min-width: 0; }
/* The My songs block lives inside .push-optin, whose buttons have a 240px
   min-width — two side by side would overflow the card. */
.photo-consent-btn.selected {
  border-color: var(--nk-accent);
  color: var(--nk-accent);
  background: rgba(255, 77, 207, 0.08);
}
.photo-consent .hint { margin: 0.45rem 0 0; }
.photo-consent-bare { margin: 0; padding: 0; border: none; background: none; }
/* Optional Instagram handle under a "yes" (2026-10-14). */
.photo-consent-handle { display: block; margin-top: 0.6rem; }
.photo-consent-handle[hidden] { display: none; }
.photo-consent-handle-label { display: block; font-size: 0.85rem; color: var(--nk-text-dim); margin-bottom: 0.25rem; }
.photo-consent-handle-input { width: 100%; box-sizing: border-box; }
.photo-consent-handle-error { color: var(--nk-error); }
/* "Just one song, or nothing from tonight?" */
.consent-scope { margin-top: 0.4rem; }
.consent-scope-question { margin: 0 0 0.4rem; color: var(--nk-text); }
.consent-scope .row { gap: 0.5rem; flex-wrap: wrap; }
.consent-scope .btn { flex: 1 1 0; min-width: 0; }
/* Per-song 📷 toggle on My songs cards. */
.song-card-action.song-consent-yes { color: var(--nk-text); }
.song-card-action.song-consent-no { color: var(--nk-error); border-color: var(--nk-error); }

/* My songs: "Notification preferences" / "Social media preferences" — the
   same subtle box as the photo picker; collapsed to side-by-side toggles
   once set up. */
.pref-box {
  margin: 0.75rem 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--nk-border);
  border-radius: var(--nk-radius-sm);
  background: var(--nk-card);
  text-align: center;
}
.pref-box-head { display: flex; align-items: center; justify-content: center; gap: 0.6rem; margin-bottom: 0.4rem; }
.pref-box-title { margin: 0; font-size: 0.98rem; text-transform: none; letter-spacing: 0; color: var(--nk-text); }
.push-optin .pref-hide { font-size: 0.82rem; min-width: 0; width: auto; padding: 0; white-space: nowrap; color: var(--nk-accent); font-weight: 400; }
.pref-box-body > .notify-summary { margin-bottom: 0; }
.pref-toggles { display: flex; gap: 0.5rem; margin: 0.75rem 0; }
.pref-toggle {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--nk-border);
  border-radius: var(--nk-radius-sm);
  background: var(--nk-card);
  color: var(--nk-text);
  font: inherit;
  cursor: pointer;
}
.pref-toggle:hover, .pref-toggle:focus-visible { border-color: var(--nk-accent); }
.pref-toggle-title { font-size: 0.85rem; font-weight: 600; }
.pref-toggle-status { font-size: 0.78rem; color: var(--nk-good); }

/* --- ▶ Preview on rotation rows and My-songs cards ------------------------------ */
.rotation-preview {
  background: none;
  border: 1px solid var(--nk-border);
  border-radius: 999px;
  color: var(--nk-text-dim);
  font-size: 0.65rem;
  line-height: 1;
  padding: 0.2rem 0.45rem;
  margin-inline-start: 0.4rem;
  cursor: pointer;
  min-height: 0;
  vertical-align: middle;
}
.rotation-preview:active, .rotation-preview:hover { color: var(--nk-accent); border-color: var(--nk-accent); }
.song-card-action-preview { color: var(--nk-text); }

/* Rotation song cell: text clips, the ▶ button never does. */
.rotation-song { display: flex; align-items: center; gap: 0.3rem; min-width: 0; overflow: visible; }
.rotation-song-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rotation-preview { flex: 0 0 auto; margin-inline-start: 0; }

/* --- Make-it wizard (make.js) ------------------------------------------- */
.mk-card { display: flex; flex-direction: column; gap: var(--nk-gap); }
.mk-card h2 { margin-bottom: 0; }
.mk-card h4 { margin: 0; font-size: 0.95rem; }
.mk-song { padding: 0.2rem 0; }
.mk-song-title { font-size: 1.25rem; font-weight: 700; }
.mk-song-artist { color: var(--nk-text-dim); }
.mk-code { font-size: 1.6rem; letter-spacing: 0.4em; text-align: center; }
.mk-code-actions, .mk-foot { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; justify-content: space-between; }
.mk-fineprint { margin: 0; font-size: 0.8rem; }
.mk-correction, .mk-didyoumean, .mk-guidance {
  background: var(--nk-card-2); border: 1px solid var(--nk-border);
  border-radius: var(--nk-radius-sm); padding: 0.6rem 0.8rem; font-size: 0.88rem;
}
.mk-didyoumean { display: flex; flex-direction: column; gap: 0.4rem; }
.mk-didyoumean-title, .mk-guidance-title { font-weight: 700; }
.mk-guidance ul { margin: 0.3rem 0 0; padding-left: 1.1rem; color: var(--nk-text-dim); }
.mk-suggestion { text-align: left; }
.mk-undo, .mk-others-toggle, .mk-code-actions .btn.link, .mk-signed-in .btn.link,
.mk-change-song, .mk-change-audio, .sing-other-options {
  background: none; border: none; color: var(--nk-accent); padding: 0; cursor: pointer; font: inherit;
  text-decoration: underline;
}
/* Audio results — mirrors gen's Choose Audio step (PickCard / ResultRow). */
.mk-pick { border: 1px solid rgba(50, 213, 138, 0.4); background: rgba(50, 213, 138, 0.05); border-radius: var(--nk-radius-sm); overflow: hidden; }
.mk-pick-recommended { border-color: rgba(244, 168, 58, 0.4); background: rgba(244, 168, 58, 0.05); }
.mk-pick-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; padding: 0.5rem 0.75rem; background: rgba(50, 213, 138, 0.1); }
.mk-pick-recommended .mk-pick-head { background: rgba(244, 168, 58, 0.1); }
.mk-pick-label { font-weight: 700; font-size: 0.95rem; color: var(--nk-good); }
.mk-pick-recommended .mk-pick-label { color: var(--nk-warn); }
.mk-pick-body { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.65rem 0.75rem 0.75rem; }
.mk-reason { margin: 0; color: var(--nk-text-dim); font-size: 0.82rem; }
.mk-kv { display: flex; align-items: baseline; gap: 0.4rem; min-width: 0; }
.mk-kv-label { flex-shrink: 0; color: var(--nk-text-dim); font-size: 0.78rem; }
.mk-kv-value { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.mk-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; }
.mk-pick .mk-kv-value { font-size: 1rem; }
.mk-tags, .mk-row-line1 { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.mk-quality, .mk-meta { color: var(--nk-text-dim); font-size: 0.8rem; }
.mk-tag { font-size: 0.68rem; font-weight: 600; padding: 0.1rem 0.35rem; border-radius: 4px; background: var(--nk-card-2); color: var(--nk-text-dim); white-space: nowrap; }
.mk-tag-lossless, .mk-avail-high, .mk-tag-match { background: rgba(50, 213, 138, 0.18); color: var(--nk-good); }
.mk-avail-medium, .mk-tag-warn { background: rgba(234, 179, 8, 0.18); color: #facc15; cursor: help; }
.mk-avail-low, .mk-tag-yt { background: rgba(255, 0, 0, 0.15); color: #ff6b6b; }
.mk-tag-sp { background: rgba(30, 215, 96, 0.15); color: #1ed760; }
.mk-result-warn { color: #facc15; background: rgba(234, 179, 8, 0.1); border-radius: 6px; padding: 0.35rem 0.5rem; font-size: 0.8rem; }
.mk-use-full { width: 100%; margin-top: 0.3rem; }
.mk-use-full[disabled], .mk-select[disabled] { opacity: 0.5; cursor: wait; }
.mk-others { display: flex; flex-direction: column; gap: 0.6rem; }
.mk-others-help { margin: 0; font-size: 0.8rem; }
.mk-cat { border: 1px solid var(--nk-border); border-radius: var(--nk-radius-sm); overflow: hidden; }
.mk-cat-head { display: flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.75rem; background: var(--nk-card-2); }
.mk-cat-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.mk-cat-count { color: var(--nk-text-dim); font-size: 0.78rem; }
.mk-cat-more { margin-left: auto; font-size: 0.78rem; }
.mk-cat-best { color: #fbbf24; }
.mk-cat-hires { color: #c084fc; }
.mk-cat-studio { color: #60a5fa; }
.mk-cat-singles { color: #22d3ee; }
.mk-cat-live { color: #f472b6; }
.mk-cat-comp { color: #2dd4bf; }
.mk-cat-vinyl { color: #fb923c; }
.mk-cat-spotify { color: #4ade80; }
.mk-cat-youtube { color: #f87171; }
.mk-cat-other { color: var(--nk-text-dim); }
.mk-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.75rem; border-top: 1px solid var(--nk-border); }
.mk-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.mk-row-name { font-weight: 600; overflow-wrap: anywhere; }
.mk-row .mk-kv { display: block; }
.mk-row .mk-kv-value { font-weight: 400; font-size: 0.82rem; color: var(--nk-text-dim); }
.mk-select { flex-shrink: 0; }
.mk-fallback { display: flex; flex-direction: column; gap: 0.45rem; border-top: 1px dashed var(--nk-border); padding-top: var(--nk-gap); }
.mk-fallback-first { border-top: none; padding-top: 0; }
.mk-none h4 { margin-bottom: 0.3rem; }

/* My songs: "Tap here" → the singer's own lyrics review on gen. */
.song-card-review-link { color: var(--nk-accent); font-weight: 600; text-decoration: underline; }

/* --- Search in progress: bouncing, colour-cycling notes ----------------------- */
.sing-searching {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 0 0.6rem;
  color: var(--nk-text);
  font-weight: 600;
}
.sing-searching-notes { display: inline-flex; gap: 0.2rem; font-size: 1.35rem; line-height: 1; }
.sing-note { display: inline-block; animation: sing-note-bounce 1s ease-in-out infinite, sing-note-hue 2.4s linear infinite; }
.sing-note-0 { color: #ff4dcf; animation-delay: 0s, 0s; }
.sing-note-1 { color: #ffb347; animation-delay: 0.15s, -0.6s; }
.sing-note-2 { color: #32d58a; animation-delay: 0.3s, -1.2s; }
.sing-note-3 { color: #5ab4ff; animation-delay: 0.45s, -1.8s; }
.sing-searching-label {
  background: linear-gradient(90deg, #ff4dcf, #ffb347, #32d58a, #5ab4ff, #ff4dcf);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sing-label-shimmer 2.4s linear infinite;
}
@keyframes sing-note-bounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  30% { transform: translateY(-0.45rem) rotate(-10deg); }
  60% { transform: translateY(0.1rem) rotate(6deg); }
}
@keyframes sing-note-hue { to { filter: hue-rotate(360deg); } }
@keyframes sing-label-shimmer { to { background-position: 300% 0; } }
@media (prefers-reduced-motion: reduce) {
  .sing-note, .sing-searching-label { animation: none; }
  .sing-searching-label { color: var(--nk-text); background: none; }
}

/* --- Search auto-correct notice (gen's "Corrected to … — you typed …") ------ */
.sing-correction {
  margin: 0.5rem 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--nk-border);
  border-radius: var(--nk-radius-sm);
  background: var(--nk-card-2);
  color: var(--nk-text-dim);
  font-size: 0.88rem;
}
.sing-correction::before { content: "✓ "; color: var(--nk-good); }
.sing-didyoumean::before { content: none; }
.sing-correction-toggle { color: var(--nk-accent); text-decoration: underline; padding: 0; background: none; border: 0; font: inherit; cursor: pointer; }
.sing-didyoumean { display: flex; flex-direction: column; gap: 0.4rem; }
.sing-correction-title { font-weight: 700; color: var(--nk-text); }
.sing-suggestion { text-align: left; }

/* --- Song identification card (question 1: "which song do you mean?") -------
   Deliberately a different shape from the karaoke result rows (question 2). */
.sing-songcard {
  margin: 0.6rem 0 0.9rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--nk-accent);
  border-radius: var(--nk-radius-sm);
  background: var(--nk-card-2);
}
.sing-songcard-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--nk-text-dim); }
.sing-songcard-song { margin: 0.2rem 0 0.35rem; font-size: 1.05rem; }
.sing-songcard-title { font-weight: 700; color: var(--nk-text); }
.sing-songcard-artist { color: var(--nk-text-dim); }
.sing-songcard-actions { font-size: 0.85rem; color: var(--nk-text-dim); }
.sing-results-heading { margin: 0.4rem 0 0.3rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--nk-text-dim); }
.sing-describe-link { display: block; margin: 0.35rem 0 0.6rem; color: var(--nk-accent); text-decoration: underline; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.sing-describe { display: flex; gap: 0.5rem; margin: 0.35rem 0 0.8rem; }
.sing-describe .sing-empty-input { flex: 1; }

/* --- Song identified, no karaoke version: make-it up top ------------------- */
.sing-songcard-missing { display: flex; flex-direction: column; gap: 0.35rem; }
.sing-songcard-missing .sing-songcard-song { margin: 0; }
.sing-missing-status { font-weight: 700; color: var(--nk-text); }
.sing-missing-desc { margin: 0; font-size: 0.88rem; color: var(--nk-text-dim); }
.sing-missing-make { width: 100%; margin-top: 0.2rem; }
.sing-missing-ask { margin: 0; }
.sing-similar-more { margin-top: 0.4rem; }

/* Sticky "Not seeing your song? Make it" — only when identification isn't
   confident; sits above the tab bar (when shown) and the iOS home indicator. */
.results.has-make-bar { padding-bottom: 4.5rem; }
.sing-make-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 1rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
  background: rgba(20, 20, 20, 0.97);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--nk-border);
}
body:has(#sing-tabs:not([hidden])) .sing-make-bar {
  bottom: calc(3.6rem + env(safe-area-inset-bottom, 0px));
  padding-bottom: 0.55rem;
}
.sing-make-bar-text { color: var(--nk-text); font-weight: 600; font-size: 0.92rem; }
.sing-make-bar-btn { flex: none; padding: 0.5rem 1.1rem; }

/* "Save tonight's songs to your Nomad Karaoke account" (spec 5.6) */
.save-songs-slot[hidden] { display: none; }
.save-songs-slot { margin: 0.75rem 0; }
.save-songs-slot .btn.link {
  background: none; border: none; color: var(--nk-accent); padding: 0; cursor: pointer; font: inherit;
  text-decoration: underline; text-align: left;
}
.save-songs-slot .btn.link[disabled] { opacity: 0.5; cursor: default; }
.save-songs-explainer, .save-songs-status { margin: 0.35rem 0 0; }
.save-songs-main { margin: 0.25rem 0 0; font-size: 0.85rem; }
.save-songs-line { margin: 0; line-height: 1.6; }
.save-songs-info {
  margin-left: 0.4rem; background: none; border: 0; color: var(--nk-text-dim); font-size: 1rem; line-height: 1;
  padding: 0.3rem; cursor: pointer;
}
.save-songs-info[aria-expanded="true"] { color: var(--nk-accent); }
.save-songs-form { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem; }
.save-songs-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.save-songs-offer { border-top: 1px solid var(--nk-border); padding-top: 0.75rem; }

/* One-screen make-it (v0.142.0): song / where to send it / audio sections, one
   pinned send button (checkout pattern), one-tap Google / Apple sign-in. */
.mk-one { padding-bottom: 5.5rem; }
.mk-section { display: flex; flex-direction: column; gap: 0.5rem; padding-top: 0.75rem; border-top: 1px solid var(--nk-border); }
.mk-section-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--nk-text-dim); }
.mk-change-song, .mk-change-audio { align-self: flex-start; padding: 0; }
.mk-socials { display: flex; flex-direction: column; gap: 0.5rem; }
.mk-google { min-height: 44px; display: flex; justify-content: center; }
.mk-google[hidden] { display: none; }
.mk-social-stall { margin: 0.25rem 0 0; text-align: center; font-weight: 600; }
.mk-social-stall[hidden] { display: none; }
.mk-social { width: 100%; min-height: 44px; border-radius: 999px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 0.4rem; }
.mk-social-apple { background: #fff; color: #000; border: 1px solid #fff; }
.mk-social-google { background: #131314; color: #e3e3e3; border: 1px solid #8e918f; }
.mk-apple-logo { width: 1.05rem; height: 1.05rem; flex: none; }
.mk-google-logo { width: 1.1rem; height: 1.1rem; flex: none; }
.mk-or { display: flex; align-items: center; gap: 0.6rem; color: var(--nk-text-dim); font-size: 0.85rem; }
.mk-or::before, .mk-or::after { content: ""; flex: 1; border-top: 1px solid var(--nk-border); }
.mk-email-form { display: flex; gap: 0.5rem; }
.mk-email-form .sing-empty-input { flex: 1; min-width: 0; margin: 0; }
.mk-email-form .btn { flex: none; }
.mk-signed-in { margin: 0; color: var(--nk-text); }
.mk-row-chosen { border-color: var(--nk-good); }
.mk-extras:empty { display: none; }
.mk-submit-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
  padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
  background: rgba(20, 20, 20, 0.97); backdrop-filter: blur(8px);
  border-top: 1px solid var(--nk-border);
  display: flex; justify-content: center;
}
body:has(#sing-tabs:not([hidden])) .mk-submit-bar {
  bottom: calc(3.6rem + env(safe-area-inset-bottom, 0px));
  padding-bottom: 0.6rem;
}
.mk-submit { width: 100%; max-width: var(--nk-shell-w); min-height: 48px; font-size: 1.02rem; }
.mk-submit-bar .btn.mk-submit[disabled] { opacity: 1; background: var(--nk-card-2); color: var(--nk-text-dim); border-color: var(--nk-border); }

/* Make-it row: short status + ⓘ → progress details (tracker + full text). */
.song-card-action-info { font-size: 1.05rem; }
.song-card-action-info.is-open { color: var(--nk-accent); }
.make-details { margin-top: 0.5rem; padding: 0.6rem 0.7rem; border-radius: var(--nk-radius-sm); background: var(--nk-card-2); border: 1px solid var(--nk-border); }
.make-details .sent-tracker { margin-top: 0.1rem; }
.make-details-text { font-size: 0.88rem; color: var(--nk-text-dim); margin-top: 0.4rem; }
.sent-tracker { list-style: none; display: flex; gap: 0.25rem; padding: 0; margin: 0.75rem 0 0.25rem; }
.sent-step { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.3rem; font-size: 0.78rem; color: var(--nk-text-dim); position: relative; }
.sent-step:not(:last-child)::after { content: ""; position: absolute; top: 0.4rem; left: calc(50% + 0.6rem); right: calc(-50% + 0.6rem); border-top: 2px solid var(--nk-border); }
.sent-dot { width: 0.8rem; height: 0.8rem; border-radius: 50%; border: 2px solid var(--nk-border); background: var(--nk-bg); }
.sent-step.done { color: var(--nk-good); }
.sent-step.done .sent-dot { background: var(--nk-good); border-color: var(--nk-good); }
.sent-step.done::after { border-color: var(--nk-good); }
.sent-step.active { color: var(--nk-text); font-weight: 600; }
.sent-step.active .sent-dot { border-color: var(--nk-accent); box-shadow: 0 0 0 3px rgba(255, 77, 207, 0.25); }

/* One-line "Sent" note right after sending; closes itself (sing.js sentBanner). */
.sent-note { display: flex; align-items: center; gap: 0.5rem; padding: 0.55rem 0.75rem; margin-bottom: var(--nk-gap);
  border: 1px solid rgba(50, 213, 138, 0.45); background: rgba(50, 213, 138, 0.08); border-radius: var(--nk-radius-sm);
  font-size: 0.92rem; animation: sent-note-in 0.2s ease-out; }
.sent-note-text { flex: 1; }
.sent-note-close { background: none; border: 0; color: var(--nk-text-dim); font-size: 1.2rem; line-height: 1; padding: 0.15rem 0.35rem; cursor: pointer; }
@keyframes sent-note-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
/* Undo · + Add singer on the Sent note (Request sends straight from search). */
.sent-note { flex-wrap: wrap; }
.sent-note-actions { display: flex; gap: 0.9rem; }
.sent-note-actions .btn.link {
  background: none; border: none; color: var(--nk-accent); padding: 0.25rem 0; cursor: pointer; font: inherit;
  font-weight: 600; text-decoration: underline;
}
.sent-note-actions .btn.link[disabled] { opacity: 0.5; cursor: default; }
.sing-send-status { margin: 0.35rem 0; }
.sing-other-options {
  background: none; border: none; color: var(--nk-accent); padding: 0; cursor: pointer; font: inherit;
  text-decoration: underline;
}
/* Make-it progress tracker (My songs ⓘ details). */
.sent-tracker { list-style: none; display: flex; gap: 0.25rem; padding: 0; margin: 0.75rem 0 0.25rem; }
.sent-step { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.3rem; font-size: 0.78rem; color: var(--nk-text-dim); position: relative; }
.sent-step:not(:last-child)::after { content: ""; position: absolute; top: 0.4rem; left: calc(50% + 0.6rem); right: calc(-50% + 0.6rem); border-top: 2px solid var(--nk-border); }
.sent-dot { width: 0.8rem; height: 0.8rem; border-radius: 50%; border: 2px solid var(--nk-border); background: var(--nk-bg); }
.sent-step.done { color: var(--nk-good); }
.sent-step.done .sent-dot { background: var(--nk-good); border-color: var(--nk-good); }
.sent-step.done::after { border-color: var(--nk-good); }
.sent-step.active { color: var(--nk-text); font-weight: 600; }
.sent-step.active .sent-dot { border-color: var(--nk-accent); box-shadow: 0 0 0 3px rgba(255, 77, 207, 0.25); }
.sing-other-options { align-self: flex-start; margin-top: 0.25rem; }

/* --- Compact search results + filter chips ----------------------------------- */
/* Song rows: title, artist and a facts line (Original / Cover band, brand,
   version count) on the left; Request over ▶ Preview on the right. Tapping
   the text opens the version detail below the row. */
.result-row.grouped { padding: 0.55rem 0.65rem; gap: 0.35rem; margin: 0.25rem 0; }
.result-row.grouped.open { border-color: rgba(255, 77, 207, 0.45); }
.sing-song-head { display: flex; align-items: center; gap: 0.55rem; }
.sing-song-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  background: none;
  border: 0;
  padding: 0.1rem 0;
  color: var(--nk-text);
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.sing-song-info .r-title {
  font-size: 0.95rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sing-song-info .r-sub { font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sing-song-facts {
  display: block;
  font-size: 0.75rem;
  color: var(--nk-text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sing-song-facts > span + span::before { content: "·"; margin: 0 0.35rem; color: var(--nk-text-dim); }
.sing-song-type { font-weight: 600; }
.sing-song-count::before { content: "·"; margin: 0 0.35rem; }
.sing-song-count { color: var(--nk-text-dim); font-size: 0.75rem; }
.sing-song-type-community { color: var(--nk-good); }
.sing-song-type-commercial { color: #7ab8ff; }
.sing-song-actions { flex: none; display: flex; flex-direction: column; gap: 0.35rem; width: 6.6rem; }
.result-row.grouped .sing-song-actions .btn-primary-cta,
.sing-song-choose,
.sing-song-preview {
  width: 100%;
  margin: 0;
  padding: 0 0.5rem;
  height: 2.1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.sing-song-choose {
  background: transparent;
  border: 1px solid var(--nk-accent);
  color: var(--nk-accent);
}
.sing-song-preview {
  border: 1px solid rgba(255, 77, 207, 0.55);
  background: rgba(255, 77, 207, 0.08);
  color: var(--nk-accent);
}

.sing-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.6rem;
  margin: 0.35rem 0 0.4rem;
}
.sing-filter-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.sing-filter-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--nk-border);
  background: var(--nk-card-2);
  color: var(--nk-text);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.sing-filter-chip.on { background: var(--nk-text); border-color: var(--nk-text); color: var(--nk-bg); }
.sing-filter-count { font-weight: 500; opacity: 0.7; font-size: 0.75rem; }
.sing-sort {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--nk-text-dim);
}
.sing-sort-select {
  background: transparent;
  border: 0;
  color: var(--nk-text);
  font: inherit;
  font-weight: 600;
  padding: 0.2rem 0;
  cursor: pointer;
}
.sing-sort-select option { background: var(--nk-card); color: var(--nk-text); }
.sing-others-toggle {
  display: block;
  width: 100%;
  margin: 0.5rem 0 0.25rem;
  padding: 0.6rem 0.2rem;
  border-top: 1px solid var(--nk-border);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Small phones: give the song name the room, not the buttons. */
@media (max-width: 360px) {
  .sing-song-actions { width: 5.8rem; }
  .result-row.grouped .sing-song-actions .btn-primary-cta,
  .sing-song-choose,
  .sing-song-preview { font-size: 0.76rem; padding: 0 0.35rem; }
}

/* Make-it: the audio search is slow (up to ~30 s), so the audio section uses the
   bouncing-notes loader and the disabled send button spins while it works. */
.mk-card .sing-searching { justify-content: flex-start; padding: 0.4rem 0; text-align: start; }
.mk-card .sing-searching-label { flex: 1 1 auto; min-width: 0; }
.mk-spinner {
  display: inline-block; width: 1em; height: 1em; margin-inline-end: 0.55em; vertical-align: -0.15em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: mk-spin 0.8s linear infinite;
}
@keyframes mk-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mk-spinner { animation-duration: 2.4s; } }
