/* fonts */
@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: "Unbounded";
  src: url("../fonts/unbounded-latin.woff2") format("woff2");
  font-weight: 500 800;
  font-display: swap;
}

/* colors & sizes */
:root {
  color-scheme: dark;

  --bg: #0b0b0c;
  --surface-1: #131314;
  --surface-2: #19191b;
  --surface-3: #212124;

  --ink-1: #f3eee6;
  --ink-2: #c4beb4;
  --ink-3: #9c968c;

  --line: rgba(243, 238, 230, 0.075);
  --line-2: rgba(243, 238, 230, 0.13);
  --line-3: rgba(243, 238, 230, 0.22);

  --accent: #d4f55b;
  --accent-ink: #0b0b0c;
  --accent-soft: rgba(212, 245, 91, 0.12);
  --gold: #e8c170;
  --danger: #f06a5d;
  --cream: #ece4d6;
  --label-ink: #17150f;

  --cat-fallback: #8e8980;
  --cat-pinned: var(--accent);

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  --font-display: "Unbounded", var(--font-sans);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  --topbar-h: 60px;
  --sticky-top: var(--topbar-h);
  --toolbar-h: 66px;
  --gutter: 24px;
  --row-pad: 14px;
  --scope: var(--accent);
}

/* category colors */
:root,
.palette-standard {
  --cat-exploration: #d63b3b;  --cat-battle: #54d1b2;  --cat-quests: #e77f9a;  --cat-interest: #dabc44;  --cat-bond: #8f56dd;  --cat-develop: #b4906b;  --cat-gameplay: #c3c7cc;  --cat-city: #0f84c7;}

/* colorblind versions */
:root.vision-red-green,
.palette-red-green {
  --cat-exploration: #b5494e;
  --cat-battle: #41af20;
  --cat-quests: #e853a5;
  --cat-interest: #908126;
  --cat-bond: #a86ffa;
  --cat-develop: #e36e13;
  --cat-gameplay: #1ca9a3;
  --cat-city: #2a97f7;
}
:root.vision-blue-yellow,
.palette-blue-yellow {
  --cat-exploration: #cc243d;
  --cat-battle: #2ba996;
  --cat-quests: #e853a5;
  --cat-interest: #9a9a15;
  --cat-bond: #864ad2;
  --cat-develop: #e36e13;
  --cat-gameplay: #0b764d;
  --cat-city: #2a97f7;
}

/* base */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--sticky-top) + var(--toolbar-h) + 72px);
  scrollbar-gutter: stable;
}
html:has(dialog[open]) { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink-1);
  font: 400 15px/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 480px at 78% -8%, rgba(212, 245, 91, 0.055), transparent 62%),
    radial-gradient(760px 520px at -12% 18%, rgba(57, 135, 229, 0.05), transparent 60%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
code, kbd, pre { font-family: var(--font-mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: rgba(212, 245, 91, 0.3); color: var(--ink-1); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  left: 16px; top: 12px;
  z-index: 200;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s var(--ease), opacity 0.2s;
}
.skip-link:focus { transform: none; opacity: 1; pointer-events: auto; }

.i { flex: none; display: block; }

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 15px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: var(--surface-1);
  color: var(--ink-1);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.btn:hover { background: var(--surface-2); border-color: var(--line-3); }
.btn:active { transform: translateY(1px); }
.btn--sm { height: 34px; padding: 0 12px; border-radius: 9px; font-size: 13px; }
.btn--quiet { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn--quiet:hover { background: var(--surface-2); border-color: transparent; color: var(--ink-1); }
.btn--primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); font-weight: 600; }
.btn--primary:hover { background: #e0fa7a; border-color: transparent; }
.btn--danger { color: var(--danger); }
.btn--danger:hover { background: rgba(240, 106, 93, 0.1); border-color: rgba(240, 106, 93, 0.4); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink-1); }
.icon-btn--sm { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn--box { width: 42px; height: 42px; border: 1px solid var(--line-2); background: var(--surface-1); border-radius: 11px; }
.icon-btn--box:hover { border-color: var(--line-3); }
.icon-btn[aria-expanded="true"] { background: var(--surface-3); color: var(--ink-1); }

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-1);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--line-3);
  text-underline-offset: 3px;
}
.link-btn:hover { text-decoration-color: var(--accent); }

/* top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  background: rgba(11, 11, 12, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  max-width: 1400px;
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  border-radius: 8px;
}
.brand__mark { width: 30px; height: 30px; }
.brand__word { display: inline-flex; align-items: baseline; gap: 8px; }
.brand__nte { font: 800 17px/1 var(--font-display); letter-spacing: 0.02em; }
.brand__name { font-size: 15px; font-weight: 500; color: var(--ink-2); }

.data-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 11px;
  border-radius: 99px;
  border: 1px solid var(--line-2);
  color: var(--ink-3);
  font: 500 12px/1 var(--font-mono);
  white-space: nowrap;
}
.data-pill::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(212, 245, 91, 0.15);
}
.data-pill strong { color: var(--ink-1); font-weight: 600; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.topbar__news { position: relative; }
.news-dot {
  position: absolute;
  top: 9px;
  left: 28px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--bg);
}

/* layout */
.shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px var(--gutter) 64px;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.main { min-width: 0; }

/* sidebar */
.sidebar {
  position: sticky;
  top: calc(var(--topbar-h) + 24px);
  max-height: calc(100vh - var(--topbar-h) - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
  padding: 2px;
}
.sidebar__label,
.pop__label {
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.sidebar__label { padding: 4px 12px 12px; }
.cat-nav { display: grid; gap: 2px; }
.cat-nav__divider { height: 1px; margin: 8px 12px; background: var(--line); }

.cat {
  --c: var(--cat, var(--accent));
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 12px 9px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  color: var(--ink-2);
  transition: background 0.15s, color 0.15s;
}
.cat:hover { background: var(--surface-1); color: var(--ink-1); }
.cat[aria-current="true"] { background: var(--surface-2); color: var(--ink-1); box-shadow: inset 0 0 0 1px var(--line); }
.cat[aria-current="true"]::before {
  content: "";
  position: absolute;
  left: -2px; top: 12px; bottom: 12px;
  width: 3px;
  border-radius: 3px;
  background: var(--c);
}
.cat__icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #0f0f10;
  box-shadow: 0 0 0 1.5px color-mix(in oklab, var(--c) 70%, transparent);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.cat__icon img { width: 100%; height: 100%; object-fit: cover; }
.cat__icon .brand__mark { width: 24px; height: 24px; }
.icon-pin { display: grid; place-items: center; color: var(--accent); }
.icon-pin .pin__head { fill: currentColor; }
.icon-letter {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font: 700 14px/1 var(--font-display);
  color: var(--ink-1);
  background: color-mix(in oklab, var(--c, var(--cat-fallback)) 30%, #0f0f10);
}
.cat__body { display: grid; gap: 7px; min-width: 0; }
.cat__row { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.cat__num { font: 500 11px/1 var(--font-mono); color: var(--ink-3); letter-spacing: 0.04em; }
.cat__name { font-size: 14.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat__count {
  margin-left: auto;
  font: 500 12px/1 var(--font-mono);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cat__count b { color: var(--ink-1); font-weight: 600; }
.cat[data-complete="true"] .cat__count b { color: var(--accent); }

/* progress bars */
.meter {
  position: relative;
  display: block;
  height: 4px;
  border-radius: 99px;
  background: color-mix(in oklab, var(--c, var(--accent)) 17%, transparent);
  overflow: hidden;
}
.meter__fill {
  --p: 0;
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--p) * 100%);
  border-radius: inherit;
  background: var(--c, var(--accent));
  transition: width 0.7s var(--ease);
}
.meter--lg { height: 6px; }

/* hero */
.deck {
  --scope: var(--accent);
  position: relative;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 236px;
  align-items: center;
  gap: 30px;
  padding: 22px 26px 22px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(420px 260px at 14% 52%, color-mix(in oklab, var(--scope) 13%, transparent), transparent 70%),
    linear-gradient(180deg, var(--surface-1), color-mix(in oklab, var(--surface-1) 55%, var(--bg)));
  overflow: hidden;
  transition: background 0.4s;
}
.deck::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 23px, rgba(243, 238, 230, 0.018) 23px 24px);
  mask-image: linear-gradient(90deg, transparent 30%, #000 70%);
}
.deck > * { position: relative; z-index: 1; }
.deck .deck__toggle { position: absolute; top: 12px; right: 12px; z-index: 2; color: var(--ink-3); }
.deck__toggle .i { transition: transform 0.2s var(--ease); }
.deck.is-collapsed .deck__toggle .i { transform: rotate(180deg); }
.deck__mini { display: none; }
.deck.is-collapsed {
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 20px;
  padding: 12px 56px 12px 18px;
}
.deck.is-collapsed :is(.deck__versions, .deck__pulls, .deck__eyebrow, .stat) { display: none; }
.deck.is-collapsed .deck__info { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 28px; }
.deck.is-collapsed .deck__title { margin: 0; font-size: 21px; }
.deck.is-collapsed .deck__stats { margin: 0; }
.deck.is-collapsed .deck__mini {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  font-size: 13.5px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.deck.is-collapsed .deck__toggle { top: 50%; translate: 0 -50%; }
.mini__pct { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink-1); white-space: nowrap; }
.mini__pct small { font-size: 14px; color: var(--ink-2); }
.mini__meter { --c: var(--scope); width: 96px; }
.mini__item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.mini__item b { color: var(--ink-1); font-weight: 600; }
.mini__item img { width: 18px; height: 18px; }
.deck__tape { width: 100%; }
.deck__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 500 11.5px/1.2 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.deck__eyebrow .side {
  padding: 3px 6px;
  border-radius: 5px;
  background: color-mix(in oklab, var(--scope) 18%, transparent);
  color: var(--ink-1);
  letter-spacing: 0.08em;
}
.deck__title {
  margin: 8px 0 0;
  font: 700 34px/1.08 var(--font-display);
  letter-spacing: -0.025em;
  overflow-wrap: break-word;
}
.deck__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 18px 40px;
  margin-top: 18px;
}
.stat { display: grid; gap: 6px; min-width: 0; }
.stat__label { font-size: 13px; color: var(--ink-3); }
.stat__value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 600;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.stat__value small { font-size: 14px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.stat__value img { width: 24px; height: 24px; align-self: center; }
.stat--hero .stat__value { gap: 2px; font-size: 52px; letter-spacing: -0.04em; }
.stat--hero .stat__value small { font-size: 22px; font-weight: 600; color: var(--ink-2); letter-spacing: -0.02em; }
.stat__value,
.stat__detail,
.chip__n { font-variant-numeric: tabular-nums; }
.num-decimals { font-size: 0.5em; font-weight: 600; letter-spacing: -0.01em; }
.stat__detail { font-size: 13.5px; color: var(--ink-2); }
.stat__detail b { color: var(--ink-1); font-weight: 600; }
.stat--hero,
.stat--annulith { min-width: 190px; }
.stat .meter { --c: var(--scope); margin-top: 6px; }

.deck__pulls {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  margin-top: -8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  container-type: inline-size;
}
.pulls__label { display: grid; gap: 5px; }
.pulls__rate { font: 500 11px/1 var(--font-mono); letter-spacing: 0.04em; color: var(--ink-3); }
.pulls__figs { display: flex; align-items: baseline; gap: 22px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.pulls__fig b {
  margin-right: 6px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink-1);
  font-variant-numeric: tabular-nums;
}
.meter--pulls {
  --c: var(--scope);
  flex: 1 1 240px;
  border-radius: 1px;
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 calc(100% / var(--n) - 3px), transparent 0 calc(100% / var(--n)));
  mask: repeating-linear-gradient(90deg, #000 0 calc(100% / var(--n) - 3px), transparent 0 calc(100% / var(--n)));
}
.pulls__note { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.pulls__note b { color: var(--ink-1); font-weight: 600; font-variant-numeric: tabular-nums; }
.pulls__note img { width: 18px; height: 18px; }
@container (max-width: 849px) {
  .meter--pulls { order: 1; flex-basis: 100%; }
  .pulls__note { margin-left: auto; }
}
@container (max-width: 600px) {
  .pulls__label { display: flex; align-items: baseline; gap: 10px; flex-basis: 100%; }
  .pulls__note { order: 2; margin-left: 0; }
}

.versions { display: grid; gap: 12px; }
.versions__title { font-size: 13px; color: var(--ink-3); }
.ver-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}
.ver-row__v { font: 600 12.5px/1 var(--font-mono); color: var(--ink-1); }
.ver-row .meter { --c: var(--scope); }
.ver-row__n { font: 500 12.5px/1 var(--font-mono); color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 52px; text-align: right; }
.ver-row__n b { color: var(--ink-1); font-weight: 500; }

/* cassette */
.tape-stage { position: relative; width: 100%; aspect-ratio: 960 / 579; }
.tape-card {
  position: absolute;
  inset: 0;
  transform: rotate(-2deg);
  filter: drop-shadow(0 12px 14px rgba(0, 0, 0, 0.55));
  animation: tape-in 0.5s var(--ease) both;
}
.tape-card__art,
.tape-card__reels { position: absolute; inset: 0; width: 100%; height: 100%; }
img.tape-card__art { object-fit: contain; }
.tape-stage--stack .tape-card { scale: 0.84; }
.tape-card--under {
  transform: translate(var(--tx), var(--ty)) rotate(var(--rot));
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.55)) brightness(0.72) saturate(0.9);
  animation: tape-fan 0.6s var(--ease) both;
  animation-delay: calc(var(--i) * 35ms);
}
.reel-well { fill: #0e0e10; }
.reel-pack { transform-box: fill-box; transform-origin: center; transition: transform 1s var(--ease); }
.reel-pack--left { fill: #4a3628; }
.reel-pack--right { fill: var(--scope); transition: transform 1s var(--ease), fill 0.4s; }
.reel-ring { fill: none; stroke: rgba(0, 0, 0, 0.28); stroke-width: 2.5; }
.reel-hub { transform-box: fill-box; transform-origin: center; }
.reel-hub__disc,
.reel-tooth { fill: #efe9df; }
.reel-hub__hole { fill: #0e0e10; }
.tape-card.is-playing .reel-hub { animation: reel 0.9s linear infinite; }
.tape-blank path { fill: #26262a; stroke: rgba(243, 238, 230, 0.16); stroke-width: 3; }
.tape-blank__stripe { fill: var(--scope); }
@keyframes tape-in { from { opacity: 0; transform: translateY(8%) rotate(-7deg); } }
@keyframes tape-fan { from { opacity: 0; transform: none; } }
@keyframes reel { to { transform: rotate(360deg); } }

.tip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 10px 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(212, 245, 91, 0.2);
  background: rgba(212, 245, 91, 0.05);
  color: var(--ink-2);
  font-size: 13.5px;
}
.tip > .i { color: var(--accent); }
.tip p { flex: 1; }
.tip[hidden] { display: none; }

.catbar { display: none; }

/* toolbar */
.toolbar-sentinel { height: 1px; margin-top: 10px; }
.toolbar {
  position: sticky;
  top: var(--sticky-top);
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 11px 0 12px;
  background: var(--bg);
  transition: box-shadow 0.2s;
}
.toolbar::after {
  content: "";
  position: absolute;
  left: calc(var(--gutter) * -1);
  right: calc(var(--gutter) * -1);
  bottom: 0;
  height: 1px;
  background: var(--line);
  opacity: 0;
  transition: opacity 0.2s;
}
.toolbar.is-stuck::after { opacity: 1; }
.toolbar.is-stuck { box-shadow: 0 16px 24px -20px rgba(0, 0, 0, 0.9); }
.toolbar__end { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.search { position: relative; flex: 1 1 220px; min-width: 180px; }
.search input {
  width: 100%;
  height: 42px;
  padding: 0 44px 0 40px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: var(--surface-1);
  color: var(--ink-1);
  font-size: 14.5px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.search input::placeholder { color: var(--ink-3); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search input:hover { border-color: var(--line-3); }
.search input:focus {
  outline: none;
  background: var(--surface-2);
  border-color: rgba(212, 245, 91, 0.55);
  box-shadow: 0 0 0 4px rgba(212, 245, 91, 0.12);
}
.search__icon { position: absolute; left: 13px; top: 50%; translate: 0 -50%; color: var(--ink-3); pointer-events: none; }
.search__kbd { position: absolute; right: 11px; top: 50%; translate: 0 -50%; pointer-events: none; }
.search__clear { position: absolute; right: 6px; top: 50%; translate: 0 -50%; }
.search input:focus ~ .search__kbd,
.search.has-value .search__kbd { display: none; }
.search__clear[hidden] { display: none; }

.seg {
  display: inline-flex;
  align-items: stretch;
  gap: 2px;
  height: 42px;
  padding: 3px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: var(--surface-1);
}
.seg button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.seg button:hover { color: var(--ink-1); }
.seg button[aria-pressed="true"] {
  background: var(--surface-3);
  color: var(--ink-1);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 1px 2px rgba(0, 0, 0, 0.4);
}
.seg__n { font: 500 12px/1 var(--font-mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.seg button[aria-pressed="true"] .seg__n { color: var(--ink-2); }
.seg--sm { height: 36px; }
.seg--sm button { font-size: 13px; padding: 0 10px; }
.seg--full { display: flex; width: 100%; }
.seg--full button { flex: 1; }

.count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 11.5px/1 var(--font-mono);
}
.count-badge[hidden] { display: none; }
#filters-btn[aria-expanded="true"] { background: var(--surface-3); border-color: var(--line-3); }

.select { position: relative; display: inline-flex; }
.select select {
  height: 42px;
  padding: 0 38px 0 14px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: var(--surface-1);
  color: var(--ink-1);
  font-size: 14px;
  font-weight: 500;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s, background 0.15s;
}
.select select:hover { border-color: var(--line-3); background: var(--surface-2); }
.select select option { background: var(--surface-2); color: var(--ink-1); }
.select .i { position: absolute; right: 13px; top: 50%; translate: 0 -50%; color: var(--ink-3); pointer-events: none; }
.select .select__sort { display: none; }

/* popovers */
.pop-wrap { position: relative; }
.pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: min(372px, calc(100vw - 32px));
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  box-shadow: 0 28px 60px -16px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(0, 0, 0, 0.4);
  animation: pop-in 0.16s var(--ease);
  transform-origin: top right;
}
.pop[hidden] { display: none; }
.pop__section + .pop__section { margin-top: 18px; }
.pop__label { margin-bottom: 10px; }
.pop__foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.pop--menu { width: 250px; padding: 6px; }
.pop--menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink-1);
  font-size: 13.5px;
  text-align: left;
}
.pop--menu button:hover,
.pop--menu button:focus-visible { background: var(--surface-3); outline: none; }
.pop--menu button:disabled { color: var(--ink-3); cursor: default; background: none; }
.pop--menu hr { margin: 6px 4px; border: 0; border-top: 1px solid var(--line); }
.menu__n { font: 500 12px/1 var(--font-mono); color: var(--ink-3); }
.menu__check { color: var(--accent); opacity: 0; }
[aria-checked="true"] > .menu__check { opacity: 1; }
.pop__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
}
.pop__toggle-text { display: grid; gap: 2px; }
.pop__toggle-text small { font-size: 12.5px; font-weight: 400; color: var(--ink-3); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border-radius: 99px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.chip:hover { border-color: var(--line-3); color: var(--ink-1); }
.chip[aria-pressed="true"] {
  border-color: rgba(212, 245, 91, 0.55);
  background: var(--accent-soft);
  color: var(--ink-1);
}
.chip img { width: 18px; height: 18px; }
.chip[aria-pressed="true"]::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  margin-left: -3px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 9.5 17 19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 9.5 17 19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.chip__n { font: 500 11.5px/1 var(--font-mono); color: var(--ink-3); }
.chip .tag { margin-left: 2px; }

.summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 0;
  margin: 2px 0 14px;
  color: var(--ink-3);
  font-size: 13px;
}
.summary:empty { margin: 0 0 6px; }
.summary__count { color: var(--ink-2); margin-right: 4px; }
.summary__count b { color: var(--ink-1); font-weight: 600; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 6px 0 11px;
  border-radius: 99px;
  border: 1px solid var(--line-2);
  background: var(--surface-1);
  color: var(--ink-1);
  font-size: 12.5px;
}
.pill button {
  display: grid;
  place-items: center;
  width: 20px; height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-3);
}
.pill button:hover { background: var(--surface-3); color: var(--ink-1); }
.summary .link-btn { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }

.list { outline: none; }
/* categories */
.group {
  --c: var(--cat, var(--cat-fallback));
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  overflow: clip;
}
.group + .group { margin-top: 18px; }
.group__head {
  position: sticky;
  top: calc(var(--sticky-top) + var(--toolbar-h));
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 10px 13px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(19, 19, 20, 0.9);
  box-shadow: inset 0 2px 0 var(--c);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
}
.group.is-collapsed .group__head { border-bottom-color: transparent; }
.group__icon {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #0f0f10;
  box-shadow: 0 0 0 1.5px var(--c);
  overflow: hidden;
}
.group__icon img { width: 100%; height: 100%; object-fit: cover; }
.group__tape {
  flex: none;
  width: 72px;
  aspect-ratio: 960 / 579;
  transform: rotate(-3deg);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.55));
}
.group__tape img { width: 100%; height: 100%; object-fit: contain; }
.group__titles { min-width: 0; }
.group__name { font: 650 16px/1.2 var(--font-display); letter-spacing: -0.01em; }
.group__sub {
  margin-top: 3px;
  font: 400 12px/1.3 var(--font-mono);
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.group__progress { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.group__count { font: 500 12.5px/1 var(--font-mono); color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.group__count b { color: var(--ink-1); font-weight: 600; }
.group__progress .meter { --c: var(--cat, var(--cat-fallback)); width: 112px; }
.group__collapse .i { transition: transform 0.2s var(--ease); }
.group.is-collapsed .group__collapse .i { transform: rotate(-90deg); }
.group.is-collapsed .group__list { display: none; }
.group__list { list-style: none; margin: 0; padding: 0; }
.group__more {
  display: block;
  width: 100%;
  padding: 12px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
}

/* achievement rows */
.ach {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "main meta" "details details";
  align-items: center;
  column-gap: 14px;
  border-top: 1px solid var(--line);
  transition: background 0.15s;
}
.ach:first-child { border-top: 0; }
.ach:hover { background: rgba(243, 238, 230, 0.022); }
.ach[data-done="true"] { background: rgba(212, 245, 91, 0.018); }
.ach[data-done="true"]:hover { background: rgba(212, 245, 91, 0.035); }

.ach__main {
  grid-area: main;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  padding: var(--row-pad) 0 var(--row-pad) 16px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.ach__check {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  margin: 0;
  pointer-events: none;
}
.checkbox {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  margin-top: 0;
  border-radius: 7px;
  border: 1.5px solid var(--line-3);
  background: rgba(0, 0, 0, 0.2);
  color: transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ach__main:hover .checkbox { border-color: var(--ink-3); }
.ach__check:focus-visible + .checkbox { outline: 2px solid var(--accent); outline-offset: 3px; }
.ach__check:checked + .checkbox {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}
.ach.just-checked .checkbox { animation: check-pop 0.32s var(--ease); }
@keyframes check-pop { 0% { transform: scale(0.8); } 55% { transform: scale(1.12); } 100% { transform: scale(1); } }

.ach__text { display: grid; gap: 3px; min-width: 0; }
.ach__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink-1);
  overflow-wrap: anywhere;
}
.ach__desc { font-size: 14px; line-height: 1.45; color: var(--ink-2); overflow-wrap: anywhere; }
.ach[data-done="true"] .ach__title { color: var(--ink-2); }
.ach[data-done="true"] .ach__desc { color: var(--ink-3); }
.ach mark { background: rgba(212, 245, 91, 0.2); color: var(--ink-1); border-radius: 3px; padding: 0 1px; box-shadow: 0 0 0 1px rgba(212, 245, 91, 0.25); }

.ach__meta {
  grid-area: meta;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: var(--row-pad) 8px var(--row-pad) 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 6px;
  border-radius: 5px;
  font: 600 10px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag--new { color: var(--accent); background: rgba(212, 245, 91, 0.1); box-shadow: inset 0 0 0 1px rgba(212, 245, 91, 0.3); }
.tag--hidden { color: var(--ink-2); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.tag--hidden .i { width: 12px; height: 12px; }

.reward {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 62px;
  height: 30px;
  padding: 0 11px 0 5px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-1);
  font: 600 13px/1 var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.reward img { width: 20px; height: 20px; }
.reward[data-tier="2"] { border-color: var(--line-2); }
.reward[data-tier="3"] {
  border-color: rgba(232, 193, 112, 0.42);
  background: linear-gradient(180deg, rgba(232, 193, 112, 0.13), rgba(232, 193, 112, 0.05));
}
.bonus {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 200px;
  height: 30px;
  padding: 0 11px 0 5px;
  border-radius: 99px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--ink-1);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}
.bonus img { height: 22px; width: auto; max-width: 44px; object-fit: contain; }
.bonus span { overflow: hidden; text-overflow: ellipsis; }
.ver {
  min-width: 30px;
  font: 500 12.5px/1 var(--font-mono);
  color: var(--ink-2);
  text-align: right;
}
.ach__more { width: 32px; height: 32px; border-radius: 8px; color: var(--ink-3); }
.ach__pin { width: 30px; height: 30px; border-radius: 8px; color: var(--ink-3); transition: opacity 0.15s, color 0.15s, background 0.15s; }
.ach__pin[aria-pressed="true"] { color: var(--accent); }
.ach__pin[aria-pressed="true"] .pin__head { fill: currentColor; }
@media (hover: hover) {
  .ach__pin[aria-pressed="false"] { opacity: 0; }
  .ach:hover .ach__pin,
  .ach__pin:focus-visible { opacity: 1; }
}
.ach__more .i { transition: transform 0.2s var(--ease); }
.ach__more[aria-expanded="true"] { background: var(--surface-3); color: var(--ink-1); }
.ach__more[aria-expanded="true"] .i { transform: rotate(180deg); }

img.is-broken { visibility: hidden; }

.ach.is-shielded .ach__title-text,
.ach.is-shielded .ach__desc { filter: blur(6px); opacity: 0.7; transition: filter 0.2s; }
.ach.is-shielded .ach__desc::after { content: ""; }
.peek {
  display: none;
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-3);
}
.ach.is-shielded .peek { display: inline-block; }

/* details */
.ach__details {
  grid-area: details;
  margin: 0 12px 14px 52px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  animation: fade-down 0.18s var(--ease);
}
@keyframes fade-down { from { opacity: 0; transform: translateY(-4px); } }
.details-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px 28px; }
.details__label {
  margin-bottom: 10px;
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 13px; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; color: var(--ink-1); }
.facts dd span { color: var(--ink-3); }
.reward-list { display: grid; gap: 8px; }
.reward-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 8px 8px;
  border-radius: 10px;
  background: var(--surface-1);
  border: 1px solid var(--line);
  font-size: 13.5px;
}
.reward-item__icon { display: grid; place-items: center; width: 48px; height: 32px; }
.reward-item__icon img { max-width: 48px; max-height: 32px; object-fit: contain; }
.reward-item__name { font-weight: 500; }
.reward-item__kind { font-size: 12px; color: var(--ink-3); }
.reward-item__amount { margin-left: auto; font: 600 13px/1 var(--font-mono); color: var(--ink-2); }

.series { margin-top: 20px; }
.series__track { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.series__step {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 11px 0 8px;
  border-radius: 99px;
  border: 1px solid var(--line-2);
  background: var(--surface-1);
  color: var(--ink-2);
  font: 600 12px/1 var(--font-mono);
}
.series__step:hover { border-color: var(--line-3); color: var(--ink-1); }
.series__dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--line-3);
  display: grid;
  place-items: center;
  color: var(--accent-ink);
}
.series__step[data-done="true"] { color: var(--ink-1); }
.series__step[data-done="true"] .series__dot { background: var(--accent); border-color: var(--accent); }
.series__step[aria-current="true"] { border-color: rgba(212, 245, 91, 0.5); box-shadow: 0 0 0 3px rgba(212, 245, 91, 0.08); }
.series__line { width: 10px; height: 1.5px; background: var(--line-2); }
.details__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.details__actions .btn { text-decoration: none; }

.ach.is-flash { animation: flash 1.8s var(--ease); }
@keyframes flash { 0%, 30% { background: rgba(212, 245, 91, 0.14); } 100% { background: transparent; } }

/* empty / error */
.empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 64px 24px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--ink-2);
}
.empty__art { width: 176px; height: auto; margin-bottom: 10px; transform: rotate(-3deg); filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.55)); }
.empty h2 { font: 650 18px/1.3 var(--font-display); color: var(--ink-1); }
.empty p { max-width: 42ch; font-size: 14px; }
.empty .btn { margin-top: 8px; }

/* toasts */
.toasts {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 120;
  display: grid;
  gap: 8px;
  width: min(460px, calc(100vw - 24px));
  translate: -50% 0;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: rgba(33, 33, 36, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.8);
  color: var(--ink-1);
  font-size: 13.5px;
  pointer-events: auto;
  animation: toast-in 0.24s var(--ease);
}
.toast.is-leaving { animation: toast-out 0.2s var(--ease) forwards; }
.toast__icon { color: var(--accent); }
.toast__msg { flex: 1; min-width: 0; }
.toast__msg span { color: var(--ink-2); }
.toast .btn { height: 32px; padding: 0 12px; font-size: 13px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px) scale(0.98); } }

/* dialogs */
.modal {
  width: min(560px, calc(100vw - 24px));
  max-height: min(88vh, 820px);
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 20px;
  background: var(--surface-1);
  color: var(--ink-1);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.9);
  overscroll-behavior: contain;
}
.modal[open] { animation: modal-in 0.2s var(--ease); }
.modal::backdrop { background: rgba(5, 5, 6, 0.66); backdrop-filter: blur(4px); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(0.985); } }
.modal__head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 18px 16px 24px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--line);
}
.modal__head h2 { font: 700 19px/1.25 var(--font-display); letter-spacing: -0.015em; }
.modal__head h2:focus { outline: none; }
.modal__sub { margin-top: 6px; font-size: 13.5px; color: var(--ink-2); }
.modal__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 18px 24px 24px; }

.panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg);
}
.panel h3 { font-size: 14.5px; font-weight: 600; }
.panel p { font-size: 13px; color: var(--ink-2); }
.panel code { font-size: 12px; color: var(--ink-1); }
.panel__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.panel__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.panel__row .panel__actions { flex: none; flex-wrap: nowrap; }
.panel__actions--end { justify-content: flex-end; }
.code-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  padding: 6px 6px 6px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--surface-1);
}
.code-box code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  color: var(--ink-2);
}
.field { display: grid; gap: 6px; margin-top: 6px; }
.field__label { font-size: 12.5px; color: var(--ink-3); }
.field textarea {
  width: 100%;
  resize: vertical;
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--surface-1);
  color: var(--ink-1);
  font: 12.5px/1.5 var(--font-mono);
}
.field textarea:focus { outline: none; border-color: rgba(212, 245, 91, 0.55); box-shadow: 0 0 0 4px rgba(212, 245, 91, 0.12); }

.import-review {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(212, 245, 91, 0.35);
  background: rgba(212, 245, 91, 0.05);
  font-size: 13.5px;
}
.import-review[hidden] { display: none; }
.import-review p span { color: var(--ink-2); }
.import-review.is-error { border-color: rgba(240, 106, 93, 0.4); background: rgba(240, 106, 93, 0.06); }

.setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
}
.setting:hover { border-color: var(--line-2); }
.setting--action { cursor: default; }
.setting--action:hover { border-color: var(--line); }
.setting--danger,
.setting--danger:hover { border-color: rgba(240, 106, 93, 0.22); }
.setting__text { display: grid; gap: 3px; }
.setting__title { font-size: 14.5px; font-weight: 600; }
.setting__desc { font-size: 13px; color: var(--ink-2); }
.switch {
  flex: none;
  position: relative;
  width: 42px;
  height: 24px;
  margin: 0;
  border-radius: 99px;
  background: var(--surface-3);
  box-shadow: inset 0 0 0 1px var(--line-2);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: background 0.2s;
}
.switch::after {
  content: "";
  position: absolute;
  left: 3px; top: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--ink-2);
  transition: transform 0.2s var(--ease), background 0.2s;
}
.switch:checked { background: var(--accent); box-shadow: none; }
.switch:checked::after { transform: translateX(18px); background: var(--accent-ink); }
.setting--choice { display: block; cursor: default; }
.setting--choice:hover { border-color: var(--line); }
.choices { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.choices legend { float: left; width: 100%; padding: 0; }
.choices .setting__desc { display: block; margin: 3px 0 6px; }
.choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-1);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.choice:hover { border-color: var(--line-3); }
.choice:has(input:checked) { border-color: rgba(212, 245, 91, 0.55); background: rgba(212, 245, 91, 0.05); }
.choice input {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: 0;
  border-radius: 50%;
  border: 1.5px solid var(--line-3);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.choice input::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-ink);
  transform: scale(0);
  transition: transform 0.15s var(--ease);
}
.choice input:checked { border-color: var(--accent); background: var(--accent); }
.choice input:checked::after { transform: scale(1); }
.choice__text { display: grid; gap: 2px; }
.choice__name { font-size: 14px; font-weight: 600; }
.choice__desc { font-size: 12.5px; color: var(--ink-2); }
.swatches { display: flex; gap: 3px; }
.swatches i { width: 9px; height: 20px; border-radius: 3px; }
.shortcuts { padding: 6px 4px 0; font-size: 13px; color: var(--ink-2); }
.shortcuts p:last-child { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); margin: 0 6px; }
.about { padding: 4px; font-size: 12.5px; color: var(--ink-3); }

.log-list { gap: 0; padding-top: 22px; }
.log { position: relative; display: grid; gap: 8px; padding: 0 0 26px 26px; }
.log:last-child { padding-bottom: 4px; }
.log::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 16px;
  bottom: -2px;
  width: 1px;
  background: var(--line-2);
}
.log:last-child::before { display: none; }
.log::after {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--surface-3);
  box-shadow: inset 0 0 0 1px var(--line-3);
}
.log.is-unread::after { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.log__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: 500 12px/1 var(--font-mono); color: var(--ink-3); }
.log__tag {
  padding: 4px 6px;
  border-radius: 5px;
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.log__tag--data { background: var(--accent-soft); color: var(--accent); }
.log__title { font-size: 15px; font-weight: 600; }
.log__counts { font-size: 13.5px; color: var(--ink-2); }
.log__counts b { color: var(--ink-1); font-weight: 600; }
.log__items { display: grid; gap: 6px; margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-2); }
.log__items li::marker { color: var(--ink-3); }
.log .btn { justify-self: start; margin-top: 4px; }
.log-empty { padding: 4px 0 8px; font-size: 14px; color: var(--ink-2); }

/* footer */
.footer { border-top: 1px solid var(--line); }
.footer__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px var(--gutter) 44px;
  display: grid;
  gap: 8px;
  color: var(--ink-3);
  font-size: 13px;
}
.footer__inner p { max-width: 80ch; }
.footer__brand { font: 700 13px var(--font-display); color: var(--ink-2); letter-spacing: 0.02em; }
.footer__meta { font-family: var(--font-mono); font-size: 12px; }
.footer a { color: var(--ink-2); text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.footer a:hover { color: var(--ink-1); }
.footer .link-btn { color: var(--ink-2); font-weight: 500; }
.footer .link-btn:hover { color: var(--ink-1); }

/* loading screen */
.boot {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 22px;
  padding: 24px;
  text-align: center;
  transition: opacity 0.3s var(--ease), visibility 0s 0.3s;
}
html:not(.is-booting) .boot { opacity: 0; visibility: hidden; pointer-events: none; }
.is-booting :is(.topbar, .shell, .footer, .skip-link) { opacity: 0; visibility: hidden; }
.is-booting .shell * { animation-play-state: paused; }
.is-fading-in :is(.topbar, .shell, .footer) { animation: page-in 0.35s var(--ease); }
@keyframes page-in { from { opacity: 0; } }

.boot__loader { display: grid; justify-items: center; gap: 18px; animation: boot-in 0.3s var(--ease) 0.5s both; }
.boot.is-retry .boot__loader { animation-delay: 0s; }
.boot__tape { width: 112px; height: auto; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.5)); }
.boot__shell { fill: #1d1d20; stroke: var(--line-2); stroke-width: 1.5; }
.boot__card { fill: var(--cream); }
.boot__stripe { fill: var(--accent); }
.boot__window,
.boot__hole { fill: #0e0e10; }
.boot__pack--left { fill: #4a3628; }
.boot__pack--right { fill: var(--accent); }
.boot__hub { fill: #efe9df; transform-box: fill-box; transform-origin: center; animation: reel 1.1s linear infinite; }
.boot__base { fill: #141416; stroke: var(--line-2); stroke-width: 1.5; }
.boot__text { font: 500 11px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.boot__slow { max-width: 38ch; font-size: 13.5px; color: var(--ink-2); animation: boot-in 0.5s var(--ease) 10s both; }
.boot__slow a { color: var(--ink-1); font-weight: 600; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.boot__noscript { color: var(--ink-2); }
.boot.is-retry .boot__slow,
.boot.is-error .boot__loader,
.boot.is-error .boot__slow { display: none; }
.boot__error { display: grid; justify-items: center; gap: 10px; max-width: 420px; color: var(--ink-2); animation: boot-in 0.4s var(--ease) both; }
.boot__error h1 { font: 650 20px/1.3 var(--font-display); color: var(--ink-1); }
.boot__error p { font-size: 14px; }
.boot__error .btn { margin-top: 10px; }
.boot__detail { font: 12px/1.5 var(--font-mono); color: var(--ink-3); overflow-wrap: anywhere; }
@keyframes boot-in { from { opacity: 0; transform: translateY(6px); } }

.is-compact { --row-pad: 9px; }
.is-compact .ach__desc { font-size: 13px; }
.is-compact .checkbox { width: 20px; height: 20px; border-radius: 6px; }
.is-compact .reward,
.is-compact .bonus { height: 26px; }

/* responsive */
@media (max-width: 1280px) {
  .deck { grid-template-columns: 220px minmax(0, 1fr); }
  .deck__versions { grid-column: 1 / -1; }
  .versions { grid-template-columns: repeat(auto-fill, minmax(170px, 230px)); gap: 12px 28px; }
  .versions__title { grid-column: 1 / -1; margin-bottom: -2px; }
}

@media (max-width: 1180px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding-top: 18px; }
  .sidebar { display: none; }
  .catbar {
    display: flex;
    gap: 8px;
    margin: 14px calc(var(--gutter) * -1) 0;
    padding: 2px var(--gutter) 4px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    scroll-padding-inline: var(--gutter);
  }
  .catbar::-webkit-scrollbar { display: none; }
  .catbar .chip {
    --c: var(--cat, var(--accent));
    flex: none;
    height: 40px;
    padding: 0 12px 0 5px;
    gap: 8px;
    scroll-snap-align: start;
    background: var(--surface-1);
  }
  .catbar .chip[aria-current="true"] {
    background: var(--surface-3);
    border-color: color-mix(in oklab, var(--c) 70%, transparent);
    color: var(--ink-1);
  }
  .catbar .chip__icon {
    width: 30px; height: 30px;
    border-radius: 50%;
    overflow: hidden;
    background: #0f0f10;
    box-shadow: 0 0 0 1.5px color-mix(in oklab, var(--c) 70%, transparent);
    display: grid;
    place-items: center;
  }
  .catbar .chip__icon img { width: 100%; height: 100%; object-fit: cover; }
  .catbar .chip__icon .brand__mark { width: 20px; height: 20px; }
}

@media (max-width: 860px) {
  .data-pill { display: none; }
  .toolbar__end { margin-left: 0; }
  .search { flex-basis: 100%; }
  .toolbar .seg { flex: 1; }
  .toolbar .seg button { flex: 1; padding: 0 8px; }
}
@media (min-width: 721px) and (max-width: 860px) {
  .ach__meta .ver { display: none; }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; --topbar-h: 56px; }
  html { scroll-padding-top: calc(var(--toolbar-h) + 24px); }
  .topbar { position: relative; }
  :root { --sticky-top: 0px; }
  .brand__name { display: none; }
  .hide-sm { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  .deck {
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 18px 16px;
    padding: 16px;
    border-radius: 18px;
  }
  .deck__info { display: contents; }
  .deck__tape { grid-row: 1; grid-column: 1; }
  .deck__heading { grid-row: 1; grid-column: 2; align-self: center; min-width: 0; }
  .deck__eyebrow { flex-wrap: wrap; row-gap: 6px; font-size: 10.5px; }
  .deck__title { font-size: 20px; letter-spacing: -0.03em; margin-top: 6px; }
  .deck__stats {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    gap: 16px;
    margin-top: 0;
  }
  .stat--hero,
  .stat--annulith { min-width: 0; }
  .stat--hero .stat__value { font-size: 42px; }
  .stat--hero .stat__value small { font-size: 19px; }
  .stat__value { font-size: 21px; gap: 6px; }
  .stat__value img { width: 20px; height: 20px; }
  .stat__detail { font-size: 12.5px; }
  .deck__versions { grid-column: 1 / -1; }
  .versions { grid-template-columns: 1fr 1fr; gap: 12px 20px; }
  .deck__eyebrow { padding-right: 30px; }
  .deck.is-collapsed { grid-template-columns: 58px minmax(0, 1fr); gap: 6px 14px; padding: 12px 48px 12px 12px; }
  .deck.is-collapsed .deck__info { display: contents; }
  .deck.is-collapsed .deck__tape { grid-row: 1 / span 2; align-self: center; }
  .deck.is-collapsed .deck__heading { align-self: end; }
  .deck.is-collapsed .deck__title { font-size: 17px; margin: 0; }
  .deck.is-collapsed .deck__stats { grid-column: 2; display: block; }
  .deck.is-collapsed .deck__mini { gap: 4px 14px; font-size: 13px; }
  .mini__pct { font-size: 18px; }
  .mini__meter { display: none; }

  .toolbar { gap: 8px; padding: 10px 0; }
  .toolbar__end { display: contents; }
  .search { order: 1; flex: 1 1 calc(100% - 100px); min-width: 0; }
  .toolbar__end > .pop-wrap:first-child { order: 2; }
  .toolbar__end > .pop-wrap:last-child { order: 3; }
  .toolbar .seg { order: 4; flex: 1 1 0; min-width: 0; }
  .toolbar .select { order: 5; }
  .search__kbd { display: none; }
  #filters-btn span:not(.count-badge) { display: none; }
  #filters-btn { position: relative; width: 42px; padding: 0; }
  #filters-btn .count-badge { position: absolute; top: -6px; right: -6px; }
  .select select { width: 42px; padding: 0; color: transparent; }
  .select select option { color: var(--ink-1); }
  .select .i { right: 50%; translate: 50% -50%; color: var(--ink-2); }
  .select .select__chevron { display: none; }
  .select .select__sort { display: block; }
  .pop {
    position: fixed;
    left: 12px; right: 12px;
    top: auto;
    bottom: max(12px, env(safe-area-inset-bottom));
    width: auto;
    transform-origin: bottom center;
  }
  .pop--menu { left: auto; width: min(270px, calc(100vw - 24px)); }

  .group { border-radius: 14px; }
  .group__head { position: relative; top: auto; padding: 12px 8px 12px 12px; gap: 12px; }
  .group__icon { width: 34px; height: 34px; }
  .group__tape { width: 58px; }
  .group__name { font-size: 15px; }
  .group__progress .meter { display: none; }

  .ach { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main more" "meta meta" "details details"; }
  .ach__main { padding: 13px 0 6px 12px; gap: 12px; }
  .ach__meta { display: contents; }
  .ach__meta > :not(.ach__more) { grid-area: meta; }
  .ach__more { grid-area: more; align-self: start; margin: 8px 6px 0 0; }
  .ach__chips {
    grid-area: meta;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    padding: 0 12px 13px 46px;
  }
  .ach__pin { margin-left: auto; margin-right: -6px; }
  .ach__details { margin: 0 10px 12px; padding: 14px; }
  .details-grid { grid-template-columns: minmax(0, 1fr); }
  .panel__row { flex-direction: column; align-items: stretch; }
  .choice { grid-template-columns: auto minmax(0, 1fr); }
  .choice .swatches { grid-column: 2; }
  .modal__body { padding: 16px; }
  .modal__head { padding: 18px 14px 14px 18px; }
}

@media (min-width: 721px) {
  .ach__chips { display: contents; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .tape-card.is-playing .reel-hub { animation: none; }
}

@media (forced-colors: active) {
  .checkbox { border-color: CanvasText; }
  .ach__check:checked + .checkbox { background: Highlight; color: HighlightText; border-color: Highlight; }
  .meter { border: 1px solid CanvasText; }
  .meter__fill { background: Highlight; }
}
