/* What the static page adds to web/style.css. */
#setup { max-width: 760px; width: 100%; margin: 0 auto; padding: 24px 16px 64px; }
#home .drop { margin-top: 20px; }
.link-btn {
  border: 1px solid var(--accent); background: transparent; color: var(--accent); font: inherit; font-size: 14px;
  font-weight: 600; border-radius: 999px; padding: 5px 14px; cursor: pointer;
}
.link-btn:hover:not(:disabled) { background: var(--accent); color: var(--accent-ink); }
.link-btn:disabled { border-color: var(--line); color: var(--muted); cursor: default; }
#recent-list li { position: relative; }
a.piece { color: inherit; text-decoration: none; padding-right: 48px; }
#recent-list .forget { position: absolute; top: 10px; right: 10px; }

/* Other parts fade (only where the singer's own staff is drawn: see tintStaves), but stay readable. */
.score g.staff.other { opacity: 0.75; }

/* The selected mix reads as selected, like the selected part. */
.seg.on { background: var(--accent); color: var(--accent-ink); }

/* The ⋯ menu: share, change setup. */
.more { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 240px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  padding: 6px; display: flex; flex-direction: column;
}
.menu-item {
  display: block; text-align: left; border: 0; background: transparent; color: var(--ink); font: inherit;
  font-size: 15px; padding: 10px 12px; border-radius: 8px; cursor: pointer; text-decoration: none;
}
.menu-item:hover:not(:disabled), .menu-item:focus-visible { background: var(--mine-soft); outline: none; }
.menu-item:disabled { color: var(--muted); cursor: default; }
.menu-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* The tempo under the bar number is the tempo control: tap it for speed. */
.tempo-toggle {
  border: 0; background: transparent; padding: 2px 0; font: inherit; font-size: 13px; color: var(--muted);
  cursor: pointer; text-align: left; max-width: 100%;
}
.tempo-toggle::after { content: " ▾"; font-size: 11px; }
.tempo-toggle[aria-expanded="true"]::after { content: " ▴"; }
.tempo-toggle.changed { color: var(--accent); font-weight: 600; }
#speed-reset { margin-left: auto; white-space: nowrap; }
#speed-reset .short { display: none; }
@media (max-width: 640px) { #speed-reset .short { display: inline; } }

/* What to tap next while setting a loop: floats at the top of the score (messages use the foot). */
.hint-anchor { position: relative; height: 0; z-index: 6; }
.loop-hint {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px);
  background: var(--accent); color: var(--accent-ink); font-size: 15px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow); pointer-events: none;
}

/* The position slider sits above the buttons, away from the phone's gesture bar. */
.transport .progress { margin: 0 0 8px; }

@media (max-width: 640px) {
  .part-bar .presets { display: none; }                   /* on a phone the mixes are in the mixer */
  .toggle span { display: inline; font-size: 13px; }       /* Loop, Mixer: labeled on phones too */
  .toggle { padding: 7px 9px; gap: 4px; }
  .menu { min-width: 220px; }
  /* the speed row on one line: the tempo above already says the percentage */
  .transport .row.small { gap: 10px; flex-wrap: nowrap; }
  #tempo-out { display: none; }
  .bpm-set input { width: 3.6em; }
  #speed-reset .long { display: none; }
}

/* No part chosen: the whole choir plays evenly, so there's no mix to choose. */
#practice.no-part .presets { display: none !important; }
.no-part-note { display: none; margin: 2px 0 8px; }
#practice.no-part .no-part-note { display: block; }
/* the mixes at the top of the mixer: shown on every screen (the part bar's are only where they fit) */
.mixer .presets { display: inline-flex; margin: 2px 0 10px; }
#parts .chip.everyone { margin-right: 4px; }

/* The mixer: a sheet over the bottom of the score, just above the controls (app.js sets
   `bottom` to the controls' height when it opens), so the score keeps its space. */
.mixer.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  max-width: 760px; margin: 0 auto; max-height: 55vh; overflow: auto;
  border: 1px solid var(--line); border-bottom: 0; border-radius: 16px 16px 0 0;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .16);
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.sheet-head h2 { margin: 0; }

/* The bar number: tap it to go to a rehearsal letter or a bar. */
.goto-toggle { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: inherit; cursor: pointer; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.goto-toggle::after { content: " ▾"; font-size: 11px; color: var(--muted); }
.goto-toggle[aria-expanded="true"]::after { content: " ▴"; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); padding: 10px 16px;
  max-width: 760px; margin: 0 auto; max-height: 55vh; overflow: auto;
  border: 1px solid var(--line); border-bottom: 0; border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .16); }
.sheet h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.marks { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.marks .chip { min-width: 44px; justify-content: center; font-weight: 600; }
.goto-bar { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.goto-bar input { width: 5em; font: inherit; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }

/* The ⋯ menu's view settings */
.menu-sep { height: 1px; background: var(--line); margin: 4px 0; }
.menu-item[role="menuitemcheckbox"]::before { content: "○ "; color: var(--muted); }
.menu-item[role="menuitemcheckbox"][aria-checked="true"]::before { content: "● "; color: var(--accent); }
.menu-row { display: flex; align-items: center; gap: 8px; padding: 8px 14px; font-size: 14px; }
.menu-row span { flex: 1; }

/* The score: pinching it zooms the score, not the page */
#score-wrap { touch-action: pan-x pan-y; }

/* A one-time tip, at the top of the score */
.tip { position: absolute; left: 12px; right: 12px; top: 8px; display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--bg); border-radius: 12px; padding: 8px 12px; font-size: 14px; box-shadow: var(--shadow); }
.tip .mini { color: var(--bg); border-color: currentColor; margin-left: auto; }

/* The setup's summary: what's in the score, before the choices */
.summary { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 16px 0 4px; font-size: 15px; }
.summary ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.summary .checks { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 14px; }
.summary .checks ul { margin-top: 6px; padding-left: 0; }
.summary .checks a { color: var(--accent); margin-left: 6px; }
#f-more { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
#f-more > summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 4px 0; }
#f-more[open] > summary { margin-bottom: 4px; }

/* The share panel */
.share-link { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0; }
.share-link input { flex: 1 1 220px; min-width: 0; font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--bg); color: var(--ink); }
#share .note { margin-top: 8px; }

/* Each page of the score: the browser skips laying out and painting it while it's off screen
   (app.js sets its estimated height until it has been drawn once). */
#score > .page { content-visibility: auto; contain-intrinsic-size: auto 1000px; }
#score > .page > svg { display: block; }

/* Home, once there are pieces: they come first, and adding one is smaller */
#broken { max-width: 760px; width: 100%; margin: 0 auto; padding: 48px 16px; }
#broken .actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 8px; }
.button-link { display: inline-flex; align-items: center; text-decoration: none; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 16px; color: var(--ink); background: var(--surface); }
#home.has-pieces .drop { padding: 18px 16px; margin-top: 8px; }
#home.has-pieces #add-heading { margin-top: 28px; }
#recent .set-title { margin-top: 4px; }
.piece .saved { display: block; margin-top: 4px; font-size: 12px; color: var(--accent); }
.piece .saved[hidden] { display: none; }
