/* ============ Tokens ============ */
:root {
  --bg: #0c0a0d;
  --bg-2: #131015;
  --card: #19151b;
  --card-2: #221c25;
  --line: #2d2530;
  --line-2: #3b3040;
  --text: #f3eaef;
  --muted: #a6959f;
  --dim: #6f6170;

  --pink: #ff7aa8;
  --pink-deep: #5a1630;
  --red: #e5383b;
  --red-deep: #7d1519;

  --ok: #3ddc97;
  --warn: #f7b32b;
  --bad: #ff4d5e;

  /* shop section colours */
  --c-book1: #ff7aa8;
  --c-book2: #4cc9f0;
  --c-extra: #f7b32b;
  --c-community: #b388ff;
  --c-user: #3ddc97;
  --c-removed: #8a8f98;

  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --font: "Rubik", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --display: "Creepster", "Rubik", cursive;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; } /* dark native scrollbars and form controls */
/* Firefox has no ::-webkit-scrollbar, so colour its scrollbars here */
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-color: #4a3c4f var(--bg-2); }
  .track, .seasonpick { scrollbar-color: var(--pink) var(--bg-2); }
}

/* themed scrollbars (Chrome/Edge/Safari) */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg-2); border-radius: 99px; }
::-webkit-scrollbar-thumb { background: #4a3c4f; border-radius: 99px; border: 3px solid var(--bg-2); }
::-webkit-scrollbar-thumb:hover { background: var(--pink); }
::-webkit-scrollbar-corner { background: transparent; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 15% -10%, rgba(229, 56, 59, .16), transparent 60%),
    radial-gradient(900px 400px at 100% 0%, rgba(255, 122, 168, .10), transparent 60%),
    var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
/* grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
img { display: block; }

.wrap { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 0 24px 64px; }

/* ============ Top bar ============ */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(12, 10, 13, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  max-width: 1280px; margin: 0 auto;
  padding: 12px 24px;
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__nose, .empty__nose {
  width: 40px; height: 32px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffb3cc, var(--pink) 55%, #d24d7c);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 0 0 2px rgba(255,255,255,.06), 0 6px 18px rgba(255, 122, 168, .35);
}
.brand__nose i, .empty__nose i {
  width: 7px; height: 12px; border-radius: 50%; background: var(--pink-deep);
}
.brand__text { font-family: var(--display); font-size: 26px; letter-spacing: 1px; line-height: 1; }
.brand__text b { color: var(--red); font-weight: 400; }

.nav { display: flex; gap: 4px; }
.nav__link {
  padding: 8px 14px; border-radius: 10px; font-weight: 500; font-size: 15px;
  text-decoration: none; color: var(--muted); border: 1px solid transparent;
}
.nav__link.is-active { color: var(--text); background: var(--card-2); border-color: var(--line-2); }
.nav__link.is-soon { opacity: .45; cursor: not-allowed; }

.quicksearch {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 0 10px; width: 280px; height: 40px;
}
.quicksearch:focus-within { border-color: var(--pink); }
.quicksearch svg, .search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.quicksearch input { background: none; border: 0; outline: 0; flex: 1; min-width: 0; font-size: 14px; }
.quicksearch { position: relative; cursor: text; }
.gsearch {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; width: min(440px, calc(100vw - 32px));
  max-height: min(70vh, 520px); overflow-y: auto; padding: 6px;
  background: var(--card); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow);
}
.gres {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; text-align: left; cursor: pointer;
  background: transparent; border: 0; border-radius: 10px;
}
.gres:hover, .gres.is-sel { background: color-mix(in srgb, var(--pink) 12%, transparent); }
.gres__img { width: 40px; height: 40px; flex: none; border-radius: 8px; overflow: hidden; background: var(--bg-2); display: flex; align-items: center; justify-content: center; }
.gres__img--wide { width: 56px; }
.gres__img img { width: 100%; height: 100%; object-fit: contain; }
.gres__img--wide img { object-fit: cover; }
.gres__txt { display: grid; flex: 1; min-width: 0; }
.gres__txt b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gres__txt b mark { background: none; color: var(--pink); }
.gres__txt small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gres__type { flex: none; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 2px 6px; border: 1px solid var(--line-2); border-radius: 6px; }
.gres__more { margin: 6px 8px; font-size: 12px; color: var(--muted); }
.quicksearch kbd {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 6px;
}

/* blood drip under header */
.drip {
  position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='10' viewBox='0 0 240 10'%3E%3Cpath fill='%23e5383b' d='M0 0h240v2c-6 0-7 3-9 3s-3-3-9-3-4 7-8 7-3-7-9-7-30 0-34 0-3 4-7 4-3-4-10-4H128c-5 0-4 6-8 6s-3-6-8-6H84c-6 0-4 3-8 3s-3-3-8-3H40c-5 0-5 8-9 8s-4-8-9-8H0z'/%3E%3C/svg%3E") repeat-x;
  opacity: .9;
}

/* ============ Hero ============ */
.hero {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px;
  padding: 56px 0 28px;
}
.eyebrow {
  margin: 0 0 10px; font-family: var(--mono); font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--pink);
}
.hero h1 { margin: 0; font-size: clamp(34px, 5vw, 56px); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
.blood { font-family: var(--display); font-weight: 400; color: var(--red); letter-spacing: 2px; text-shadow: 0 0 24px rgba(229, 56, 59, .45); }
.hero__sub { margin: 14px 0 0; color: var(--muted); max-width: 560px; line-height: 1.55; font-size: 16px; }

.stats { display: grid; grid-template-columns: repeat(4, auto); gap: 10px; margin: 0; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 16px; min-width: 104px;
}
.stat dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.stat dd { margin: 4px 0 0; font-family: var(--mono); font-size: 22px; font-weight: 700; }
.stat--ok dd { color: var(--ok); }
.stat--bad dd { color: var(--bad); }
.stat--pink dd { color: var(--pink); }

/* ============ Controls ============ */
.controls {
  background: linear-gradient(180deg, var(--card), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: grid; gap: 14px;
}
.controls__row { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.search {
  flex: 1 1 280px; display: flex; align-items: center; gap: 10px;
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 12px; padding: 0 14px; height: 46px;
}
.search:focus-within { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255, 122, 168, .15); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 15px; }

.select {
  display: flex; align-items: center; gap: 8px; height: 46px;
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 12px; padding: 0 6px 0 14px;
}
.select:focus-within { border-color: var(--pink); }
.select span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.select select {
  appearance: none; -webkit-appearance: none; background: transparent; border: 0; outline: 0;
  font-weight: 500; font-size: 14px; padding: 0 26px 0 2px; height: 100%; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a6959f' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
}
.select option { background: var(--card); color: var(--text); }

.toggle { display: flex; align-items: center; gap: 10px; padding: 0 12px; height: 46px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); cursor: pointer; font-size: 14px; font-weight: 500; user-select: none; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle__track { width: 36px; height: 20px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .2s; }
.toggle__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--text); transition: transform .2s; }
.toggle input:checked + .toggle__track { background: var(--pink); }
.toggle input:checked + .toggle__track::after { transform: translateX(16px); background: #fff; }
.toggle input:focus-visible + .toggle__track { outline: 2px solid var(--pink); outline-offset: 2px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  --c: var(--text);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
  background: color-mix(in srgb, var(--c) 8%, transparent);
  color: var(--c); font-weight: 600; font-size: 14px;
  transition: transform .12s, background .15s, box-shadow .15s;
}
.chip:hover { background: color-mix(in srgb, var(--c) 16%, transparent); }
.chip[aria-selected="true"] {
  background: var(--c); color: #120d12; border-color: var(--c);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--c) 35%, transparent);
}
.chip__n { font-family: var(--mono); font-size: 12px; opacity: .75; }
.chip[data-sec="all"] { --c: #f3eaef; }

.resultbar { display: flex; align-items: center; justify-content: space-between; margin: 22px 2px 14px; }
.resultbar p { margin: 0; color: var(--muted); font-size: 14px; }
.resultbar b { color: var(--text); font-family: var(--mono); }
.linkbtn { background: none; border: 0; color: var(--pink); cursor: pointer; font-weight: 500; font-size: 14px; }
.linkbtn:hover { text-decoration: underline; }

/* ============ Grid & cards ============ */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px; }
.card {
  --c: var(--pink);
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; text-align: left; padding: 0;
  transition: transform .18s ease, border-color .18s, box-shadow .18s;
}
.card:hover, .card:focus-visible {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--c) 60%, transparent);
  box-shadow: 0 14px 34px rgba(0,0,0,.5), 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent), 0 10px 40px -10px color-mix(in srgb, var(--c) 45%, transparent);
  outline: none;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.card__media {
  position: relative; aspect-ratio: 1 / .92;
  background:
    radial-gradient(70% 60% at 50% 60%, color-mix(in srgb, var(--c) 26%, transparent), transparent 70%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.018) 0 8px, transparent 8px 16px),
    var(--bg-2);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--line);
}
.card__media { flex: none; overflow: hidden; }
.card__media img {
  /* Pinned inside the fixed-ratio box so tall/wide renders can't stretch the card */
  position: absolute; top: 12%; left: 9%;
  width: 82%; height: 80%; object-fit: contain; object-position: center bottom;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,.55));
  transition: transform .25s ease;
}
.card:hover .card__media img { transform: scale(1.06) rotate(-1deg); }
.card.is-unob .card__media img { filter: drop-shadow(0 10px 14px rgba(0,0,0,.55)) saturate(.55) brightness(.8); }

.badge {
  --c: var(--pink);
  position: absolute; top: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: .03em;
  padding: 3px 8px; border-radius: 6px;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, #0c0a0d);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
}
.badge--sec { left: 10px; }
.badge--status { right: 10px; font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.badge--bad { --c: var(--bad); }
.badge--warn { --c: var(--warn); }
.badge--removed { --c: var(--c-removed); }

.card__body { padding: 12px 14px 14px; display: grid; gap: 6px; }
.card__name {
  margin: 0; font-size: 16px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere;
  /* always reserve two lines so every card is the same height */
  min-height: 2.4em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__alt { font-size: 10px; font-weight: 600; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; margin-left: 4px; vertical-align: 2px; }
.card__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); min-height: 20px; }
.price { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-weight: 700; color: var(--text); }
.price--free { color: var(--ok); }
.method { display: inline-flex; align-items: center; gap: 6px; }
.method::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--m, var(--muted)); }
.m-secret { --m: var(--red); color: #ff8a8f; }
.m-quest { --m: #4cc9f0; }
.m-season { --m: #b388ff; }
.m-advent { --m: #3ddc97; }
.m-event { --m: var(--warn); }
.m-exclusive { --m: var(--c-user); }
.m-removed { --m: var(--c-removed); }

/* token icon */
.token {
  width: 16px; height: 16px; border-radius: 50%; flex: none; position: relative;
  background: radial-gradient(circle at 35% 30%, #ffd3e1, var(--pink) 60%, #c23f6e);
  box-shadow: inset 0 0 0 1.5px rgba(90,22,48,.6);
}
.token::before, .token::after { content: ""; position: absolute; top: 5px; width: 3px; height: 6px; border-radius: 50%; background: var(--pink-deep); }
.token::before { left: 4px; } .token::after { right: 4px; }
.token--lg { width: 26px; height: 26px; }
.token--lg::before, .token--lg::after { top: 8px; width: 5px; height: 10px; }
.token--lg::before { left: 6px; } .token--lg::after { right: 6px; }

.img-fallback {
  width: 60%; height: 60%; display: flex; align-items: center; justify-content: center;
  border: 2px dashed var(--line-2); border-radius: 14px; color: var(--dim); font-family: var(--display); font-size: 42px;
}

/* empty state */
.empty { text-align: center; padding: 60px 0; color: var(--muted); }
.empty__nose { margin: 0 auto 16px; width: 64px; height: 50px; gap: 12px; filter: grayscale(.4); }
.empty__nose i { width: 10px; height: 18px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 12px; border: 1px solid var(--red);
  background: linear-gradient(180deg, #ef4a4d, var(--red)); color: #fff;
  font-weight: 600; text-decoration: none; cursor: pointer;
  box-shadow: 0 8px 24px -8px rgba(229, 56, 59, .7);
}
.btn:hover { filter: brightness(1.08); }
.btn--ghost { background: transparent; border-color: var(--line-2); color: var(--text); box-shadow: none; }
.btn--ghost:hover { border-color: var(--pink); color: var(--pink); }

.footer { position: relative; z-index: 1; border-top: 1px solid var(--line); text-align: center; padding: 28px 24px 40px; color: var(--dim); font-size: 13px; }
.footer a { color: var(--muted); }

/* ============ Modal ============ */
.modal {
  padding: 0; border: 0; background: transparent; color: var(--text);
  max-width: min(920px, calc(100vw - 32px)); width: 100%;
  max-height: calc(100vh - 32px); overflow: visible;
}
.modal::backdrop { background: rgba(5, 3, 6, .78); backdrop-filter: blur(6px); }
.modal[open] .modal__card { animation: pop .22s ease both; }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(10px); } to { opacity: 1; transform: none; } }
.modal__card {
  --c: var(--pink);
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  background: var(--card); border: 1px solid color-mix(in srgb, var(--c) 40%, var(--line));
  border-radius: 22px; overflow: hidden; box-shadow: var(--shadow), 0 0 80px -20px color-mix(in srgb, var(--c) 50%, transparent);
  max-height: calc(100vh - 32px);
}
.modal__media {
  position: relative; min-height: 380px; display: flex; align-items: center; justify-content: center; padding: 28px;
  background:
    radial-gradient(70% 55% at 50% 58%, color-mix(in srgb, var(--c) 34%, transparent), transparent 72%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.02) 0 10px, transparent 10px 20px),
    var(--bg-2);
  border-right: 1px solid var(--line);
}
.modal__media img { width: 100%; max-height: 420px; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(0,0,0,.6)); }
.modal__card { grid-template-rows: minmax(0, 1fr); }
.modal__body { min-width: 0; min-height: 0; padding: 30px 30px 26px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal__body h2 { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; overflow-wrap: anywhere; }
.modal__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.modal__tags .badge { position: static; }
.modal__alt { margin: -6px 0 0; color: var(--muted); font-size: 14px; }
.modal__alt:empty { display: none; }
.modal__alt button { background: none; border: 0; padding: 0; color: var(--pink); cursor: pointer; font-weight: 600; }
.modal__alt button:hover { text-decoration: underline; }

.modal__close, .modal__nav {
  position: absolute; z-index: 2; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(12,10,13,.75); border: 1px solid var(--line-2); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--text);
}
.modal__close { top: 14px; right: 14px; }
.modal__nav { top: 50%; transform: translateY(-50%); font-size: 26px; line-height: 1; padding-bottom: 3px; }
.modal__nav--prev { left: 14px; }
.modal__nav--next { left: calc(46.5% - 52px); }
.modal__close:hover, .modal__nav:hover { border-color: var(--pink); color: var(--pink); }

.status-banner {
  --s: var(--ok);
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--s) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--s) 40%, transparent);
}
.status-banner .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--s); box-shadow: 0 0 0 4px color-mix(in srgb, var(--s) 22%, transparent); flex: none; }
.status-banner strong { display: block; color: var(--s); font-size: 15px; }
.status-banner span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.status-banner.s-limited { --s: var(--warn); }
.status-banner.s-unobtainable { --s: var(--bad); }
.status-banner.s-removed { --s: var(--c-removed); }

.howto { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.howto__label { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.howto__price { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 28px; font-weight: 700; }
.howto__price small { font-family: var(--font); font-size: 14px; color: var(--muted); font-weight: 500; }
.howto__text { margin: 6px 0 0; line-height: 1.55; font-size: 15px; }
.howto--secret { border-color: color-mix(in srgb, var(--red) 45%, var(--line)); background: linear-gradient(135deg, rgba(229,56,59,.10), transparent 60%), var(--bg-2); }
.howto--secret .howto__label { color: #ff8a8f; }
.howto__method { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 17px; }

.notes { margin: 0; padding: 0 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.notes:empty { display: none; }

.family:empty { display: none; }
.family__label { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.family__row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.family__item {
  flex: none; width: 74px; padding: 6px; border-radius: 12px; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--line); text-align: center;
}
.family__item:hover { border-color: var(--pink); }
.family__item[aria-current="true"] { border-color: var(--c); box-shadow: 0 0 0 1px var(--c); }
.family__item img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.family__item span { display: block; font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }

.modal__body .btn--ghost { align-self: flex-start; margin-top: auto; }

/* ============ Ownership bits (skins view + modal) ============ */
.nav__pill {
  font-family: var(--mono); font-size: 11px; margin-left: 4px; padding: 1px 6px; border-radius: 99px;
  background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok);
}
.nav__pill:empty { display: none; }
.mobnav { display: none; }

.owned-tick {
  position: absolute; right: 10px; bottom: 10px; z-index: 1;
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--ok); color: #06200f; font-weight: 800; font-size: 14px;
  box-shadow: 0 4px 12px rgba(61, 220, 151, .4);
}

.modal__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 4px; }
.modal__body .modal__actions .btn--ghost { margin-top: 0; }
.ownbtn {
  display: inline-flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 12px; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--line-2); font-weight: 600;
}
.ownbtn:hover:not(:disabled) { border-color: var(--ok); }
.ownbtn:disabled { opacity: .6; cursor: default; }
.ownbtn__box {
  width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800;
}
.ownbtn[aria-pressed="true"] { background: color-mix(in srgb, var(--ok) 12%, var(--bg-2)); border-color: color-mix(in srgb, var(--ok) 55%, transparent); color: var(--ok); }
.ownbtn[aria-pressed="true"] .ownbtn__box { background: var(--ok); border-color: var(--ok); color: #06200f; }

.family__item { position: relative; }
.family__own {
  position: absolute; top: 4px; right: 4px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--ok); color: #06200f; font-size: 10px; font-style: normal; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* guide text (modal + collection) */
.howto__where { margin: 0 0 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
.guide__req {
  margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; font-size: 14px; line-height: 1.5;
  background: color-mix(in srgb, var(--warn) 9%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
}
.guide__req b { color: var(--warn); }
.guide__steps { margin: 12px 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 8px; }
.guide__steps li {
  counter-increment: step; position: relative; padding-left: 34px; line-height: 1.5; font-size: 14px;
}
.guide__steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  background: color-mix(in srgb, var(--red) 18%, transparent); color: #ff8a8f; border: 1px solid color-mix(in srgb, var(--red) 40%, transparent);
}
.guide__tips { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.guide__tips li { font-size: 13px; color: var(--muted); line-height: 1.5; padding-left: 24px; position: relative; }
.guide__tips li::before { content: "💡"; position: absolute; left: 0; top: 0; }

/* ============ Collection view ============ */
.hero--col { flex-direction: column; align-items: stretch; gap: 22px; }
.progress-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pcard {
  --p: 0;
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; min-width: 0;
  transition: border-color .15s, background .15s;
}
.pcard:hover { border-color: var(--line-2); }
.pcard.is-active { border-color: color-mix(in srgb, var(--pink) 60%, transparent); background: color-mix(in srgb, var(--pink) 6%, var(--card)); }
.pcard__ring {
  flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--ok) calc(var(--p) * 1%), var(--line) 0);
  position: relative;
}
.pcard__ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--card); }
.pcard.is-active .pcard__ring::before { background: color-mix(in srgb, var(--pink) 6%, var(--card)); }
.pcard__ring b { position: relative; font-family: var(--mono); font-size: 12px; }
.pcard__txt { display: grid; gap: 1px; min-width: 0; }
.pcard__label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard__num { font-family: var(--mono); font-size: 22px; font-weight: 700; }
.pcard__num small { font-size: 13px; color: var(--muted); }
.pcard__sub { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }

.coltabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.coltab {
  background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  padding: 12px 14px; font-weight: 600; font-size: 15px; color: var(--muted); cursor: pointer;
}
.coltab span { font-family: var(--mono); font-size: 12px; margin-left: 4px; color: var(--dim); }
.coltab:hover { color: var(--text); }
.coltab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--pink); }
.coltab[aria-selected="true"] span { color: var(--pink); }

.coltools { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.coltools .toggle { height: 40px; }
.linkbtn--muted { color: var(--muted); }
.colintro { margin: 0 0 16px; color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 760px; }
.colintro b { color: var(--text); }

/* custom checkbox */
input[data-own] { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.checkmark {
  width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--line-2); background: var(--bg);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  transition: background .15s, border-color .15s, transform .12s;
}
.checkmark::after { content: "✓"; font-weight: 800; font-size: 16px; color: #06200f; opacity: 0; transform: scale(.5); transition: .15s; }
input[data-own]:checked + .checkmark { background: var(--ok); border-color: var(--ok); }
input[data-own]:checked + .checkmark::after { opacity: 1; transform: none; }
input[data-own]:focus-visible + .checkmark { outline: 2px solid var(--pink); outline-offset: 2px; }

/* secret list */
.tracklist { display: grid; gap: 12px; }
.track {
  display: grid; grid-template-columns: auto 96px minmax(0, 1fr); gap: 16px; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  transition: border-color .15s, background .15s;
}
.track:hover { border-color: var(--line-2); }
.track.is-owned { background: linear-gradient(90deg, rgba(61, 220, 151, .07), transparent 40%), var(--card); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.track__check { cursor: pointer; padding-top: 34px; }
.track__check:hover .checkmark { border-color: var(--ok); transform: scale(1.06); }
.track__thumb {
  width: 96px; height: 96px; padding: 6px; border-radius: 12px; cursor: pointer; position: relative;
  border: 1px solid var(--line);
  background: radial-gradient(70% 60% at 50% 60%, color-mix(in srgb, var(--c) 28%, transparent), transparent 70%), var(--bg-2);
}
.track__thumb:hover { border-color: var(--c); }
.track__thumb img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0,0,0,.5)); }
.track__thumb .img-fallback { width: 100%; height: 100%; font-size: 28px; }
.track.is-owned .track__thumb img { filter: drop-shadow(0 6px 8px rgba(0,0,0,.5)) saturate(.7); }
.track__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.track__top h3 { margin: 0; font-size: 19px; font-weight: 700; }
.track.is-owned .track__top h3::after { content: " ✓"; color: var(--ok); }
.track__top .badge { position: static; }
.track__sum { margin: 8px 0 0; font-size: 15px; line-height: 1.5; }
.track > .howto-dd { grid-column: 1 / -1; }
.track.is-owned .howto-dd__btn { background: var(--bg-2); border-color: var(--line-2); }
.track.is-owned .howto-dd__icon { background: rgba(255,255,255,.05); }

/* ---- "How to get" dropdown ---- */
.where-chip {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 8px;
  padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 500; color: var(--muted);
  background: var(--bg-2); border: 1px solid var(--line-2);
}
.howto-dd { border-radius: 14px; }
.howto-dd__btn {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(229, 56, 59, .18), rgba(255, 122, 168, .06) 70%), var(--bg-2);
  border: 1px solid color-mix(in srgb, var(--red) 40%, var(--line));
  transition: border-color .15s, background .15s, transform .12s;
}
.howto-dd__btn::-webkit-details-marker { display: none; }
.howto-dd__btn:hover { border-color: var(--red); background: linear-gradient(135deg, rgba(229, 56, 59, .26), rgba(255, 122, 168, .08) 70%), var(--bg-2); }
.howto-dd__btn:active { transform: scale(.995); }
.howto-dd__btn:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.howto-dd__icon {
  flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px;
  background: color-mix(in srgb, var(--red) 22%, transparent);
}
.howto-dd__txt { display: grid; gap: 2px; min-width: 0; flex: 1; }
.howto-dd__txt b { font-size: 17px; font-weight: 700; color: var(--text); }
.howto-dd__txt small { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.howto-dd__chev {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.06); transition: transform .2s, background .15s;
}
.howto-dd__chev::before {
  content: ""; width: 14px; height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f3eaef' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.howto-dd[open] > .howto-dd__btn { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-color: var(--red); }
.howto-dd[open] .howto-dd__chev { transform: rotate(180deg); background: color-mix(in srgb, var(--red) 30%, transparent); }

.howto-dd__panel {
  padding: 18px 18px 16px; display: grid; gap: 14px;
  background: var(--bg-2); border: 1px solid var(--red); border-top: 0;
  border-radius: 0 0 14px 14px;
  animation: ddOpen .2s ease;
}
@keyframes ddOpen { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.howto-dd__short { margin: 0; font-size: 15px; line-height: 1.55; }
.howto-dd__short span {
  display: inline-block; margin-right: 8px; padding: 2px 8px; border-radius: 6px; vertical-align: 1px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  background: color-mix(in srgb, var(--pink) 16%, transparent); color: var(--pink);
}

/* numbered timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; position: relative; padding-bottom: 14px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { /* connecting line */
  content: ""; position: absolute; left: 15px; top: 32px; bottom: 2px; width: 2px;
  background: linear-gradient(var(--line-2), transparent);
}
.timeline li:last-child::before { display: none; }
.timeline__n {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--mono); font-size: 14px; font-weight: 700; color: #fff;
  background: linear-gradient(180deg, #ef4a4d, var(--red-deep)); box-shadow: 0 4px 12px -4px rgba(229, 56, 59, .7);
}
.timeline__txt { font-size: 15px; line-height: 1.6; padding-top: 4px; max-width: 70ch; }
.step__label {
  display: block; font-weight: 700; font-size: 13px; letter-spacing: .02em; color: var(--pink); margin-bottom: 1px;
}
.code {
  font-family: var(--mono); font-size: .92em; font-weight: 700; letter-spacing: .06em;
  padding: 1px 7px; border-radius: 6px; color: var(--warn);
  background: color-mix(in srgb, var(--warn) 12%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
}

/* callouts */
.callout { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.55; }
.callout__icon { font-size: 18px; line-height: 1.3; }
.callout b { display: block; margin-bottom: 2px; font-size: 13px; }
.callout ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--muted); }
.callout--warn { background: color-mix(in srgb, var(--warn) 9%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.callout--warn b { color: var(--warn); }
.callout--tip { background: color-mix(in srgb, #4cc9f0 7%, transparent); border: 1px solid color-mix(in srgb, #4cc9f0 25%, transparent); }
.callout--tip b { color: #7fd8f5; }

.guide__wiki { justify-self: start; font-size: 13px; color: var(--muted); }
.guide__wiki:hover { color: var(--pink); }

.howto-dd--wide { margin-bottom: 22px; }
.howto--dd .howto-dd { margin-top: 12px; }
.howto--dd .howto__text { margin-top: 10px; }

/* daily + shop groups */
.colh2 { margin: 26px 0 12px; font-size: 20px; font-weight: 800; display: flex; align-items: baseline; gap: 10px; }
.colh2 span { font-family: var(--mono); font-size: 14px; color: var(--muted); font-weight: 500; }
.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.group { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 12px; }
.groups .group { margin-bottom: 0; }
.group.is-complete { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.group__head { display: flex; align-items: center; gap: 10px; margin: 2px 4px 10px; }
.group__head h3 { margin: 0; font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.group__ch { font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 500; padding: 2px 6px; border: 1px solid var(--line-2); border-radius: 6px; }
.group__sub { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.group__count { margin-left: auto; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.group.is-complete .group__count { color: var(--ok); }
.group.is-complete .group__count::after { content: " ✓"; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.tiles--lg { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.tile {
  --c: var(--pink);
  position: relative; display: grid; grid-template-rows: auto auto 1fr auto; gap: 5px; padding: 8px; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .18s, background .18s, transform .18s ease, box-shadow .18s;
}
.tile:hover { border-color: color-mix(in srgb, var(--c) 50%, var(--line-2)); transform: translateY(-3px); box-shadow: 0 12px 26px -12px color-mix(in srgb, var(--c) 60%, transparent); }
.tile:active { transform: translateY(-1px) scale(.99); }
.tile .checkmark { position: absolute; top: 14px; left: 14px; width: 26px; height: 26px; border-radius: 8px; z-index: 3; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.tile .checkmark::after { font-size: 15px; }
.tile:hover input[data-own]:not(:checked) + .checkmark { border-color: var(--ok); }
.tile.is-owned { border-color: color-mix(in srgb, var(--ok) 55%, transparent); background: color-mix(in srgb, var(--ok) 8%, var(--bg-2)); }
.tile__img {
  height: 118px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(70% 60% at 50% 60%, color-mix(in srgb, var(--c) 24%, transparent), transparent 70%);
}
.tiles--lg .tile__img { height: 140px; }
.tile__img img, .tile__img .img-fallback { position: relative; z-index: 1; }
.tile__img img { width: 92%; height: 92%; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0,0,0,.5)); }
.tile__img .img-fallback { width: 70%; height: 80%; font-size: 26px; }
.tile:not(.is-owned) .tile__img img { filter: drop-shadow(0 6px 8px rgba(0,0,0,.5)) grayscale(.3) brightness(.85); }
.tile:hover .tile__img img { transform: scale(1.05); }
.tile__name { margin-top: 2px; font-size: 14px; font-weight: 700; line-height: 1.25; min-height: 2.5em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile__meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; align-content: start; }
.tile__meta .price { font-size: 12px; }
.tile__where { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.tile__flag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); border-radius: 5px; padding: 1px 5px; }
.tile__how {
  margin-top: 2px; width: 100%; padding: 6px 8px; border-radius: 9px; cursor: pointer; font-size: 12px; font-weight: 600;
  background: color-mix(in srgb, var(--c) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line-2)); color: var(--text);
  transition: background .15s, border-color .15s, transform .15s;
}
.tile__how:hover { background: color-mix(in srgb, var(--c) 22%, var(--card)); border-color: var(--c); transform: translateY(-1px); }
.tile__how:active { transform: scale(.97); }

/* ============ Map backdrops behind skins ============ */
.has-map, .no-map { position: relative; isolation: isolate; overflow: hidden; }
.has-map::before, .no-map::before, .has-map::after, .no-map::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.has-map::before {
  z-index: -2; background: var(--map) center / cover no-repeat;
  filter: blur(1.5px) brightness(.62) saturate(1.15); transform: scale(1.08);
}
.has-map::after {
  z-index: -1;
  background:
    radial-gradient(50% 45% at 50% 60%, color-mix(in srgb, var(--c) 18%, transparent), transparent 75%),
    linear-gradient(180deg, rgba(12,10,13,.25) 0%, rgba(12,10,13,0) 40%, rgba(12,10,13,.7) 100%);
}
/* neutral "studio stage" for skins that aren't tied to one map */
.no-map::before {
  z-index: -2;
  background:
    radial-gradient(55% 50% at 50% -8%, color-mix(in srgb, var(--c) 42%, transparent), transparent 72%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.028) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.028) 0 1px, transparent 1px 17px),
    linear-gradient(180deg, #231b26 0%, #17121a 74%, #100c12 74%, #0b080c 100%);
}
.no-map::after {
  z-index: -1;
  background:
    radial-gradient(38% 7% at 50% 88%, rgba(0,0,0,.6), transparent 75%),
    radial-gradient(45% 30% at 50% 86%, color-mix(in srgb, var(--c) 14%, transparent), transparent 75%);
}
.card__media.has-map, .card__media.no-map { background: var(--bg-2); }
.card__media img { z-index: 1; } /* stays absolutely positioned (uniform card size) */
.modal__media img, .modal__media .img-fallback, .card__media .img-fallback { position: relative; z-index: 1; }
.card__media .badge, .card__media .owned-tick { z-index: 2; }
.modal__media.has-map, .modal__media.no-map { background: var(--bg-2); }

/* "From the map" link in the skin popup */
#mFrom:empty { display: none; }
#mFrom { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.from-map {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px 12px 6px 6px; cursor: pointer; text-align: left;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; transition: border-color .15s;
}
.from-map:hover { border-color: var(--c); }
.from-map img { width: 68px; height: 42px; object-fit: cover; border-radius: 8px; flex: none; }
.from-map span { display: grid; flex: 1; min-width: 0; }
.from-map small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.from-map b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.from-map i { font-style: normal; font-size: 22px; color: var(--muted); }

/* ============ Maps view ============ */
.mapgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.mapcard {
  --c: var(--pink);
  display: flex; flex-direction: column; padding: 0; text-align: left; cursor: pointer; min-width: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .18s ease, border-color .18s, box-shadow .18s;
}
.mapcard:hover, .mapcard:focus-visible {
  transform: translateY(-4px); outline: none;
  border-color: color-mix(in srgb, var(--c) 60%, transparent);
  box-shadow: 0 14px 34px rgba(0,0,0,.5), 0 10px 40px -12px color-mix(in srgb, var(--c) 45%, transparent);
}
.mapcard__img { position: relative; aspect-ratio: 16 / 9; background: var(--bg-2); overflow: hidden; }
.mapcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.mapcard:hover .mapcard__img img { transform: scale(1.05); }
.mapcard__img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(25,21,27,.9)); }
.mapcard__group { left: 10px; z-index: 1; }
.mapcard__ch {
  position: absolute; top: 10px; right: 10px; z-index: 1; padding: 3px 8px; border-radius: 6px;
  font-family: var(--mono); font-size: 11px; font-weight: 700; color: #fff; background: rgba(12,10,13,.75); border: 1px solid rgba(255,255,255,.12);
}
.mapcard__body { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; flex: 1; min-width: 0; }
.mapcard__body h3 { margin: 0; font-size: 19px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mapcard__desc {
  margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted); min-height: 2.9em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mapcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; min-width: 0; }
.mapcard__bots { display: flex; align-items: center; min-width: 0; flex: 1; }
.mapcard__botname { margin-left: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mapcard__skins { flex: none; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--bg-2); border: 1px solid var(--line-2); }

.ava {
  width: 28px; height: 28px; border-radius: 50%; flex: none; object-fit: cover; object-position: 50% 15%;
  background: var(--bg-2); border: 2px solid var(--card);
}
.ava + .ava { margin-left: -9px; }
.ava--txt { display: grid; place-items: center; font-weight: 700; font-size: 12px; color: var(--muted); }

/* ============ Map popup ============ */
.modal--map { max-width: min(880px, calc(100vw - 32px)); }
.modal--map[open] .mapdlg { animation: pop .22s ease both; }
.mapdlg {
  --c: var(--pink);
  position: relative; display: flex; flex-direction: column; max-height: calc(100vh - 32px);
  background: var(--card); border: 1px solid color-mix(in srgb, var(--c) 40%, var(--line)); border-radius: 22px; overflow: hidden;
  box-shadow: var(--shadow), 0 0 80px -20px color-mix(in srgb, var(--c) 45%, transparent);
}
.mapdlg__hero { position: relative; flex: none; height: 250px; background: var(--bg-2); }
.mapdlg__hero img { width: 100%; height: 100%; object-fit: cover; }
.mapdlg__hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,10,13,.1) 35%, var(--card) 100%); }
.mapdlg__title { position: absolute; left: 24px; right: 70px; bottom: 14px; z-index: 1; min-width: 0; }
.mapdlg__title .badge { position: static; }
.mapdlg__title h2 { margin: 8px 0 0; font-size: 34px; font-weight: 800; line-height: 1.05; text-shadow: 0 2px 14px rgba(0,0,0,.7); overflow-wrap: anywhere; }
.mapdlg__nav { top: 105px; transform: none; }
.mapdlg__nav--prev { left: 14px; }
.mapdlg__nav--next { left: auto; right: 14px; }
.mapdlg__body { overflow-y: auto; min-height: 0; padding: 14px 24px 24px; display: grid; gap: 20px; }
.mapdlg__desc { margin: 0; font-size: 15px; line-height: 1.6; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin: 0; }
.fact { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.fact dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.fact dd { margin: 4px 0 0; font-size: 14px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }

.msec { min-width: 0; }
.msec h3 { margin: 0 0 10px; font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.msec h3 span { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--muted); padding: 1px 7px; border-radius: 99px; background: var(--bg-2); border: 1px solid var(--line); }
.msec__label { margin: 0 0 6px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.msec__hint { margin: -2px 0 10px; font-size: 13px; color: var(--muted); }
.botchips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.botchips:last-child { margin-bottom: 0; }
.botchip {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; max-width: 100%; min-width: 0; text-align: left;
  border-radius: 99px; background: var(--bg-2); border: 1px solid var(--line);
}
button.botchip { cursor: pointer; }
button.botchip:hover { border-color: var(--pink); }
.botchip .ava { width: 34px; height: 34px; border-color: var(--line-2); margin: 0; }
.botchip__txt { display: grid; min-width: 0; }
.botchip__txt b, .botchip__txt small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.botchip__txt b { font-size: 13px; }
.botchip__txt small { font-size: 11px; color: var(--muted); }

.mskins { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 8px; }
.mskin {
  display: grid; align-content: start; gap: 4px; padding: 6px 6px 8px; min-width: 0; cursor: pointer; text-align: center;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s, transform .15s;
}
.mskin:hover { border-color: var(--c); transform: translateY(-2px); }
.mskin.is-owned { border-color: color-mix(in srgb, var(--ok) 55%, transparent); }
.mskin__img { aspect-ratio: 1; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.mskin__img img { position: relative; z-index: 1; width: 86%; height: 86%; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0,0,0,.55)); }
.mskin__img .img-fallback { position: relative; z-index: 1; width: 70%; height: 70%; font-size: 24px; }
.mskin__name { font-size: 12px; font-weight: 600; line-height: 1.25; min-height: 2.5em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.mskin__sub { font-size: 11px; color: var(--muted); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mskin__sub .token { display: inline-block; width: 12px; height: 12px; vertical-align: -2px; }
.mskin__sub .token::before, .mskin__sub .token::after { top: 3px; width: 2px; height: 5px; }
.mskin__sub .token::before { left: 3px; } .mskin__sub .token::after { right: 3px; }
.mapdlg__wiki { justify-self: start; }

/* ============ Items / Traps / Effects ============ */
.energy { font-family: var(--mono); font-weight: 700; color: #ffd166; }
.card__media--icon img { filter: drop-shadow(0 8px 12px rgba(0,0,0,.6)); }
/* items are small icons, so they get a tighter grid with smaller cards */
.grid.grid--items { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
.grid--items .card__media { aspect-ratio: 1 / .78; }
.grid--items .card__media--icon img { width: 62%; height: 62%; top: 19%; left: 19%; }
.grid--items .card__body { padding: 9px 10px 11px; gap: 4px; }
.grid--items .card__name { font-size: 14px; }
.grid--items .card__meta { font-size: 12px; }
.grid--items .badge--sec { font-size: 10px; padding: 2px 6px; }
.info__media img { max-height: 320px; width: 80%; }
.info__body { display: grid; gap: 16px; }
.family--top { margin-bottom: -2px; }
.info__list { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; line-height: 1.5; }
.info__text { margin: 0; font-size: 15px; line-height: 1.55; }
.info__muted { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.info__body .msec h3 span { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--muted); padding: 1px 7px; border-radius: 99px; background: var(--bg-2); border: 1px solid var(--line); }
.info__body .howto-dd { margin-top: 12px; }
.tagchips { display: flex; flex-wrap: wrap; gap: 6px; }
.tagchip { padding: 5px 10px; border-radius: 8px; font-size: 13px; background: var(--bg-2); border: 1px solid var(--line); max-width: 100%; overflow-wrap: anywhere; }
.mapchips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; max-height: 260px; overflow-y: auto; padding-right: 2px; }
.mapchip {
  display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; min-width: 0; cursor: pointer; text-align: left;
  border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); transition: border-color .15s;
}
.mapchip:hover { border-color: var(--c); }
.mapchip img { width: 44px; height: 28px; object-fit: cover; border-radius: 6px; flex: none; }
.mapchip span { display: grid; min-width: 0; font-size: 13px; font-weight: 600; }
.mapchip span, .mapchip small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mapchip small { font-size: 11px; font-weight: 500; color: var(--warn); }

/* ============ Seasons ============ */
.seasonpick { position: relative; display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin-bottom: 14px; }
/* bigger, easy-to-grab horizontal scrollbars for the season picker and reward track */
.seasonpick::-webkit-scrollbar, .track::-webkit-scrollbar { height: 14px; }
.seasonpick::-webkit-scrollbar-track, .track::-webkit-scrollbar-track { background: var(--bg); border: 1px solid var(--line); border-radius: 99px; }
.seasonpick::-webkit-scrollbar-thumb, .track::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--pink), var(--red)); border: 3px solid var(--bg); border-radius: 99px;
}
.seasonpick::-webkit-scrollbar-thumb:hover, .track::-webkit-scrollbar-thumb:hover { background: var(--pink); }
.track.is-dragging, .seasonpick.is-dragging { cursor: grabbing; user-select: none; }
.track.is-dragging * { pointer-events: none; }
.spick {
  flex: none; display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; cursor: pointer; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s, background .15s;
}
.spick:hover { border-color: var(--line-2); }
.spick.is-active { border-color: var(--pink); background: color-mix(in srgb, var(--pink) 10%, var(--card)); }
.spick__img { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; background: var(--bg-2); flex: none; }
.spick__img img { width: 100%; height: 100%; object-fit: cover; }
.spick__txt { display: grid; }
.spick__txt small { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.spick__txt b { font-size: 14px; white-space: nowrap; }
.live { color: var(--ok); font-weight: 700; }

.seasonpanel { background: linear-gradient(180deg, var(--card), var(--bg-2)); border: 1px solid var(--line); border-radius: 20px; padding: 20px; display: grid; gap: 14px; }
.seasonpanel > .btn { justify-self: start; }
.seasonpanel > * { min-width: 0; } /* let the track scroll inside the panel instead of stretching the page */
.season__head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.season__icon { width: 84px; height: 84px; border-radius: 16px; object-fit: cover; border: 1px solid var(--line-2); }
.season__title { flex: 1; min-width: 200px; }
.season__title .eyebrow { margin: 0 0 4px; }
.season__title h2 { margin: 0; font-size: 30px; font-weight: 800; line-height: 1.1; }
.season__dates { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.season__badges { display: flex; gap: 6px; flex-wrap: wrap; }
.spill { padding: 5px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; background: var(--bg-2); border: 1px solid var(--line-2); white-space: nowrap; }
.spill--live { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.spill--ended { color: var(--muted); }
.season__how { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 900px; }

/* the reward track */
.trackwrap { position: relative; }
.track {
  --cardh: 236px;
  display: flex; gap: 12px; overflow-x: auto; padding: 6px 4px 16px; cursor: grab;
}
.tcol { flex: none; display: flex; flex-direction: column; gap: 10px; }
.tcol--labels { position: sticky; left: 0; z-index: 2; }
.tlabel { position: relative; height: 48px; display: grid; align-content: start; justify-items: center; gap: 2px; padding-top: 18px; }
.tlabel--spacer::before { display: none; }
.tlabel::before { /* progress line through the nodes */
  content: ""; position: absolute; top: 6px; left: -6px; right: -6px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--pink) 60%, transparent), color-mix(in srgb, var(--red) 60%, transparent));
}
.tnode { position: absolute; top: 1px; width: 13px; height: 13px; border-radius: 50%; background: var(--bg); border: 3px solid var(--pink); }
.tlabel b { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.tlabel small { font-size: 11px; color: var(--muted); }
.trow-label {
  height: var(--cardh); width: 28px; display: flex; align-items: center; justify-content: center;
  writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
}
.trow-label--prem { color: #ffd166; border-color: color-mix(in srgb, #ffd166 40%, var(--line)); background: color-mix(in srgb, #ffd166 8%, var(--bg-2)); }
.tcell { display: flex; gap: 8px; height: var(--cardh); }
.tcell--empty { width: 148px; border: 1px dashed var(--line); border-radius: 14px; align-items: center; justify-content: center; color: var(--dim); }

.rcard {
  --r: #8aa2b8;
  position: relative; flex: none; height: 100%; width: 148px; display: grid; grid-template-rows: auto auto 1fr auto; gap: 4px; padding: 8px 8px 10px; text-align: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--r) 22%, var(--card)) 0%, var(--card) 55%);
  border: 1px solid color-mix(in srgb, var(--r) 45%, var(--line)); border-radius: 14px; color: var(--text);
}
button.rcard { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.rcard.is-link { box-shadow: 0 0 0 1px color-mix(in srgb, var(--r) 30%, transparent), 0 8px 22px -12px var(--r); }
button.rcard:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--r), 0 12px 26px -10px var(--r); }
.rcard__img {
  height: 110px; border-radius: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: radial-gradient(60% 60% at 50% 55%, color-mix(in srgb, var(--r) 35%, transparent), transparent 75%), rgba(0,0,0,.25);
}
.rcard__img img { max-width: 92%; max-height: 92%; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0,0,0,.5)); }
.rcard__img .img-fallback { width: 60%; height: 70%; font-size: 26px; }
.rcard__kind { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--r); line-height: 1.25; }
.rcard__name { font-size: 13px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rcard__cost { justify-self: center; margin-top: 4px; padding: 3px 10px; border-radius: 99px; font-family: var(--mono); font-size: 12px; font-weight: 700; background: rgba(0,0,0,.35); border: 1px solid var(--line-2); }
.rcard__cost--free { color: var(--ok); }
.rc--skin { --r: #ff4d5e; }
.rc--alt { --r: #b388ff; }
.rc--trap { --r: #f7b32b; }
.rc--ability { --r: #4cc9f0; }
.rc--effect { --r: #ff7aa8; }
.rc--tokens { --r: #ff9ec0; }
.rc--journal { --r: #d9c19a; }
.rc--revive { --r: #3ddc97; }
.rc--build { --r: #8aa2b8; }

.tracknav {
  position: absolute; top: 50%; z-index: 3; width: 38px; height: 38px; border-radius: 50%; transform: translateY(-50%);
  background: rgba(12,10,13,.85); border: 1px solid var(--line-2); color: var(--text); font-size: 24px; line-height: 1; padding-bottom: 3px; cursor: pointer;
}
.tracknav:hover { border-color: var(--pink); color: var(--pink); }
.tracknav--prev { left: -12px; }
.tracknav--next { right: -12px; }

/* ============ Footer links, cookie notice, legal pages ============ */
.footer p { margin: 0 0 8px; }
.footer__links { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; }
.footer__links a, .footer__links .linkbtn { color: var(--muted); font-size: 13px; text-decoration: none; }
.footer__links a:hover, .footer__links .linkbtn:hover { color: var(--pink); text-decoration: underline; }
.btn--sm { padding: 8px 14px; font-size: 14px; border-radius: 10px; }

.cookie {
  position: fixed; left: 50%; bottom: 16px; z-index: 50; transform: translateX(-50%);
  width: min(680px, calc(100vw - 24px)); display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--card) 94%, transparent);
  border: 1px solid var(--line-2); box-shadow: 0 16px 40px rgba(0,0,0,.55); backdrop-filter: blur(10px);
  animation: cookieIn .3s ease both;
}
@keyframes cookieIn { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
.cookie__icon { font-size: 26px; flex: none; }
.cookie__text { margin: 0; flex: 1; font-size: 13px; line-height: 1.5; color: var(--muted); }
.cookie__text b { color: var(--text); }
.cookie__text a { color: var(--pink); }
.cookie__btns { display: flex; gap: 8px; flex: none; }

.savenote { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 10px 14px; border-radius: 12px; font-size: 14px;
  background: color-mix(in srgb, var(--warn) 8%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.savenote p { margin: 0; color: var(--muted); }

.legal { max-width: 760px; margin: 0 auto; padding: 48px 0 24px; line-height: 1.65; }
.legal h1 { margin: 0; font-size: clamp(30px, 5vw, 44px); font-weight: 800; letter-spacing: -.01em; }
.legal h2 { margin: 28px 0 6px; font-size: 19px; font-weight: 700; }
.legal p, .legal li { color: #d8cdd3; font-size: 15px; }
.legal ul { padding-left: 22px; }
.legal a { color: var(--pink); }
.legal__updated { margin: 6px 0 20px; color: var(--muted) !important; font-size: 13px !important; font-family: var(--mono); }
.legal__box { margin: 14px 0; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.legal__box p { margin: 0 0 10px; }
.legal__btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============ Polish: animations & QoL ============ */
/* cards slide in as they scroll into view (JS adds .rv, then .in) */
.rv { opacity: 0; transform: translateY(18px) scale(.97); }
.rv.in { opacity: 1; transform: none; transition: opacity .45s ease, transform .5s cubic-bezier(.2,.8,.2,1); }

/* pictures fade in once loaded */
.card__media img, .mapcard__img img, .mskin__img img, .tile__img img, .rcard__img img, .family__item img, .gres__img img, .track__thumb img, .spick__img img {
  transition: opacity .45s ease, transform .25s ease, filter .3s ease;
}
:is(.card__media, .mapcard__img, .mskin__img, .tile__img, .rcard__img, .family__item, .gres__img, .track__thumb, .spick__img) img:not(.is-loaded) { opacity: 0; }

/* new page fades up */
.view-enter { animation: viewIn .4s cubic-bezier(.2,.8,.2,1) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.view-enter .hero h1 .blood { animation: bloodPulse 1.2s ease .15s both; }
@keyframes bloodPulse { 0% { text-shadow: 0 0 0 rgba(229,56,59,0); } 40% { text-shadow: 0 0 34px rgba(229,56,59,.9); } 100% { text-shadow: 0 0 24px rgba(229,56,59,.45); } }

/* light sweep across cards on hover */
.card::after, .mapcard::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.09) 48%, rgba(255,255,255,.02) 55%, transparent 65%);
  transform: translateX(-120%); transition: transform .7s ease;
}
.mapcard { position: relative; }
.card:hover::after, .mapcard:hover::after { transform: translateX(120%); }

/* the brand nose wiggles on hover */
.brand:hover .brand__nose { animation: snort .5s ease; }
@keyframes snort { 0%, 100% { transform: none; } 25% { transform: scale(1.12, .9); } 50% { transform: scale(.94, 1.06); } 75% { transform: scale(1.05, .96); } }

/* tick feedback */
input[data-own]:checked + .checkmark { animation: checkPop .38s cubic-bezier(.3,1.6,.5,1); }
@keyframes checkPop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.ownbtn[aria-pressed="true"] .ownbtn__box { animation: checkPop .38s cubic-bezier(.3,1.6,.5,1); }
.owned-tick { animation: checkPop .38s cubic-bezier(.3,1.6,.5,1); }
.confetti { position: fixed; z-index: 200; width: 8px; height: 12px; border-radius: 2px; pointer-events: none; }

/* toasts */
.toasts { position: fixed; left: 50%; bottom: 18px; z-index: 120; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; transition: bottom .25s ease; }
body.has-cookie .toasts { bottom: 104px; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 99px; font-size: 14px; font-weight: 500;
  background: color-mix(in srgb, var(--card) 92%, transparent); border: 1px solid var(--line-2); box-shadow: 0 12px 30px rgba(0,0,0,.5);
  backdrop-filter: blur(8px); animation: toastIn .3s cubic-bezier(.2,.9,.3,1.2) both; max-width: calc(100vw - 32px);
}
.toast__icon { font-size: 16px; }
.toast.is-out { animation: toastOut .3s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.97); } }

/* back to top */
.totop {
  position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; background: linear-gradient(180deg, #ef4a4d, var(--red)); border: 0;
  box-shadow: 0 10px 26px -8px rgba(229, 56, 59, .8); opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, bottom .25s ease;
}
.totop svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.totop.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.totop:hover { filter: brightness(1.1); transform: translateY(-2px); }
body.has-cookie .totop { bottom: 104px; }

/* dice + small buttons */
.resultbar__actions { display: flex; align-items: center; gap: 14px; }
.dicebtn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; cursor: pointer; font-weight: 600; font-size: 13px;
  background: var(--card); border: 1px solid var(--line-2); color: var(--text); transition: border-color .15s, transform .15s;
}
.dicebtn:hover { border-color: var(--pink); transform: translateY(-1px); }
.dice { display: inline-block; }
.dicebtn.is-rolling .dice { animation: roll .5s cubic-bezier(.3,.7,.4,1); }
@keyframes roll { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(240deg) scale(1.35); } 100% { transform: rotate(360deg) scale(1); } }
.btn--icon { padding: 11px 14px; }

/* ---- button & tab hover animations ---- */
.btn { position: relative; overflow: hidden; transition: transform .16s ease, box-shadow .2s ease, filter .2s ease, border-color .2s, color .2s, background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn:not(.btn--ghost):hover { box-shadow: 0 12px 28px -10px rgba(229, 56, 59, .85); }
.btn:active { transform: translateY(0) scale(.97); }
.btn:not(.btn--ghost)::after { /* light sweep on primary buttons */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .6s ease;
}
.btn:not(.btn--ghost):hover::after { transform: translateX(120%); }
.btn--ghost:hover { background: color-mix(in srgb, var(--pink) 8%, transparent); }

.nav__link { position: relative; transition: color .18s, background .18s; }
.nav__link::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--pink), var(--red)); transform: scaleX(0); transition: transform .25s cubic-bezier(.2,.8,.2,1);
}
.nav__link:not(.is-soon):hover { color: var(--text); }
.nav__link:not(.is-soon):hover::after, .nav__link.is-active::after { transform: scaleX(1); }

.mobnav a { transition: transform .15s ease, border-color .15s, color .15s, background .15s; }
.mobnav a:hover { transform: translateY(-2px); color: var(--text); border-color: var(--line-2); }
.mobnav a:active { transform: scale(.96); }

.chip { transition: transform .15s ease, background .15s, box-shadow .15s, color .15s; }
.chip:hover { transform: translateY(-2px); }
.chip:active { transform: scale(.95); }

.coltab { position: relative; border-bottom-color: transparent !important; transition: color .18s; }
.coltab::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--pink);
  transform: scaleX(0); transition: transform .25s cubic-bezier(.2,.8,.2,1);
}
.coltab:hover::after { transform: scaleX(.5); }
.coltab[aria-selected="true"]::after { transform: scaleX(1); }

.linkbtn { background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .25s ease, color .15s; }
.linkbtn:hover { text-decoration: none; background-size: 100% 1px; }

.ownbtn { transition: transform .15s ease, border-color .15s, background .15s, color .15s; }
.ownbtn:hover:not(:disabled) { transform: translateY(-2px); }
.ownbtn:active:not(:disabled) { transform: scale(.97); }

.pcard, .spick, .botchip, .family__item, .mapchip, .from-map, .dicebtn, .mskin { transition: transform .16s ease, border-color .16s, background .16s, box-shadow .16s; }
.pcard:hover, .spick:hover, button.botchip:hover, .family__item:hover, .mskin:hover { transform: translateY(-2px); }
.spick__img img, .from-map img, .mapchip img { transition: transform .3s ease, opacity .45s ease; }
.spick:hover .spick__img img, .from-map:hover img, .mapchip:hover img { transform: scale(1.1); }
.from-map i, .mapchip span { transition: transform .2s ease; }
.from-map:hover i { transform: translateX(4px); color: var(--pink); }
.mapchip:hover { transform: translateX(2px); }
.dicebtn:hover .dice { transform: rotate(-15deg) scale(1.1); transition: transform .2s ease; }

.modal__close, .modal__nav, .tracknav { transition: transform .2s ease, border-color .15s, color .15s, background .15s; }
.modal__close:hover { transform: rotate(90deg); }
.modal__nav:hover { transform: translateY(-50%) scale(1.1); }
.mapdlg__nav:hover { transform: scale(1.1); }
.tracknav:hover { transform: translateY(-50%) scale(1.1); }
.howto-dd__icon { transition: transform .25s ease; }
.howto-dd__btn:hover .howto-dd__icon { transform: rotate(-12deg) scale(1.08); }
.select, .toggle, .search { transition: border-color .15s, box-shadow .15s; }
.select:hover, .toggle:hover { border-color: color-mix(in srgb, var(--pink) 45%, var(--line-2)); }

/* ---- export / import popup ---- */
.coltools__sync { margin-left: auto; }
.modal--sync { max-width: min(560px, calc(100vw - 32px)); }
.syncdlg {
  position: relative; display: grid; gap: 12px; padding: 24px; max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--card); border: 1px solid var(--line-2); border-radius: 20px; box-shadow: var(--shadow);
}
.modal--sync[open] .syncdlg { animation: pop .22s ease both; }
.syncdlg h2 { margin: 0; font-size: 26px; font-weight: 800; }
.syncdlg .eyebrow { margin: 0; }
.syncdlg .info__muted { margin: 0; }
.sync__part { display: grid; gap: 8px; padding: 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.sync__part h3 { margin: 0; font-size: 15px; }
.sync__part h3 span { font-weight: 500; color: var(--muted); font-size: 13px; }
.sync__part textarea {
  width: 100%; resize: vertical; padding: 10px 12px; border-radius: 10px; font-family: var(--mono); font-size: 12px; line-height: 1.45;
  background: var(--bg); color: var(--text); border: 1px solid var(--line-2); outline: 0; word-break: break-all;
}
.sync__part textarea:focus { border-color: var(--pink); }
.sync__part .btn { justify-self: start; }
.sync__btns { display: flex; gap: 8px; flex-wrap: wrap; }
.sync__msg { margin: 0; font-size: 13px; min-height: 1em; }
.sync__msg.is-ok { color: var(--ok); }
.sync__msg.is-bad { color: var(--bad); }

/* ---- popup open/close animations ---- */
.modal[open]::backdrop { animation: backdropIn .25s ease both; }
.modal.is-closing::backdrop { animation: backdropOut .22s ease both; }
.modal.is-closing > .modal__card, .modal.is-closing > .mapdlg, .modal.is-closing > .syncdlg { animation: popOut .22s cubic-bezier(.4,0,1,1) both !important; }
.modal.is-closing { pointer-events: none; }
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes backdropOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes popOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: scale(.94) translateY(12px); } }

/* modal content eases in */
.modal[open] .modal__body, .modal[open] .mapdlg__body { animation: viewIn .35s ease .05s both; }

/* ============ Responsive ============ */
@media (max-width: 1360px) {
  .topbar__inner { gap: 14px; }
  .nav__link { padding: 8px 9px; font-size: 14px; }
  .quicksearch { width: 180px; }
}
@media (max-width: 1180px) and (min-width: 1041px) {
  .quicksearch { display: none; } /* not enough room next to the full nav */
}
@media (max-width: 1040px) {
  .quicksearch { flex: 1; width: auto; min-width: 0; max-width: 420px; }
  .nav { display: none; }
  .mobnav {
    display: flex; gap: 6px; position: relative; z-index: 1;
    max-width: 1280px; margin: 18px auto 0; padding: 0 24px 4px;
    overflow-x: auto; scrollbar-width: none;
  }
  .mobnav::-webkit-scrollbar { display: none; }
  .mobnav a {
    flex: 1 0 auto; text-align: center; white-space: nowrap; padding: 10px 14px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 14px;
    color: var(--muted); background: var(--card); border: 1px solid var(--line);
  }
  .mobnav a.is-active { color: var(--text); border-color: var(--pink); background: color-mix(in srgb, var(--pink) 10%, var(--card)); }
}
@media (max-width: 960px) {
  .hero { flex-direction: column; align-items: flex-start; }
  .stats { grid-template-columns: repeat(2, 1fr); width: 100%; }
  .nav { display: none; }
  .mobnav {
    display: flex; gap: 6px; position: relative; z-index: 1;
    max-width: 1280px; margin: 18px auto 0; padding: 0 24px 4px;
    overflow-x: auto; scrollbar-width: none;
  }
  .mobnav::-webkit-scrollbar { display: none; }
  .mobnav a {
    flex: 1 0 auto; text-align: center; white-space: nowrap; padding: 10px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 14px;
    color: var(--muted); background: var(--card); border: 1px solid var(--line);
  }
  .mobnav a.is-active { color: var(--text); border-color: var(--pink); background: color-mix(in srgb, var(--pink) 10%, var(--card)); }
  .progress-cards { width: 100%; min-width: 0; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px 48px; }
  .topbar__inner { padding: 10px 16px; gap: 12px; }
  .brand__text { font-size: 20px; white-space: nowrap; }
  .brand { gap: 8px; flex: none; }
  .cookie__icon { display: none; }
  .brand__nose { width: 34px; height: 28px; }
  .quicksearch kbd { display: none; }
  .gsearch { right: -4px; }
  .cookie { flex-wrap: wrap; bottom: 10px; gap: 10px; }
  body.has-cookie .toasts, body.has-cookie .totop { bottom: 176px; }
  .totop { right: 14px; bottom: 14px; width: 42px; height: 42px; }
  .resultbar { gap: 10px; }
  .dicebtn { padding: 6px 10px; }
  .cookie__text { flex: 1 1 100%; }
  .cookie__btns { width: 100%; }
  .cookie__btns .btn { flex: 1; }
  .legal { padding-top: 28px; }
  .hero { padding: 36px 0 22px; }
  .select, .toggle { flex: 1 1 calc(50% - 5px); min-width: 0; }
  .select span { font-size: 10px; }
  .select select { flex: 1; min-width: 0; width: 100%; text-overflow: ellipsis; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card__name { font-size: 14px; }
  .card__meta { flex-direction: column; align-items: flex-start; gap: 2px; font-size: 12px; }
  .modal__card { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; overflow-y: auto; }
  .modal__media { min-height: 240px; border-right: 0; border-bottom: 1px solid var(--line); }
  .modal__media img { max-height: 240px; }
  .modal__body { overflow: visible; padding: 22px 18px; }
  .modal__body h2 { font-size: 26px; }
  .modal__nav { top: 140px; }
  .mobnav { padding: 0 16px; }
  .progress-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .pcard { flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px; }
  .pcard__ring, .pcard__sub { display: none; }
  .pcard__label { font-size: 9px; white-space: normal; line-height: 1.25; min-height: 2.5em; }
  .pcard__num { font-size: 18px; }
  .pcard__num small { font-size: 11px; }
  .coltabs { flex-wrap: nowrap; overflow-x: auto; gap: 0; scrollbar-width: none; }
  .coltab { padding: 10px 8px; font-size: 13px; white-space: nowrap; flex: none; }
  .howto-dd__btn { padding: 12px; gap: 10px; }
  .howto-dd__icon { width: 34px; height: 34px; font-size: 17px; }
  .howto-dd__txt b { font-size: 16px; }
  .howto-dd__panel { padding: 14px 12px; }
  .timeline li { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
  .timeline li::before { left: 13px; top: 28px; }
  .timeline__n { width: 28px; height: 28px; font-size: 13px; }
  .timeline__txt { font-size: 14px; padding-top: 3px; }
  .track { grid-template-columns: auto 64px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .track__thumb { width: 64px; height: 64px; }
  .track__check { padding-top: 18px; }
  .track__top h3 { font-size: 16px; }
  .track__sum { font-size: 14px; }
  .groups { grid-template-columns: minmax(0, 1fr); }
  .mapgrid { grid-template-columns: minmax(0, 1fr); }
  .mapdlg__hero { height: 170px; }
  .mapdlg__title { left: 16px; right: 56px; bottom: 10px; }
  .mapdlg__title h2 { font-size: 26px; }
  .mapdlg__nav { top: 66px; }
  .mapdlg__body { padding: 12px 14px 18px; gap: 16px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mskins { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mobnav a { padding: 10px 14px; font-size: 13px; }
  .mobnav { padding: 0 16px 4px; }
  .seasonpanel { padding: 14px; }
  .season__icon { width: 60px; height: 60px; }
  .season__title h2 { font-size: 24px; }
  .rcard { width: 128px; }
  .rcard__img { height: 92px; }
  .tcell--empty { width: 128px; }
  .track { --cardh: 212px; }
  .tracknav { display: none; }
  .mapchips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles, .tiles--lg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles--lg .tile__img { height: 118px; }
  .grid.grid--items { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .grid--items .card__body { padding: 8px 8px 10px; }
  .grid--items .card__name { font-size: 12px; }
  .grid--items .card__meta { font-size: 11px; }
  .grid--items .badge--sec { font-size: 9px; padding: 2px 5px; top: 6px; left: 6px; }
  .modal__nav--next { left: auto; right: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
