/* Discindex styles. Colors and choices come from stages/02-design/output/design.md */
:root {
  --bg: #FAFAF8; --card: #FFFFFF; --text: #1C1C1E; --muted: #6B6B70;
  --line: #E7E5E0; --accent: #C2410C; --accent-soft: #FFF1EA; --warn: #FEF3C7; --ok: #DCFCE7;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px; }
button { font: inherit; cursor: pointer; color: inherit; }
a { color: var(--accent); }
h3 { margin: 0 0 6px; }

/* header */
header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; padding: 14px 24px;
  background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.logo { font-weight: 700; font-size: 18px; letter-spacing: -0.3px; color: var(--text); text-decoration: none; }
.logo span { color: var(--accent); }
.search { flex: 1; min-width: 180px; max-width: 420px; margin: 0 auto; padding: 9px 14px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font: inherit; }
.search:focus { outline: 0; border-color: var(--accent); background: var(--card); }
.btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 9px 16px;
  font-weight: 600; text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); font-weight: 500; }
.btn.danger { background: transparent; color: #B91C1C; border: 1px solid #F3C4C4; font-weight: 500; }
.icon-btn { background: none; border: 0; font-size: 20px; color: var(--muted); }
.menu { position: fixed; right: 24px; top: 64px; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.1); padding: 6px; display: none; z-index: 20; }
.menu.on { display: block; }
.menu > * { display: block; padding: 9px 14px; border-radius: 6px; cursor: pointer; color: var(--text); text-decoration: none; }
.menu > *:hover { background: var(--bg); }

main { max-width: 1200px; margin: 0 auto; padding: 24px; }
.page { display: none; } .page.on { display: block; }
.back { color: var(--muted); display: inline-block; margin-bottom: 20px; text-decoration: none; }
h1 { margin: 0 0 4px; font-size: 30px; letter-spacing: -0.5px; }
.artist { font-size: 19px; color: var(--muted); margin-bottom: 14px; }
.hint { color: var(--muted); font-size: 14px; }
.empty { text-align: center; padding: 80px 0; }

/* collection toolbar */
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 10px; flex-wrap: wrap; }
.tools { display: flex; gap: 12px; align-items: center; }
.toolbar select { font: inherit; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); }
.viewswitch { display: flex; background: #EFEDE8; padding: 3px; border-radius: 8px; }
.viewswitch button { border: 0; background: none; padding: 5px 10px; border-radius: 6px; color: var(--muted); font-size: 14px; }
.viewswitch button.on { background: var(--card); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.viewswitch.big button { font-size: 15px; padding: 6px 14px; }

/* grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 24px 20px; }
.item { cursor: pointer; min-width: 0; }
.cover { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.12);
  background: #eee; display: block; transition: transform .15s; }
.item:hover .cover { transform: translateY(-3px); }
.item .t { font-weight: 600; margin-top: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .a { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* list + songs tables */
.list { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.list th { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.list td { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.list tr:last-child td { border-bottom: 0; }
.list tbody tr { cursor: pointer; }
.list tbody tr:hover { background: var(--accent-soft); }
.list .thumb { width: 44px; height: 44px; border-radius: 4px; object-fit: cover; background: #eee; display: block; }
.list .thumb.sm { width: 32px; height: 32px; }
.list td.t { font-weight: 600; }
.list td.m { color: var(--muted); }
.list .r { text-align: right; font-variant-numeric: tabular-nums; }
.list td.r { color: var(--muted); }
.colsearch { width: 100%; min-width: 60px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit;
  font-size: 13px; font-weight: 500; background: var(--bg); color: var(--text); }
.colsearch.num { max-width: 90px; }
.colsearch.time { max-width: 92px; text-align: right; }
.colsearch:focus { outline: 0; border-color: var(--accent); background: var(--card); }
.nomatch td { text-align: center; color: var(--muted); padding: 20px; }

/* album page */
.album { display: grid; grid-template-columns: minmax(240px, 360px) 1fr; gap: 40px; }
.bigcover { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,.15); background: #eee; }
.tags span { display: inline-block; background: var(--accent-soft); color: var(--accent);
  padding: 3px 10px; border-radius: 99px; font-size: 13px; margin: 0 6px 6px 0; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin: 18px 0; }
.box dl { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; margin: 0; }
.box dt { color: var(--muted); }
.box dd { margin: 0; }
.tracks { width: 100%; border-collapse: collapse; }
.tracks td { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.tracks td:first-child { color: var(--muted); width: 44px; }
.tracks td:last-child { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.tracks tr.heading td { font-weight: 600; color: var(--text); padding-top: 16px; }
.tracks tr.total td { font-weight: 600; color: var(--text); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

/* add page */
.panel { max-width: 640px; }
.addbar { display: flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.addbar input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 16px; padding: 10px; background: none; min-width: 0; }
.ibtn { width: 44px; height: 44px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg);
  font-size: 20px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ibtn.on, .ibtn:hover { background: var(--accent-soft); border-color: var(--accent); }
.ibtn.go { background: var(--accent); border-color: var(--accent); color: #fff; }
.icons-legend { display: flex; gap: 18px; color: var(--muted); font-size: 14px; margin: 12px 2px 20px; flex-wrap: wrap; }
#reader { border-radius: 10px; overflow: hidden; background: #222; min-height: 200px; }
#reader video { border-radius: 10px; }
.note { border-radius: 8px; padding: 10px 14px; margin-top: 16px; font-size: 14px; background: var(--warn); }
.note.ok { background: var(--ok); }
.note.info { background: #EFEDE8; }
.results { margin-top: 12px; }
.res { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 8px; cursor: pointer; }
.res:hover { background: var(--accent-soft); }
.res img { width: 48px; height: 48px; border-radius: 4px; object-fit: cover; background: #eee; flex-shrink: 0; }
.res .m { color: var(--muted); font-size: 14px; }

/* versions */
.versions { display: flex; flex-direction: column; gap: 10px; max-width: 760px; margin: 20px 0; }
.ver { display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center;
  background: var(--card); border: 2px solid var(--line); border-radius: 10px; padding: 10px 14px; cursor: pointer; }
.ver.on { border-color: var(--accent); background: var(--accent-soft); }
.ver img { width: 56px; height: 56px; border-radius: 4px; object-fit: cover; background: #eee; }
.ver .meta { color: var(--muted); font-size: 14px; }
.ver .yr { font-weight: 700; font-size: 18px; }
.ver .own { font-size: 12px; color: var(--accent); font-weight: 600; }

/* settings */
.lbl { display: block; margin: 12px 0; font-weight: 600; font-size: 14px; }
.lbl input { display: block; width: 100%; margin-top: 4px; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; font-weight: 400; }
.progress { height: 8px; background: #EFEDE8; border-radius: 99px; overflow: hidden; margin-top: 14px; }
.progress div { height: 100%; width: 0; background: var(--accent); transition: width .3s; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: #fff;
  padding: 10px 18px; border-radius: 10px; font-size: 14px; z-index: 30; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* phone */
.intro { list-style: none; padding: 0; margin: 24px auto; max-width: 520px; text-align: left; }
.intro li { padding: 10px 14px; margin-bottom: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.empty .hint { max-width: 520px; margin: 0 auto 24px; }

/* sign in */
.avatar { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--accent); color: #fff;
  font-weight: 700; padding: 0; overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.menu-who { cursor: default !important; color: var(--muted) !important; font-size: 13px; border-bottom: 1px solid var(--line);
  border-radius: 0 !important; margin-bottom: 4px; }
.menu-who:hover { background: none !important; }
.menu-who b { color: var(--text); display: block; font-size: 14px; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 40; display: flex; align-items: center;
  justify-content: center; padding: 16px; }
.modal { position: relative; background: var(--card); border-radius: 14px; padding: 28px; width: 100%; max-width: 400px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal h2 { margin: 0 0 4px; font-size: 22px; }
.modal-x { position: absolute; top: 12px; right: 12px; font-size: 16px; }
.btn.google { width: 100%; margin-top: 12px; background: var(--card); color: var(--text); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn.google .g { font-weight: 800; color: #4285F4; font-size: 17px; }
.or { text-align: center; margin: 18px 0 4px; color: var(--muted); font-size: 13px; position: relative; }
.or::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line); }
.or span { background: var(--card); padding: 0 10px; position: relative; }
.auth-links { text-align: center; margin-bottom: 0; }
#authMsg:empty { display: none; }
.sync { font-size: 13px; color: var(--muted); }
.genre-filter { font: inherit; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); max-width: 200px; }
.genre-filter.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* floating add button (phones only) */
.fab { display: none; }

/* ---------- phones (iPhone etc.) ---------- */
@media (max-width: 700px) {
  header { padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); gap: 10px; }
  .logo { font-size: 20px; }
  .add-top { display: none; }
  #signInBtn { margin-left: auto; padding: 7px 12px; }
  .avatar { margin-left: auto; }
  .icon-btn { width: 40px; height: 40px; font-size: 22px; }
  .search { order: 3; flex-basis: 100%; max-width: none; margin: 0; }
  main { padding: 14px 16px; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .menu { top: calc(60px + env(safe-area-inset-top)); right: 12px; left: 12px; }
  .menu > * { padding: 13px 14px; }

  /* iPhone zooms into text boxes under 16px, so everything you can type in is 16px */
  input, select, textarea, .colsearch, .search, .toolbar select, .genre-filter { font-size: 16px; }

  /* toolbar: two neat rows */
  .toolbar { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-bottom: 14px; }
  .toolbar > .tools:first-child { grid-column: 1 / -1; justify-content: space-between; }
  .toolbar > .tools:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
  .toolbar .lbl-txt { display: none; }
  .genre-filter, .sort-lbl select { width: 100%; max-width: none; padding: 8px 10px; }
  .sort-lbl { display: block; min-width: 0; }
  .viewswitch button { padding: 6px 12px; font-size: 16px; }
  #count { font-size: 14px; color: var(--muted); font-weight: 500; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 18px 14px; }
  .item:hover .cover { transform: none; }
  .item:active .cover { transform: scale(.97); }

  /* list + songs: tables become tidy rows: cover | title + artist | length */
  .list, .list thead, .list tbody { display: block; }
  .list { border-radius: 10px; overflow: hidden; }
  .list thead tr { display: flex; gap: 6px; overflow-x: auto; padding: 8px; border-bottom: 1px solid var(--line);
    -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .list thead tr::-webkit-scrollbar { display: none; }
  .list thead th { padding: 0; border: 0; flex: 0 0 auto; display: block; }
  .list thead th:first-child { display: none; }
  .list .colsearch { width: 120px; max-width: none; padding: 6px 10px; text-align: left; }
  .list tbody tr { display: grid; grid-template-columns: 48px 1fr auto; column-gap: 12px; row-gap: 1px;
    align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); }
  .list tbody tr:last-child { border-bottom: 0; }
  .list tbody tr[hidden] { display: none; }
  .list td { padding: 0; border: 0; min-width: 0; }
  .list td:first-child { grid-row: 1 / span 2; }
  .list .thumb, .list .thumb.sm { width: 48px; height: 48px; }
  .list td.t { grid-column: 2; grid-row: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .list td:nth-child(3) { grid-column: 2; grid-row: 2; color: var(--muted); font-size: 14px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .list tbody .wide { display: none; }
  .list td.r { grid-column: 3; grid-row: 1; }
  #list td:nth-child(4) { grid-column: 3; grid-row: 2; text-align: right; font-size: 13px; }
  #list tbody td.r.wide { display: block; }
  .list .nomatch { display: block; }
  .list .nomatch td { display: block; }

  /* album page */
  .album { grid-template-columns: 1fr; gap: 18px; }
  .bigcover { max-width: 320px; margin: 0 auto; display: block; }
  h1 { font-size: 24px; }
  .artist { font-size: 17px; }
  .box dl { grid-template-columns: 100px 1fr; }
  .actions .btn { flex: 1 1 auto; text-align: center; padding: 11px 14px; }

  /* add page */
  .ibtn { width: 46px; height: 46px; }
  .icons-legend { gap: 6px 14px; font-size: 13px; }
  .ver { grid-template-columns: 48px 1fr auto; gap: 12px; padding: 10px; }
  .ver img { width: 48px; height: 48px; }
  #versAdd { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); width: 100%; padding: 13px;
    box-shadow: 0 6px 20px rgba(0,0,0,.2); }

  /* sign-in window slides up from the bottom like an iPhone sheet */
  .modal-bg { align-items: flex-end; padding: 0; }
  .modal { max-width: none; border-radius: 16px 16px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }

  .toast { bottom: calc(90px + env(safe-area-inset-bottom)); max-width: calc(100% - 32px); text-align: center; }

  .fab { display: flex; position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 15;
    width: 60px; height: 60px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 34px; font-weight: 300;
    align-items: center; justify-content: center; text-decoration: none; box-shadow: 0 6px 18px rgba(194,65,12,.4); line-height: 1; }
  .fab:active { transform: scale(.94); }
  body[data-page="add"] .fab, body[data-page="settings"] .fab, body[data-page="versions"] .fab, body[data-page="empty"] .fab { display: none; }
}

/* computer: 8 covers per row (Kevin's choice), page uses more of a wide screen */
@media (min-width: 1000px) {
  main { max-width: 1600px; }
  .grid { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 22px 16px; }
  .item .t { font-size: 14px; }
  .item .a { font-size: 13px; }
}

/* packages (owner only): same look as the collection */
.nav-tab { color: var(--text); text-decoration: none; font-weight: 600; padding: 7px 12px; border-radius: 8px; }
.nav-tab:hover, body[data-page="packages"] .nav-tab { background: var(--accent-soft); color: var(--accent); }
.pkg-h1 { font-size: 24px; margin: 0; }
.pkg-filter { width: fit-content; max-width: 100%; overflow-x: auto; margin-bottom: 18px; scrollbar-width: none; }
.pkg-filter::-webkit-scrollbar { display: none; }
.pkg-filter button { white-space: nowrap; }
.pkg-filter small { font-size: 11px; color: var(--muted); margin-left: 3px; }
.cover-wrap { position: relative; }
.pkg-ph { display: flex; align-items: center; justify-content: center; font-size: 40px; background: #EFEDE8; }
.list .pkg-ph.thumb { font-size: 22px; }
.pkg-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px;
  background: #EFEDE8; color: var(--muted); white-space: nowrap; }
.cover-wrap .pkg-badge { position: absolute; top: 7px; left: 7px; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.pkg-badge.s-ordered { background: #F1F0EC; color: #57534E; }
.pkg-badge.s-paid { background: #DBEAFE; color: #1D4ED8; }
.pkg-badge.s-shipped { background: var(--accent); color: #fff; }
.pkg-badge.s-arrived { background: #DCFCE7; color: #15803D; }
.pkg-item .pkg-when { font-size: 12px; }
.pkg-item .pkg-arrived { margin-top: 6px; width: 100%; }
.btn.small { padding: 6px 10px; font-size: 13px; }
.pkg-act { width: 1%; white-space: nowrap; }
.pkg-empty { padding: 60px 0; color: var(--muted); }
.pkg-empty .btn { margin-top: 14px; }
.pkg-modal { max-width: 620px; max-height: calc(100vh - 32px); overflow-y: auto; }
.pkg-modal .addbar { margin-top: 12px; }
.pkg-matches { max-height: 300px; overflow-y: auto; }
.pkg-matches .res.on, .res.chosen { background: var(--accent-soft); outline: 2px solid var(--accent); }
.res.chosen { margin-top: 12px; cursor: default; }
.pkg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin-top: 8px; }
.pkg-grid .lbl { margin: 8px 0; }
.pkg-grid select { display: block; width: 100%; margin-top: 4px; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; font-weight: 400; background: var(--card); }
#pkgFindStatus:empty, #pkgChosen:empty { display: none; }
@media (max-width: 700px) {
  .nav-tab { padding: 6px 8px; font-size: 15px; }
  .pkg-h1 { font-size: 20px; }
  #page-packages .toolbar > .tools:last-child { grid-template-columns: 1fr auto auto; }
  #pkgAddBtn { padding: 8px 12px; }
  .pkg-modal { max-height: 92vh; }
  .pkg-grid { gap: 0 10px; }
  #pkgTable td:nth-child(6) { grid-column: 3; grid-row: 1; }
  #pkgTable td.pkg-act { grid-column: 3; grid-row: 2; }
  body[data-page="packages"] .fab { display: none; }
}

/* import many packages */
.imp-bar { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; max-width: 900px; }
.imp-bar .lbl { margin: 0; }
.imp-bar select { display: block; margin-top: 4px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-weight: 400; background: var(--card); }
#impBody { max-width: 900px; }
.imp-row { display: grid; grid-template-columns: 22px 56px minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.imp-row.off { opacity: .5; }
.imp-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
.imp-img { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; background: #EFEDE8; font-size: 24px; }
.imp-shop b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imp-shop .m { color: var(--muted); font-size: 13px; }
.imp-pick { display: flex; gap: 8px; align-items: center; }
.imp-pick img { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.imp-pick select { min-width: 0; width: 100%; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px; background: var(--card); }
.imp-actions { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; max-width: 900px; }
.bm-btn { cursor: grab; }
@media (max-width: 700px) {
  .imp-row { grid-template-columns: 22px 48px minmax(0, 1fr); }
  .imp-img { width: 48px; height: 48px; }
  .imp-match { grid-column: 2 / -1; }
  .imp-pick select { font-size: 16px; }
}

body[data-page="pkgimport"] .fab { display: none; }

/* package types: CD / bundle / merch */
.kind-tag { position: absolute; bottom: 7px; left: 7px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px;
  background: rgba(28,28,30,.82); color: #fff; }
.linked-head { font-weight: 700; margin: 12px 0 6px; }
.res.chosen { margin-top: 6px; position: relative; padding-right: 40px; }
.res.chosen .unlink { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 15px; }
.imp-kind { margin-top: 6px; font: inherit; font-size: 13px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); }
.imp-bundle { display: flex; flex-direction: column; gap: 4px; }
.imp-b { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.imp-b input { width: 16px; height: 16px; accent-color: var(--accent); flex-shrink: 0; }
.imp-b img { width: 32px; height: 32px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
@media (max-width: 700px) {
  #page-packages .toolbar > .tools:last-child { grid-template-columns: 1fr 1fr; }
  #page-packages .toolbar > .tools:last-child .viewswitch, #pkgAddBtn { grid-column: auto; }
  .imp-kind { font-size: 16px; }
}

.pkg-filter-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.pkg-filter-row .pkg-filter { margin-bottom: 0; }
#pkgDupes { border-color: var(--accent); color: var(--accent); font-weight: 600; }

.pkg-kinds { margin-bottom: 10px; }
