/* view: shared ----------------------------------------------------------
 * A shared folder (/set/<payload>). Light: the list is a listener's. The
 * row is the room's anatomy (number, still, who, the round +); tokens are
 * listen.css's. At 900px and wider the head is a column held in view beside
 * the rows (Claude Design "Desktop", 2026-10-17, artboard 1i) — the block
 * at the end.
 */

.shared {
  padding: 16px 0 0;
}

.shared-home {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 var(--gutter);
  font: 600 var(--t-meta) / 1.3 var(--sans);
  color: var(--fg-muted);
}

.shared-title {
  padding: 8px var(--gutter) 0;
  font-size: var(--t-title);
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.shared > .meta,
.shared-side > .meta,
.shared-side > .said,
.shared-note {
  padding: 8px var(--gutter) 0;
}

.shared-note {
  font: italic 400 var(--t-field) / 1.4 var(--serif);
  color: var(--body-ink);
}

.shared-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px var(--gutter) 0;
}

.shared-rows {
  margin-top: 14px;
}

.shared-row {
  display: grid;
  grid-template-columns: 26px 92px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: var(--row-min);
  padding: 10px var(--gutter);
  border-top: 1px solid var(--line);
}

.shared-n {
  font-variant-numeric: tabular-nums;
}

.shared-still {
  width: 92px;
  min-height: var(--tap);
}

.shared-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.shared-name {
  font-size: var(--t-field);
  line-height: 1.2;
  color: var(--fg);
}

.shared-name,
.shared-song {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
}

.shared-row.is-playing .shared-name {
  color: var(--accent);
}

.shared-out {
  font-size: var(--t-small);
  padding: 0 12px;
}

/* ---- the wide screen (≥ 900px) ---------------------------------------
   Laid out only: the author's title, name and note and the two verbs in a
   400px column held in view (the hold is --hold-top, set by render from
   holdTop), the rows at the right with a 112px still and a 20px name. A
   link that is not a folder stays one column. */
@media (min-width: 900px) {
  .shared {
    --gutter: 0px;
    padding: 36px 40px 60px;
  }

  .shared:has(> .shared-side) {
    display: grid;
    grid-template-columns: 400px minmax(0, 1fr);
    column-gap: 80px;
    align-items: start;
  }

  .shared-side {
    position: sticky;
    top: var(--hold-top, 24px);
  }

  .shared-title {
    padding-top: 0;
    font-size: 44px;
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.03em;
  }

  .shared-side > .meta {
    padding-top: 14px;
    font-size: 13.5px;
    color: var(--body-ink);
  }

  .shared-acts {
    max-width: 340px;
    padding-top: 18px;
  }

  .shared-acts > .pill {
    flex: 1;
  }

  .shared-rows {
    margin-top: 0;
  }

  .shared-row {
    grid-template-columns: 28px 112px minmax(0, 1fr) auto;
    column-gap: 16px;
    min-height: 80px;
    padding-block: 4px;
  }

  .shared-n {
    font: 400 17px / 1 var(--serif);
  }

  .shared-still {
    width: 112px;
  }

  .shared-name {
    font-size: 20px;
    line-height: 1.1;
  }

  /* A held row's name and its song each stay a tap tall, their words
     meeting at the line between the two boxes rather than centred apart. */
  .shared-name:has(+ .shared-song) {
    align-items: flex-end;
  }

  .shared-song {
    align-items: flex-start;
    font-size: var(--t-small);
  }
}

/* ---- the order choice: a dev or local copy only (views/orderchoice.js) -- */

/* The page's last line, after #view, padded as #view is (listen.css) so the
   drawer's mini bar never covers it; nothing above it moves. */
.order-choice {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter)
    calc(var(--drawer-mini) + 24px + env(safe-area-inset-bottom, 0px));
  color: var(--fg-muted);
  font-family: var(--sans);
  font-size: var(--t-body);
}

.order-choice-rule {
  padding: 4px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: none;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
}

.order-choice-rule[aria-pressed="true"] {
  border-color: var(--fg);
  color: var(--fg);
}
