:root {
  color-scheme: dark;
  --ink: #f2f7ff;
  --muted: #b1c8e4;
  --page: #172945;
  --paper: #203956;
  --line: #48698e;
  --violet: #2568be;
  --mint: #234d50;
  --teal: #a9f5db;
  --berry: #ffc1cc;
  font-family: 'Avenir Next', system-ui, sans-serif;
}
* { box-sizing: border-box }
[hidden] { display: none !important }
body {
  margin: 0;
  padding-bottom: calc(98px + env(safe-area-inset-bottom));
  isolation: isolate;
  background: var(--page);
  color: var(--ink);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 1px 1px, #82bcf32c 1px, transparent 1.6px) 0 0 / 17px 17px, var(--page);
}
button, input, select { font: inherit }
button { cursor: pointer }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #6b5bd7;
  outline-offset: 2px;
}
.appShell { width: min(1120px, calc(100% - 32px)); margin: 22px auto 0 }
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "title art";
  align-items: center;
  overflow: hidden;
  min-height: 280px;
  padding: 18px 24px;
  border-radius: 26px;
  border: 2px solid #4576a9;
  background:
    radial-gradient(ellipse at 75% 45%, #286599 0, #1b436c 32%, transparent 65%),
    linear-gradient(125deg, #152947, #183a60);
  box-shadow: 0 5px 0 #0f2037, 0 10px 22px #204a7624;
}
.heroArt {
  grid-area: art;
  justify-self: center;
  position: relative;
  width: min(100%, 365px);
  aspect-ratio: 1.7;
}
.heroCard {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 31%;
  aspect-ratio: 5 / 7;
  display: grid;
  align-items: end;
  text-align: center;
  color: white;
  padding: 8px 3px;
  border: 2px solid #b2c6eb;
  border-radius: 7%;
  overflow: hidden;
  box-shadow: 0 8px 16px #071628c9;
  font-size: clamp(9px, 2vw, 13px);
  font-weight: 800;
  background: radial-gradient(circle at 45% 43%, #ffffff38, transparent 30%), linear-gradient(145deg, #9a659f, #294572);
}
.heroCardLeft { transform: translate(-130%, -45%) rotate(-14deg) }
.heroCardRight { transform: translate(30%, -45%) rotate(14deg); background-color: #424b8c }
.heroCardCenter {
  transform: translate(-50%, -53%);
  border-color: #e4d5a7;
  background: radial-gradient(circle at 45% 43%, #ffedab55, transparent 31%), linear-gradient(145deg, #9d7a32, #325888);
}
.heroCard img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.heroTitle { grid-area: title; display: grid; justify-items: center; gap: 6px; text-align: center; color: white }
.hero h1 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(5px, 1.4vw, 14px);
  margin: 0;
  line-height: 1;
  white-space: nowrap;
}
.anniversaryMark {
  font-size: clamp(40px, 9vw, 72px);
  font-weight: 950;
  letter-spacing: -.09em;
}
.anniversaryMark sup {
  margin-left: .2em;
  font-size: .39em;
  vertical-align: super;
  letter-spacing: 0;
}
.anniversaryName {
  font-size: clamp(15px, 3.5vw, 29px);
  font-weight: 900;
  letter-spacing: .055em;
  text-transform: uppercase;
}
@supports (background-clip: text) {
  .anniversaryMark, .anniversaryName {
    color: transparent;
    background: linear-gradient(174deg, #ffffff 10%, #c9e7ff 45%, #8ab3de 52%, #e3d9fa 92%);
    background-clip: text;
  }
}
.hero p {
  margin: 0;
  color: #b9d7f2;
  font-size: clamp(10px, 1.5vw, 13px);
  font-weight: 800;
  letter-spacing: .065em;
  text-transform: uppercase;
}
.collectionPanel {
  margin: 16px 0 26px;
  padding: clamp(12px, 3vw, 22px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
}
.topNav, .stats { display: grid; gap: 8px }
.topNav { grid-template-columns: repeat(2, minmax(0, 1fr)) }
.setTab {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 12px;
  min-height: 48px;
  padding: 10px 14px;
  text-align: left;
  font-weight: 750;
  color: var(--ink);
  background: #294769;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.setTab small { white-space: nowrap; font-weight: 650 }
.setTab.active { background: var(--violet); color: white; border-color: var(--violet) }
.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 12px 0 }
.stat {
  border-radius: 12px;
  padding: 10px 12px;
  background: linear-gradient(160deg, var(--stat-tint), #203653 72%);
  border: 1px solid var(--stat-edge);
  box-shadow: inset 0 1px #ffffff17;
}
.stat b { display: block; font-size: clamp(21px, 4vw, 30px); letter-spacing: -.04em }
.stat span { font-size: 12px; font-weight: 700; color: var(--muted) }
.ownedStat {
  --stat-tint: #2a4e59;
  --stat-edge: #46747c;
  color: #aff1df;
}
.missingStat {
  --stat-tint: #3b3d64;
  --stat-edge: #61618e;
  color: #e0d1ff;
}
.completeStat {
  --stat-tint: #2e4d72;
  --stat-edge: #4d719b;
  color: #c7e5ff;
}
.collectionPanel {
  --set-progress: #57d6f6;
  --set-percentage: #b5efff;
}
.collectionPanel:has(#set2Btn.active) {
  --set-progress: #b393fa;
  --set-percentage: #e0d1ff;
}
.completeStat b { color: var(--set-percentage) }
.progress { overflow: hidden; height: 7px; background: #182c48; border-radius: 999px }
.bar { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #225ca8, var(--set-progress)) }
.progressText { font-size: 12px; color: var(--muted); margin-top: 6px }
.dashboard { display: grid; grid-template-columns: 246px minmax(0, 1fr); gap: 16px; align-items: start }
.filterPanel { border: 1px solid var(--line); background: var(--paper); border-radius: 18px }
#filterToggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  padding: 14px 15px;
  border-radius: inherit;
}
.filterChevron { color: #c2d9f2; font-size: 18px }
.filterDropdown { display: none; padding: 0 14px 14px }
.filterDropdown.open { display: grid; gap: 12px }
.filterBlock label, .toolLabel { display: block; font-size: 12px; font-weight: 750; color: var(--muted); margin-bottom: 5px }
.filterBlock select, .filterBlock input {
  width: 100%;
  min-height: 44px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #172e4d;
  color: var(--ink);
}
.segmented, .utilityActions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px }
.segmented button, .clearFilters, .btn {
  min-height: 44px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}
.segmented button.active { background: var(--violet); border-color: var(--violet); color: white }
.utilityActions { padding-top: 12px; border-top: 1px solid var(--line) }
.toolLabel { grid-column: 1 / -1 }
.utilityActions .btn:last-of-type { color: var(--berry) }
.sectionTitle, .promoTitle {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  margin: 0 0 11px;
  font-size: clamp(19px, 3vw, 24px);
  font-weight: 850;
  letter-spacing: -.035em;
}
.sectionTitle span, .promoTitle span { font-size: 12px; color: var(--muted); font-weight: 650; letter-spacing: 0 }
#list, #promos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px }
.promoTable { margin-top: 34px; scroll-margin-top: 16px }
.groupTitle {
  grid-column: 1 / -1;
  padding: 9px 12px;
  background: #294a71;
  border-radius: 10px;
  color: #d7eaff;
  font-weight: 750;
  font-size: 13px;
}
.card {
  min-width: 0;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  min-height: 119px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 9px;
  background: var(--paper);
  box-shadow: 0 2px 6px #4854780a;
}
.card .pic, .fallback {
  grid-area: image;
  display: block;
  width: 100%;
  aspect-ratio: 5 / 7;
  object-fit: contain;
  border-radius: 5px;
  background: #192f50;
}
.fallback { display: grid; place-items: center; padding: 3px; text-align: center; font-size: 11px; color: var(--muted) }
.pic { cursor: zoom-in }
.tableRow {
  grid-template-rows: 1fr auto auto 1fr;
  grid-template-areas: "image . owned" "image number owned" "image name owned" "image rarity owned";
  row-gap: 3px;
}
.promo { grid-template-areas: "image name owned" }
.num { grid-area: number; font-size: 11px; font-weight: 750; color: var(--muted) }
.info { grid-area: name; min-width: 0 }
.name { font-size: 15px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere }
.note { margin-top: 4px; font-size: 11px; color: var(--muted) }
.rarityCell, .tag {
  justify-self: start;
  align-self: start;
  border-radius: 7px;
  padding: 3px 6px;
  background: #2a4a70;
  color: #d7eaff;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.25;
}
.rarityCell { grid-area: rarity }
.tag { display: inline-block; margin-top: 4px; color: var(--berry); background: #52364e }
.rarityDot { display: none }
.ownedCell, .promo .check { grid-area: owned }
.check {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid #6585aa;
  border-radius: 12px;
  color: var(--teal);
  background: #263e61;
  font-size: 21px;
  font-weight: 800;
}
.check.on { border-color: #60c7ad; background: var(--mint) }
.modal { display: none; position: fixed; inset: 0; z-index: 20; align-items: center; justify-content: center; background: #272449de; padding: 16px }
.modal.show { display: flex }
.modal img { max-width: 100%; max-height: 90dvh; border-radius: 10px; object-fit: contain }
footer {
  position: fixed;
  z-index: 9;
  inset: auto 0 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px calc(7px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #1c3352f7;
  backdrop-filter: blur(10px);
}
.footerbtn { flex: 1; max-width: 165px; min-height: 44px; border: 0; border-radius: 12px; color: var(--muted); background: transparent; font-weight: 750; font-size: 13px }
.footerbtn.active { color: #dbeeff; background: #2a4a70 }
#backToTop {
  position: fixed;
  z-index: 10;
  right: 16px;
  bottom: calc(72px + env(safe-area-inset-bottom));
  visibility: hidden;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  color: white;
  background: var(--violet);
  box-shadow: 0 3px 10px #42428d45;
  font-size: 21px;
}
#backToTop.show { visibility: visible }
@media (max-width: 920px) { .dashboard { grid-template-columns: minmax(0, 1fr) } }
@media (max-width: 640px) {
  .appShell { width: calc(100% - 24px); margin-top: 12px }
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas: "art" "title";
    min-height: 0;
    gap: 4px;
    padding: 10px 8px 14px;
    border-radius: 21px;
    background: radial-gradient(ellipse at 50% 32%, #285e91, transparent 68%), linear-gradient(140deg, #152947, #183a60);
  }
  .heroArt { width: min(100%, 285px) }
  .collectionPanel { margin-bottom: 10px }
  .dashboard { gap: 10px }
  .setTab { padding-inline: 9px; font-size: 13px }
  .stat { padding-inline: 8px }
  #list, #promos { grid-template-columns: minmax(0, 1fr) }
}
.emptyResult {
  grid-column: 1 / -1;
  margin: 0;
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
}

.collectionPanel {
  margin-top: 12px;
  border-radius: 20px;
  box-shadow: 0 3px 0 #101f35;
}
.setTab {
  display: grid;
  grid-template-columns: 21px minmax(0, 1fr);
  gap: 2px 8px;
  align-content: center;
  min-height: 57px;
  box-shadow: 0 2px 0 #132843;
}
.setTab small { grid-column: 2 }
.setBall, .navBall {
  display: inline-block;
  width: 20px;
  height: 20px;
  position: relative;
  border: 2px solid #13365c;
  border-radius: 50%;
  background: linear-gradient(#ee5961 0 43%, #13365c 43% 57%, #f4f8ff 57%);
}
.setBall { grid-row: 1 / 3 }
.setBall::after, .navBall::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid #13365c;
  background: white;
}
.card {
  border-left: 4px solid #77b6ec;
  box-shadow: 0 2px 0 #142942;
}
.card:has(.check.on) { border-left-color: #43a791 }
.promo { border-left-color: #e679a0 }
.filterPanel { box-shadow: 0 2px 0 #101f35 }
footer { border-top: 3px solid #42658a }
.footerbtn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  min-height: 52px;
}
.navSymbol { flex: none }
.navMissing {
  width: 15px;
  height: 15px;
  border: 2px dashed #8bc8ff;
  border-radius: 50%;
}
.navPromo {
  width: 19px;
  height: 19px;
  background: #ff8cae;
  clip-path: polygon(50% 0, 64% 33%, 100% 50%, 64% 67%, 50% 100%, 36% 67%, 0 50%, 36% 33%);
}
#backToTop { bottom: calc(82px + env(safe-area-inset-bottom)) }
.heroCard::before {
  content: "";
  position: absolute;
  top: 40%;
  left: 50%;
  width: 43%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid #e4edff8c;
  background: radial-gradient(circle, #e4edffbb 0 10%, #617aa6 11% 17%, transparent 18%),
    linear-gradient(transparent 46%, #e4edff8c 47% 53%, transparent 54%);
}

/* Shared bevel and lighting for tappable controls. */
:is(.setTab, .footerbtn, .check, #filterToggle, .segmented button, .clearFilters, .btn, #backToTop) {
  background: linear-gradient(155deg, var(--button-shine, #ffffff08), transparent 46%),
    linear-gradient(180deg, var(--button-top, #304966), var(--button-bottom, #203653));
  border: 1px solid var(--button-edge, #52759b);
  box-shadow: inset 0 1px var(--button-bevel, #ffffff20), inset 0 -1px #070f264a,
    0 2px var(--button-base, #0d213a), 0 4px 7px #0a172b59,
    0 0 13px var(--button-glow, transparent);
}
.setTab.active, .footerbtn.active, .segmented button.active {
  --button-shine: #ffffff20;
  --button-bevel: #ffffff45;
}
.segmented button.active, #backToTop {
  --button-top: #347dcc;
  --button-bottom: #1b4c97;
  --button-edge: #6099d4;
  --button-base: #13315e;
}
#set1Btn.active {
  --button-top: #197f9c;
  --button-bottom: #135271;
  --button-edge: #81defa;
  --button-base: #103d56;
  --button-glow: #49d9ff91;
}
#set2Btn.active {
  --button-top: #7859c4;
  --button-bottom: #4c378e;
  --button-edge: #c8b2ff;
  --button-base: #342460;
  --button-glow: #ac86ff91;
}
.footerbtn.active {
  --button-top: #4176ac;
  --button-bottom: #27486e;
  --button-edge: #77a4d1;
}
.check {
  --button-top: #2b4364;
  --button-bottom: #1a2b46;
}
.check.on { --button-edge: #569c91 }
#filterToggle { border-radius: 17px }
:is(.setTab, .footerbtn, .check, #filterToggle, .segmented button, .clearFilters, .btn, #backToTop):active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 5px #0a172b85, 0 1px var(--button-base, #0d213a);
}

button.stat {
  font: inherit;
  color: inherit;
  text-align: inherit;
}
button.stat[aria-pressed="true"] {
  border-color: #8bc8ff;
  box-shadow: inset 0 1px #ffffff28, 0 0 12px #8bc8ff45;
}
button.stat:focus-visible {
  outline: 2px solid #8bc8ff;
  outline-offset: 2px;
}

/* Single collection dashboard */
.collectionPanel .dashboardStats { margin-top: 0; }
