/* ============================================================
   gry-rpg.pl — Components  (v2 — universal RPG hub)
   Vanilla CSS, class-based. WordPress custom-theme friendly.
   Token-driven: re-skins automatically from tokens.css.
   ============================================================ */

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-ui); font-size: 14.5px; font-weight: 600;
  line-height: 1; padding: 11px 18px; border-radius: var(--r-sm);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .14s, border-color .14s, color .14s, box-shadow .14s;
  min-height: 44px;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn .ico { width: 17px; height: 17px; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-primary:active { background: var(--accent-press); }

.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--border-ink); color: var(--ink); }

.btn-ghost { background: transparent; color: var(--ink); border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }

.btn-quiet { background: transparent; color: var(--accent); padding-inline: 6px; min-height: auto; }
.btn-quiet:hover { color: var(--accent-hover); background: transparent; text-decoration: underline; text-underline-offset: 3px; }

.btn-sm { font-size: 13px; padding: 7px 12px; min-height: 36px; }
.btn-lg { font-size: 16px; padding: 14px 24px; min-height: 52px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ---------------- Inputs ---------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.input, .select, .textarea {
  width: 100%; background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  padding: 11px 12px; font-size: 14.5px; line-height: 1.4; min-height: 44px;
  transition: border-color .14s, box-shadow .14s;
}
.textarea { min-height: 96px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.input:disabled { background: var(--surface-sunken); color: var(--faint); cursor: not-allowed; }
.input.is-error, .select.is-error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(192,57,79,.18); }
.select {
  appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%236a6556' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 34px;
}
.field-hint { font-size: 12.5px; color: var(--faint); }
.field-error { font-size: 12.5px; color: var(--danger); display: flex; gap: 5px; align-items: center; }

/* search + autocomplete */
.search { position: relative; display: flex; align-items: center; }
.search .search-ico { position: absolute; left: 13px; width: 18px; height: 18px; color: var(--faint); pointer-events: none; }
.search .input { padding-left: 40px; }
.search-lg .input { padding: 15px 16px 15px 48px; font-size: 16px; border-radius: var(--r-md); min-height: 54px; }
.search-lg .search-ico { left: 17px; width: 20px; height: 20px; }
.kbd { font-family: var(--font-mono); font-size: 11px; color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; padding: 2px 6px; }

/* autocomplete dropdown panel */
.ac { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); overflow: hidden; }
.ac-cat { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--faint);
  padding: 11px 16px 6px; }
.ac-item { display: flex; align-items: center; gap: 12px; padding: 9px 16px; cursor: pointer; }
.ac-item:hover, .ac-item.hl { background: var(--accent-soft); }
.ac-item .ac-ic { width: 32px; height: 32px; border-radius: var(--r-sm); display: grid; place-items: center; flex: none;
  background: var(--surface-2); color: var(--muted); }
.ac-item .ac-ic svg { width: 17px; height: 17px; }
.ac-item .ac-nm { font-weight: 600; color: var(--ink); font-size: 14.5px; }
.ac-item .ac-mt { font-size: 12.5px; color: var(--muted); }
.ac-item .ac-rt { margin-left: auto; }
.ac-foot { padding: 11px 16px; background: var(--surface-2); border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); }

/* checkbox / radio */
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14px; min-height: 24px; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check .box { width: 18px; height: 18px; border: 1.5px solid var(--border-ink); border-radius: 4px; background: var(--surface);
  display: grid; place-items: center; flex: none; transition: background .12s, border-color .12s; }
.check .box.round { border-radius: 50%; }
.check input:focus-visible + .box { box-shadow: var(--ring); }
.check input:checked + .box { background: var(--accent); border-color: var(--accent); }
.check .box svg { width: 12px; height: 12px; color: #fff; opacity: 0; }
.check input:checked + .box svg { opacity: 1; }
.check .box .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; opacity: 0; }
.check input:checked + .box.round .dot { opacity: 1; }

/* toggle */
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.toggle input { position: absolute; opacity: 0; }
.toggle .track { width: 40px; height: 23px; border-radius: 999px; background: var(--border-ink); position: relative; transition: background .15s; flex: none; }
.toggle .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s; }
.toggle input:checked + .track { background: var(--accent); }
.toggle input:checked + .track::after { transform: translateX(17px); }
.toggle input:focus-visible + .track { box-shadow: var(--ring); }

/* segmented control (quick filters / view switch) */
.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border-strong);
  border-radius: var(--r-sm); padding: 3px; gap: 2px; }
.segmented button { font-family: var(--font-ui); font-size: 13.5px; font-weight: 600; color: var(--muted);
  border: 0; background: none; cursor: pointer; padding: 7px 14px; border-radius: 4px; min-height: 36px;
  transition: background .12s, color .12s; }
.segmented button:hover { color: var(--ink); }
.segmented button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ---------------- Badges ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-ui);
  font-size: 11.5px; font-weight: 600; line-height: 1; letter-spacing: 0.01em;
  padding: 4px 9px; border-radius: var(--r-xs); border: 1px solid var(--neutral-line);
  background: var(--neutral-soft); color: var(--neutral); white-space: nowrap;
}
.badge .dot-i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-ok      { color: var(--ok);     background: var(--ok-soft);     border-color: var(--ok-line); }
.badge-info    { color: var(--info);   background: var(--info-soft);   border-color: var(--info-line); }
.badge-warn    { color: var(--warn);   background: var(--warn-soft);   border-color: var(--warn-line); }
.badge-danger  { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-line); }
.badge-arcane  { color: var(--arcane); background: var(--arcane-soft); border-color: var(--arcane-line); }
.badge-accent  { color: var(--accent-ink); background: var(--accent-soft); border-color: var(--accent-line); }
.badge-solid   { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.badge-lg { font-size: 13px; padding: 6px 12px; }

/* ---- Per-system / category tag colours (apply on .badge or .tag) ----
   Always paired with a text label — never colour-only. */
.sys-slate  { color: var(--tag-slate-fg);  background: var(--tag-slate);  border-color: var(--tag-slate-ln); }
.sys-blue   { color: var(--tag-blue-fg);   background: var(--tag-blue);   border-color: var(--tag-blue-ln); }
.sys-indigo { color: var(--tag-indigo-fg); background: var(--tag-indigo); border-color: var(--tag-indigo-ln); }
.sys-violet { color: var(--tag-violet-fg); background: var(--tag-violet); border-color: var(--tag-violet-ln); }
.sys-magenta{ color: var(--tag-magenta-fg);background: var(--tag-magenta);border-color: var(--tag-magenta-ln); }
.sys-rose   { color: var(--tag-rose-fg);   background: var(--tag-rose);   border-color: var(--tag-rose-ln); }
.sys-orange { color: var(--tag-orange-fg); background: var(--tag-orange); border-color: var(--tag-orange-ln); }
.sys-amber  { color: var(--tag-amber-fg);  background: var(--tag-amber);  border-color: var(--tag-amber-ln); }
.sys-olive  { color: var(--tag-olive-fg);  background: var(--tag-olive);  border-color: var(--tag-olive-ln); }
.sys-green  { color: var(--tag-green-fg);  background: var(--tag-green);  border-color: var(--tag-green-ln); }
.sys-teal   { color: var(--tag-teal-fg);   background: var(--tag-teal);   border-color: var(--tag-teal-ln); }
.sys-cyan   { color: var(--tag-cyan-fg);   background: var(--tag-cyan);   border-color: var(--tag-cyan-ln); }
.sys-brown  { color: var(--tag-brown-fg);  background: var(--tag-brown);  border-color: var(--tag-brown-ln); }

/* tags (interactive chips) */
.tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500;
  padding: 6px 11px; border-radius: var(--r-pill); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); cursor: pointer; transition: all .12s; min-height: 32px;
}
.tag:hover { border-color: var(--border-ink); background: var(--surface-2); }
.tag.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.tag .x { width: 13px; height: 13px; opacity: .6; }
.tag .x:hover { opacity: 1; }

/* ---------------- Cards ---------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.card-pad { padding: var(--sp-5); }
.card-hover { transition: border-color .14s, box-shadow .14s, transform .14s; }
.card-hover:hover { border-color: var(--border-ink); box-shadow: var(--shadow-md); }

/* data / entity card (spell, monster, item, generic entity teaser) */
.dcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: var(--sp-4); display: flex; flex-direction: column; gap: 10px; transition: border-color .14s, box-shadow .14s; }
.dcard:hover { border-color: var(--accent-line); box-shadow: var(--shadow-md); }
.dcard .dcard-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dcard .dcard-title { font-family: var(--font-head); font-weight: 600; font-size: 19px; color: var(--ink); line-height: 1.15; }
.dcard .dcard-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.dcard .dcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid var(--border); }

/* ---------------- SYSTEM CARD (kafelek systemu RPG) ---------------- */
.syscard { display: flex; flex-direction: column; gap: 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-5);
  transition: border-color .14s, box-shadow .14s, transform .14s; position: relative; }
.syscard:hover { border-color: var(--accent-line); box-shadow: var(--shadow-md); text-decoration: none; transform: translateY(-1px); }
.syscard .sys-top { display: flex; align-items: center; gap: 13px; }
.syscard .sys-mono { width: 46px; height: 46px; flex: none; border-radius: var(--r-md); display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 600; font-size: 20px; letter-spacing: -0.02em;
  border: 1px solid; }
.syscard .sys-name { font-family: var(--font-head); font-weight: 600; font-size: 19px; color: var(--ink); line-height: 1.1; }
.syscard .sys-pub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.syscard .sys-desc { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.syscard .sys-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.syscard .sys-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 12px; margin-top: auto; border-top: 1px solid var(--border); }
.syscard .sys-meta { display: flex; gap: 16px; }
.syscard .sys-meta .m .k { font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.syscard .sys-meta .m .v { font-family: var(--font-mono); font-size: 13px; color: var(--ink); font-weight: 500; }

/* difficulty / rating meter (dots) */
.meter { display: inline-flex; gap: 3px; align-items: center; }
.meter .pip { width: 7px; height: 7px; border-radius: 50%; background: var(--border-ink); }
.meter .pip.on { background: var(--accent); }
.meter.on-warm .pip.on { background: var(--warn); }

/* ---------------- Tables ---------------- */
.tbl-wrap { border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl thead th {
  text-align: left; font-family: var(--font-ui); font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
  background: var(--surface-2); padding: 11px 14px; border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}
.tbl thead th.sortable { cursor: pointer; }
.tbl thead th.sortable:hover { color: var(--ink); }
.tbl tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--accent-soft); }
.tbl .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.tbl .name-cell { font-weight: 600; color: var(--ink); }
.tbl-zebra tbody tr:nth-child(even) { background: var(--surface-sunken); }
.tbl-zebra tbody tr:nth-child(even):hover { background: var(--accent-soft); }

/* comparison table (systems / entities side by side) */
.tbl-compare { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); }
.tbl-compare th, .tbl-compare td { padding: 13px 16px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.tbl-compare thead th { background: var(--surface-2); border-bottom: 1px solid var(--border-strong); vertical-align: bottom; }
.tbl-compare thead th.col-label { background: transparent; }
.tbl-compare .row-label { font-weight: 600; color: var(--muted); font-size: 12px; letter-spacing: .04em;
  text-transform: uppercase; width: 180px; background: var(--surface-2); white-space: nowrap; }
.tbl-compare .col-name { font-family: var(--font-head); font-weight: 600; font-size: 18px; color: var(--ink); }
.tbl-compare td.hl { background: var(--accent-soft); }
.tbl-compare .yes { color: var(--ok); font-weight: 600; }
.tbl-compare .no { color: var(--faint); }

/* stat row (key/value table on entity page) */
.statrow { display: grid; grid-template-columns: auto 1fr; gap: 2px 16px; }
.statrow dt { font-size: 13px; color: var(--muted); padding: 7px 0; border-bottom: 1px solid var(--border); }
.statrow dd { font-family: var(--font-mono); font-size: 14px; color: var(--ink); padding: 7px 0; border-bottom: 1px solid var(--border); text-align: right; }

/* stat tiles (metric strip) */
.stat-tiles { display: flex; flex-wrap: wrap; gap: 1px; background: var(--border); border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden; }
.stat-tiles .st { flex: 1 1 120px; background: var(--surface); padding: 14px 16px; }
.stat-tiles .st .v { font-family: var(--font-mono); font-weight: 600; font-size: 22px; color: var(--ink); }
.stat-tiles .st .k { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------------- Tabs ---------------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border-strong); flex-wrap: wrap; }
.tab { font-family: var(--font-ui); font-size: 14.5px; font-weight: 500; color: var(--muted);
  padding: 11px 16px; border: 0; background: none; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .12s, border-color .12s; min-height: 44px; }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* ---------------- Breadcrumbs ---------------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { color: var(--faint); }
.crumbs .current { color: var(--ink); font-weight: 500; }

/* ---------------- Pagination ---------------- */
.pager { display: inline-flex; align-items: center; gap: 4px; }
.pager a, .pager span { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 10px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--r-sm);
  font-size: 14px; color: var(--text); font-family: var(--font-mono); }
.pager a:hover { border-color: var(--border-ink); background: var(--surface-2); text-decoration: none; }
.pager .is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager .ellipsis { border: 0; background: none; color: var(--faint); }

/* ---------------- Alerts ---------------- */
.alert { display: flex; gap: 12px; padding: 13px 16px; border-radius: var(--r-md); border: 1px solid; font-size: 14px; line-height: 1.5; }
.alert .ico { width: 19px; height: 19px; flex: none; margin-top: 1px; }
.alert .alert-title { font-weight: 600; }
.alert-info   { background: var(--info-soft);   border-color: var(--info-line);   color: #1f3f78; }
.alert-ok     { background: var(--ok-soft);     border-color: var(--ok-line);     color: #1f5c2e; }
.alert-warn   { background: var(--warn-soft);   border-color: var(--warn-line);   color: #6f5210; }
.alert-danger { background: var(--danger-soft); border-color: var(--danger-line); color: #8a2638; }

/* callout (in articles) */
.callout { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 14px 18px; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.callout .callout-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 4px; }

/* ---------------- Tooltip ---------------- */
.tip { position: relative; display: inline-flex; cursor: help; border-bottom: 1px dotted var(--border-ink); }
.tip .tip-body { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px);
  background: var(--ink); color: var(--surface); font-size: 12.5px; line-height: 1.4; font-family: var(--font-ui);
  padding: 8px 11px; border-radius: var(--r-sm); width: max-content; max-width: 240px; opacity: 0; pointer-events: none;
  transition: opacity .14s, transform .14s; box-shadow: var(--shadow-lg); z-index: 30; }
.tip .tip-body::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--ink); }
.tip:hover .tip-body, .tip:focus-visible .tip-body { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- Accordion ---------------- */
.acc { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.acc-item + .acc-item { border-top: 1px solid var(--border); }
.acc-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; background: none; border: 0; cursor: pointer; font-family: var(--font-ui); font-size: 15px; font-weight: 600; color: var(--ink); text-align: left; min-height: 52px; }
.acc-head:hover { background: var(--surface-2); }
.acc-head .chev { width: 18px; height: 18px; color: var(--muted); transition: transform .18s; flex: none; }
.acc-item.open .acc-head .chev { transform: rotate(180deg); }
.acc-body { padding: 0 16px; max-height: 0; overflow: hidden; transition: max-height .22s ease, padding .22s ease; font-size: 14.5px; color: var(--muted); }
.acc-item.open .acc-body { padding: 0 16px 16px; max-height: 400px; }

/* ---------------- Dropdown menu ---------------- */
.menu { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); padding: 5px; min-width: 200px; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  font-family: var(--font-ui); font-size: 14px; color: var(--text); padding: 9px 11px; border: 0; background: none;
  border-radius: var(--r-sm); cursor: pointer; min-height: 40px; }
.menu a:hover, .menu button:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.menu .menu-sep { height: 1px; background: var(--border); margin: 5px 0; }
.menu svg { width: 16px; height: 16px; color: var(--muted); }

/* ---------------- Modal ---------------- */
.modal-scrim { position: fixed; inset: 0; background: rgba(28,26,21,.45); display: grid; place-items: center; padding: 20px; z-index: 80; }
.modal { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); width: 100%; max-width: 480px; overflow: hidden; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 20px; }
.modal-x { width: 36px; height: 36px; border-radius: var(--r-sm); border: 0; background: none; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.modal-x:hover { background: var(--surface-2); color: var(--ink); }
.modal-body { padding: 20px; font-size: 14.5px; color: var(--text); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); }

/* ---------------- Source / license box ---------------- */
.srcbox { border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface-2); padding: 14px 16px; font-size: 13px; }
.srcbox .srcbox-head { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }

/* related content block */
.related { display: grid; gap: 10px; }
.related a { display: flex; align-items: center; gap: 12px; padding: 11px 13px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-md); transition: border-color .12s, background .12s; }
.related a:hover { border-color: var(--accent-line); background: var(--accent-soft); text-decoration: none; }
.related .r-ic { width: 34px; height: 34px; border-radius: var(--r-sm); flex: none; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.related .r-ic svg { width: 18px; height: 18px; }
.related .r-nm { font-weight: 600; color: var(--ink); font-size: 14px; }
.related .r-mt { font-size: 12.5px; color: var(--muted); }
.related .r-go { margin-left: auto; color: var(--faint); }

/* ---------------- Empty / loading states ---------------- */
.empty { text-align: center; padding: var(--sp-12) var(--sp-6); color: var(--muted); }
.empty .empty-ico { width: 44px; height: 44px; margin: 0 auto var(--sp-4); color: var(--border-ink); }
.empty h4 { margin-bottom: 6px; }
.skeleton { background: linear-gradient(90deg, var(--surface-sunken) 25%, var(--surface-2) 50%, var(--surface-sunken) 75%);
  background-size: 200% 100%; animation: shimmer 1.3s infinite linear; border-radius: var(--r-xs); }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* ---------------- Filter panel ---------------- */
.filters { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); }
.filter-group { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.filter-group:last-child { border-bottom: 0; }
.filter-group h5 { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 11px; }
.filter-list { display: flex; flex-direction: column; gap: 10px; }
.filter-count { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--faint); }

/* utility */
.row { display: flex; align-items: center; gap: var(--sp-3); }
.col { display: flex; flex-direction: column; }
.wrap-gap { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.stack > * + * { margin-top: var(--sp-3); }
