/* Play scripts (js/plays.js): library card, part picker, scene reader. Built from ui-kit tokens; made for 390 px first. */
.pl-page { display: grid; gap: var(--sp-3); max-width: 40rem; margin-inline: auto; min-width: 0; }
.pl-page h2, .pl-page h3, .pl-page p { margin: 0; }
.pl-page h3 { font-size: var(--fs-h3); }
.pl-page [hidden] { display: none !important; } /* .btn and .ds-card set display, which would beat the hidden attribute */
.pl-bar { display: flex; }
.pl-head { display: flex; align-items: center; gap: var(--sp-3); }
.pl-head > div { flex: 1; min-width: 0; }
.pl-ico { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: var(--r-sm); background: color-mix(in srgb, var(--pl, var(--accent)) 16%, var(--surface)); font-size: 1.4rem; }
.pl-ico.big { width: 56px; height: 56px; font-size: 1.8rem; }
.pl-blurb { color: var(--ink-2); }
.pl-entry { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-block-end: var(--sp-3); }
.pl-entry p { margin: 0; }
.pl-entry h2 { margin: 0; font-size: var(--fs-h3); }

.pl-list, .pl-scenes, .pl-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.pl-card, .pl-scene { display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-height: 56px; padding: var(--sp-3); border: 1px solid var(--hairline-strong); border-radius: var(--r-sm); background: var(--surface); color: inherit; font: inherit; text-align: start; cursor: pointer; }
.pl-card:hover, .pl-scene:hover { border-color: var(--accent-line); }
.pl-card-t, .pl-scene-t { display: grid; gap: 2px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pl-scene-t small { color: var(--muted); font-size: var(--fs-sm); }
.pl-n { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--surface-2); font-weight: 600; }

.pl-roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-2); }
.pl-role { display: grid; gap: 2px; justify-items: start; text-align: start; min-height: 56px; border-radius: var(--r-sm); line-height: 1.25; }
.pl-role small { font-weight: 400; font-size: var(--fs-xs); opacity: .85; }

.pl-note { color: var(--ink-2); border-inline-start: 3px solid var(--warn); }
.pl-lines { gap: var(--sp-2); }
.pl-line { margin: 0; }
.pl-say { display: grid; gap: 2px; width: 100%; padding: var(--sp-3); border: 1px solid var(--hairline); border-radius: var(--r-sm); background: var(--surface); color: inherit; font: inherit; text-align: start; cursor: pointer; min-width: 0; }
.pl-who { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; unicode-bidi: isolate; }
.pl-t { font-size: var(--fs-lg); line-height: 1.45; overflow-wrap: anywhere; }
.pl-me { justify-self: start; background: var(--accent); color: var(--accent-ink); }
.pl-line.mine .pl-say { border-color: var(--accent-line); background: var(--accent-soft); }
.pl-line.stage .pl-say { border-style: dashed; background: var(--surface-2); }
.pl-line.stage .pl-t { font-style: italic; color: var(--ink-2); font-size: var(--fs-sm); }
.pl-line.now .pl-say { box-shadow: var(--ring); border-color: var(--accent); }

.pl-ctl { position: sticky; bottom: var(--sp-3); z-index: 2; display: grid; gap: var(--sp-2); padding: var(--sp-3); border: 1px solid var(--hairline-strong); border-radius: var(--r); background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: var(--e3); }
.pl-turn { min-height: 0; font-weight: 600; color: var(--tint-ink-1, var(--accent)); }
.pl-turn:empty { display: none; }
.pl-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.pl-actions .btn { flex: 1 1 auto; min-height: 48px; }
.pl-end p { margin: 0 0 var(--sp-2); }
@media (max-width: 760px) {
  html:not(.in-lesson):not(.pw-on) .pl-ctl { bottom: calc(var(--dock-h, 64px) + var(--sp-2) + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) { .pl-card, .pl-scene, .pl-say { transition: none; } }
