/* A piece's list (public/piecelist.js): on the piece pages and in the home page's piece box. */
.d-list [hidden] { display: none !important; } /* the adder, the picker, the tags: hidden wins over their display */
.d-lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.d-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 4px 12px; padding: 11px 0; border-bottom: 1px solid var(--line); transition: background 0.4s; }
.d-lines li.flash { background: var(--accent-tint); }
.d-words { line-height: 1.45; padding-top: 4px; }
.d-lines li.off .d-words { opacity: 0.45; }
.d-lines li.off .d-words b { text-decoration: line-through; text-decoration-thickness: 1px; }
.d-lines b { font-weight: 600; }
.d-lines small { color: var(--muted); font-size: 0.86rem; }
.d-name { color: inherit; text-decoration: underline dotted; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.d-name:hover, .d-name:focus-visible { color: var(--accent); text-decoration: underline; text-decoration-color: var(--accent); }
.d-qty { display: none; font-weight: 600; } /* the stepper shows it; the print-out shows this */
.d-ctl { display: inline-flex; align-items: center; gap: 6px; }
.d-out { padding: 4px 10px; font: inherit; font-size: 0.8rem; color: var(--muted); background: none; border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer; white-space: nowrap; }
.d-out:hover, .d-out:focus-visible { color: var(--ink); border-color: var(--ink); }
.d-rm { width: 30px; height: 30px; flex: none; font: inherit; font-size: 0.9rem; color: var(--muted); background: none; border: 1px solid var(--line-2); border-radius: 50%; cursor: pointer; }
.d-rm:hover, .d-rm:focus-visible { color: var(--ink); border-color: var(--ink); }
.d-opts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.d-opt { min-width: 48px; padding: 5px 10px; font: inherit; font-size: 0.88rem; color: var(--muted); background: none; border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer; }
.d-opt[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.d-opt:focus-visible, .d-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.d-opts--long:not(.is-open) .d-opt[aria-pressed="false"]:not(.is-orig):not(.d-unit) { display: none; } /* the piece's own notes always show */
.d-opts--long:not(.is-open) .d-opt.is-covered { display: none; } /* a note of an octave or set that's all in: its button says it */
.d-opts--units:not(.is-open) .d-opt[aria-pressed="false"]:not(.d-unit) { display: none; } /* with octave buttons, they stand for the notes that are out */
.d-unit { font-weight: 600; }
.d-pick__onebtn { justify-self: start; }
.d-more { padding: 5px 10px; font: inherit; font-size: 0.85rem; color: var(--accent); background: none; border: 1px dashed var(--line-2); border-radius: 999px; cursor: pointer; }
.d-opts--steps { display: grid; gap: 4px; }
.d-opts--steps .d-more { justify-self: start; }
.d-optrow { display: flex; align-items: center; gap: 8px; padding-left: 12px; border-left: 2px solid var(--line-2); }
.d-optname { flex: 1; font-size: 0.92rem; }
.d-optrow.is-zero .d-optname { color: var(--muted); }
.d-optrow .d-tag { margin-left: 0; }
.d-step { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; }
.d-step button { width: 32px; height: 30px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 1.05rem; cursor: pointer; border-radius: 999px; }
.d-step button:disabled { opacity: 0.3; cursor: default; }
.d-step output { min-width: 18px; text-align: center; font-size: 0.92rem; font-weight: 600; }
.d-tag { font-style: normal; font-size: 0.74rem; border-radius: 999px; padding: 1px 8px; margin-left: 6px; white-space: nowrap; border: 1px solid var(--accent); color: var(--accent); }
.d-tag--src { border-color: var(--line-2); color: var(--muted); }
.d-tag--add { border-color: var(--ok); color: var(--ok); }
.d-addbtn { margin-top: 12px; padding: 10px 16px; border: 1px dashed var(--line-2); border-radius: var(--radius); background: none; color: var(--ink); font: inherit; cursor: pointer; width: 100%; text-align: left; }
.d-addbtn:hover { border-color: var(--accent); }
.d-adder { margin-top: 12px; padding: 14px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg-2); display: grid; gap: 10px; }
.d-adder label { display: grid; gap: 4px; font-size: 0.88rem; color: var(--muted); }
.d-adder select { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 10px; }
.d-adder__btns { display: flex; gap: 8px; }
/* the picker: as in the instrument list */
.d-pick { display: grid; gap: 12px; }
.d-pick__sub { margin: 0; color: var(--muted); font-size: 0.86rem; }
.d-pick__g { display: grid; gap: 6px; }
.d-pick__head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 0.9rem; }
.d-pick__head small { color: var(--muted); }
.d-pick__all { margin-left: auto; font: inherit; font-size: 0.82rem; color: var(--accent); background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.d-pick .d-opts { margin: 0; }
.d-pick .d-optrow { padding-left: 0; border-left: 0; }
.d-pick .d-optrow small { color: var(--muted); }
.d-opt--wide { width: 100%; text-align: left; }
.d-opt.is-src[aria-pressed="true"] { background: transparent; color: var(--accent); border: 1px dashed var(--accent); } /* beyond our stock: we'd source it */
.d-opts--long:not(.is-open) .d-optrow.is-zero:not(.is-orig) { display: none; }
