.controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
#q, #show { grid-column: 1 / -1; }
#cat, #src { min-width: 0; }
.seg { display: flex; background: var(--field); border-radius: 999px; padding: 3px; gap: 2px; min-width: 0; }
.seg button { flex: 1; font: inherit; border: 0; background: none; color: var(--muted); padding: 6px 8px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: .86rem; white-space: nowrap; }
.seg button[aria-checked="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.pbar { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--field); overflow: hidden; }
.pbar i { display: block; height: 100%; width: 0; background: var(--focus); border-radius: 4px; transition: width .2s; }
.summary { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .88rem; }
.imp { grid-column: 1 / -1; margin: 0; font-size: .88rem; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.imp:empty { display: none; }
.copy { font: inherit; font-size: .88rem; border: 0; background: none; color: var(--good); padding: 0; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }

/* Список */
.list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); gap: 8px; margin-bottom: 12px; }
.it { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: start; background: var(--card); border: 1px solid var(--line);
      border-radius: 14px; padding: 8px 10px; box-shadow: 0 2px 0 var(--line); min-width: 0; }
.it.has { opacity: .6; }
.it.want { border-color: color-mix(in srgb, #e0a800 60%, var(--line)); }
.it img { width: 44px; height: 44px; object-fit: contain; }
.rb { display: grid; gap: 2px; min-width: 0; font-size: .84rem; line-height: 1.3; }
.rh { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.rh b { font-size: .98rem; }
.cat { color: var(--muted); font-size: .8rem; }
.badge { font-size: .7rem; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: var(--field); color: var(--muted); white-space: nowrap; }
.badge.order { background: color-mix(in srgb, var(--good) 16%, var(--field)); color: var(--good); }
.badge.new { background: color-mix(in srgb, var(--accent) 30%, var(--field)); color: var(--ink); }
.src { color: var(--muted); }
.vars { font: inherit; font-size: .8rem; border: 0; background: none; padding: 0; color: var(--good); cursor: pointer; text-align: left; justify-self: start; }
.vlist { color: var(--muted); font-size: .8rem; }
.btns { display: grid; gap: 6px; align-self: center; justify-items: stretch; }
.tgl { font: inherit; font-size: .82rem; font-weight: 700; border: 2px solid var(--line); background: none; color: var(--muted); padding: 5px 9px; border-radius: 12px; cursor: pointer; white-space: nowrap; }
.tgl[aria-pressed="true"] { border-color: var(--focus); background: color-mix(in srgb, var(--focus) 16%, transparent); color: var(--ink); }
.tgl.star[aria-pressed="true"] { border-color: #e0a800; background: color-mix(in srgb, #ffd84a 30%, transparent); }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 24px 10px; }
.more-wrap { text-align: center; margin: 0 0 24px; }
