/* Lists (.pin star buttons and the /lists page). Colours, type and spacing are tokens.
   The data lives in localStorage; web/static/lists.js owns the behaviour. */

/* ── ☆ toggle: on browse rows (icon only) and on a full statblock (icon + word) ── */
.pin { cursor: pointer; }
.pin[aria-pressed=true] { color: var(--accent); }
.pin__glyph { font-size: 13px; line-height: 1; }
.ua-table .ua-table__mark { width: 38px; padding-left: 14px; padding-right: 0; }
.pin--row { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; background: none; border: 0; color: var(--ink-faint); font: 400 14px/1 var(--font-sans); }
.pin--row:hover { color: var(--accent); }
.pin--row .pin__glyph { font-size: 14px; }
.ua-row--on .pin--row { color: var(--ink-muted); }
.pin__to { align-self: center; max-width: 12rem; padding: 4px 8px; font: 400 12px/16px var(--font-mono); }

/* ── /lists page ───────────────────────────────────────────────────────────── */
.lists__panes { display: grid; grid-template-columns: 240px minmax(320px, 1fr); gap: var(--space-5); align-items: start; margin-top: var(--space-4); }
.lists__aside { position: sticky; top: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.lists__new { gap: var(--space-1); }
.lists__row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: flex-end; }
.lists__row input { flex: 1 1 8rem; }
.lists__nav { list-style: none; margin: 0; padding: 0; }
.lists__tab { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); width: 100%; padding: 8px 10px; background: none; border: 0; border-left: 3px solid transparent; border-radius: 0; color: var(--ink); font: 500 13px/20px var(--font-sans); text-align: left; cursor: pointer; }
.lists__tab:hover { background: var(--surface-300); }
.lists__tab--on { border-left-color: var(--accent); color: var(--accent); background: var(--surface-200); }
.lists__tab-name { overflow-wrap: anywhere; }
.lists__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--space-2) var(--space-3); padding-bottom: var(--space-2); border-bottom: 1px solid var(--line-strong); }
.lists__note { flex: 1 1 100%; margin: 0; min-height: 16px; }
.lists__item-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-3); background: var(--surface-300); border: 1px solid var(--line); border-bottom: 0; }
.lists__item-tools .ua-mono { margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lists__item-tools [disabled] { opacity: .45; }
.lists__items { display: flex; flex-direction: column; gap: var(--space-4); margin-top: var(--space-3); }
.lists__item { display: flex; flex-direction: column; }

@media (max-width: 900px) {
  .lists__panes { grid-template-columns: 1fr; }
  .lists__aside { position: static; }
}

/* ── pinbar: the default list, docked bottom-right on every page that carries it ── */
.pinbar { position: fixed; right: var(--space-4); bottom: var(--space-4); z-index: 35; display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2); max-width: calc(100vw - 2 * var(--space-4)); }
.pinbar__toggle { box-shadow: var(--shadow-overlay); }
.pinbar__panel { width: 280px; max-width: 100%; max-height: min(50vh, 420px); display: flex; flex-direction: column; background: var(--surface-200); border: 1px solid var(--line-strong); border-radius: var(--radius-md); box-shadow: var(--shadow-overlay); overflow: hidden; }
.pinbar__panel[hidden] { display: none; }
.pinbar__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--line); }
.pinbar__list { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.pinbar__list > li:not(.pinbar__item) { padding: var(--space-2) var(--space-3); }
.pinbar__item { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: 2px var(--space-3); border-bottom: 1px solid var(--line); }
.pinbar__item:last-child { border-bottom: 0; }
.pinbar__link { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font: 500 13px/24px var(--font-sans); }
.pinbar__link:hover { color: var(--accent); }
.pinbar__rm { flex: none; width: 22px; height: 22px; padding: 0; background: none; border: 0; color: var(--ink-faint); font: 400 16px/1 var(--font-sans); cursor: pointer; }
.pinbar__rm:hover { color: var(--accent); }
