/* Collection log page */
.uk-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin: 16px 0; }
.uk-sum { flex: 1 1 280px; display: grid; gap: 8px; }
.uk-sum b { font: 700 1.1rem var(--font-ui); color: var(--ink); font-variant-numeric: tabular-nums; }
.uk-progress { height: 8px; border-radius: 4px; background: var(--cell); border: 1px solid var(--border); overflow: hidden; }
.uk-progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.uk-top .btns { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs { margin: 0 0 16px; }
.uk-source { margin-top: 20px; max-width: 75ch; }

/* The grid: skills down the side, unlocks across. Where it fits, the head sticks under the top strip as the page scrolls;
   where it must scroll sideways, the box scrolls both ways and the head sticks inside it. */
.uk-wrap { border: 1px solid var(--border); border-radius: var(--radius); }
.uk-table { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; background: var(--panel); }
.uk-table th, .uk-table td { padding: 4px; text-align: center; border-bottom: 1px solid var(--border); }
.uk-table thead th { position: sticky; top: var(--strip-h); z-index: 2; padding: 10px 4px; min-width: 56px; background: var(--panel); border-bottom-color: var(--border2); font: 600 .72rem var(--font-ui); letter-spacing: .04em; text-transform: uppercase; color: var(--dim); }
.uk-table thead th:first-child { left: 0; z-index: 3; min-width: 210px; padding-left: 14px; text-align: left; }
@media (max-width: 1320px) {
  .uk-wrap { overflow: auto; max-height: calc(100vh - 150px); }
  .uk-table thead th { top: 0; }
}
.uk-table tbody th[scope="row"] { position: sticky; left: 0; z-index: 1; min-width: 210px; padding: 2px 6px; text-align: left; background: var(--panel); }
.uk-grp th { padding: 16px 14px 6px; text-align: left; border-bottom: 0; font: 700 .72rem var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.uk-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 8px; background: none; border: 0; border-radius: var(--radius); color: var(--ink); font: 600 .92rem var(--font-ui); text-align: left; cursor: pointer; }
.uk-row:hover { background: var(--hover); }
.uk-row em { margin-left: auto; font-style: normal; font-weight: 500; font-size: .8rem; color: var(--dim); font-variant-numeric: tabular-nums; }
.uk-none { color: var(--faint); }

/* One unlock: dim until marked, then ringed and ticked so colour is not the only cue */
.uk { position: relative; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; background: var(--cell); border: 2px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.uk:hover { border-color: var(--border2); }
.uk .ic { opacity: .45; filter: grayscale(1); }
.uk[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--cell)); }
.uk[aria-pressed="true"] .ic { opacity: 1; filter: none; }
.uk[aria-pressed="true"]::after { content: "✓"; position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font: 700 .7rem/18px var(--font-ui); text-align: center; }

/* Hover and focus details */
.uk-tip { position: fixed; z-index: 60; display: grid; gap: 3px; max-width: 280px; padding: 8px 12px; background: var(--panel); border: 1px solid var(--border2); border-radius: var(--radius); box-shadow: 0 12px 32px rgb(0 0 0 / .35); font-size: .84rem; line-height: 1.4; pointer-events: none; }
.uk-tip[hidden] { display: none; }
.uk-tip b { font: 700 .9rem var(--font-ui); color: var(--ink); }
.uk-tip span { color: var(--text); }

/* Perks: an icon with its tier under it, or just the tier where the game has no icon */
.uk-items { display: flex; flex-wrap: wrap; gap: 8px; }
.uk.uk-p { grid-auto-flow: row; width: auto; min-width: 56px; height: auto; min-height: 56px; padding: 6px 6px 4px; gap: 2px; align-content: center; }
.uk-p small { font: 600 .68rem var(--font-ui); color: var(--dim); white-space: nowrap; }
.uk-p[aria-pressed="true"] small { color: var(--ink); }

/* Perks */
#tab-perks:not([hidden]) { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 14px; align-items: start; }
.uk-perk h2 { margin: 0 0 8px; font-size: 1.05rem; }
.uk-perk h2 span { font-weight: 500; font-size: .85rem; font-variant-numeric: tabular-nums; }
.uk-fam { display: grid; gap: 6px; padding: 8px 0; border-top: 1px solid var(--border); }
.uk-fam b { font: 600 .9rem var(--font-ui); color: var(--ink); }
@media (max-width: 700px) { .uk-table thead th:first-child, .uk-table tbody th[scope="row"] { min-width: 150px; } }
