/* Outfit (SIL Open Font License) is bundled with the site: no request to Google Fonts. */
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 100 600; font-display: swap; src: url(assets/fonts/Outfit-Regular.woff) format("woff"); }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 700 900; font-display: swap; src: url(assets/fonts/Outfit-Bold.woff) format("woff"); }
/* ==========================================================
   Slayers 2 Unofficial Values — styles
   Big, bold, clean. Everything scales from the root font size.
   ========================================================== */
:root {
  --bg: #41424d;
  --surface: #1f2024;
  --surface-2: #2c2d34;
  --surface-3: #3a3b44;
  --line: rgba(255, 255, 255, .08);
  --text: #fff;
  --muted: #a3a5b0;
  --pink: #3ea6f2;
  --pink-2: #6571ff;
  --violet: #4f5bf0;
  /* --pink is now the accent blue */
  --grad: linear-gradient(135deg, #4f5bf0 0%, #6571ff 100%);
  --grad-tile: linear-gradient(135deg, #3b82c4, #4f5bf0);
  --win: #3ddc97;
  --lose: #ff5470;
  --fair: #ffc857;
  --glow: 0 10px 34px rgba(79, 91, 240, .42);
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --max: 84rem;
  --gut: clamp(1.1rem, 3.2vw, 2.4rem);
  --nav-h: 3.9rem;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #e8e9f0;
  --surface: #fff;
  --surface-2: #eef0f6;
  --surface-3: #e0e3ee;
  --line: rgba(30, 10, 60, .1);
  --text: #17121f;
  --muted: #6a6479;
  --shadow: 0 18px 50px rgba(60, 20, 100, .14);
  color-scheme: light;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

html {
  font-size: clamp(15px, .45vw + 11.4px, 18.5px);
  /* bigger, "zoomed in" type on desktop */
  font-size: clamp(16px, 1.1vw + 5.5px, 23px);
  /* comfortable, large gaming-hub scale on desktop */
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 2rem);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .35s, color .35s;
}

a {
  color: inherit;
  text-decoration: none
}

button,
select,
input {
  font: inherit;
  color: inherit
}

button {
  cursor: pointer
}

img {
  display: block;
  max-width: 100%
}

:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
  border-radius: .6rem
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0)
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gut)
}

.hide-sm {
  display: inline
}

/* ambient background */
.ambient {
  display: none;
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none
}

.ambient i {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .34;
  animation: drift 22s ease-in-out infinite alternate
}

.ambient i:nth-child(1) {
  width: 46rem;
  height: 46rem;
  background: #ff3d86;
  top: -16rem;
  left: -12rem
}

.ambient i:nth-child(2) {
  width: 40rem;
  height: 40rem;
  background: #6a4bff;
  bottom: -14rem;
  right: -10rem;
  animation-duration: 28s;
  animation-delay: -8s
}

.ambient i:nth-child(3) {
  width: 26rem;
  height: 26rem;
  background: #ff7a3d;
  top: 38%;
  left: 46%;
  opacity: .14;
  animation-duration: 34s
}

:root[data-theme="light"] .ambient i {
  opacity: .18
}

@keyframes drift {
  to {
    transform: translate(7rem, 5rem) scale(1.18)
  }
}

/* ============== NAV (big + bold black pill) ============== */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: .8rem var(--gut) 0;
  pointer-events: none
}

.nav-in {
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  max-width: min(100%, 50rem);
  margin: 0 auto;
  height: var(--nav-h);
  padding: 0 1.1rem 0 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--surface);
  border-radius: 999px;
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  max-width: min(100%, 54rem);
  margin: 0 auto;
  height: var(--nav-h);
  padding: 0 1.2rem 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--surface);
  border-radius: 999px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .32);
}

.logo {
  display: inline-flex;
  flex: none;
  transition: transform .35s var(--spring)
}

.logo img {
  height: 2.7rem;
  width: auto
}

.logo:hover {
  transform: scale(1.08) rotate(-3deg)
}

.logo:active {
  transform: scale(.94)
}

.nav-links {
  display: flex;
  gap: .6rem;
  margin-inline: auto;
  position: relative
}

.nav-links a {
  position: relative;
  z-index: 1;
  font-weight: 800;
  font-size: 1.1rem;
  padding: .5rem 1.1rem;
  color: var(--text);
  transition: color .25s, transform .2s;
  white-space: nowrap
}

.nav-links a:hover {
  color: var(--pink)
}

.nav-links a:active {
  transform: scale(.95)
}

.nav-links a[aria-current="page"] {
  color: var(--pink)
}

.nav-ind {
  position: absolute;
  bottom: .3rem;
  left: 0;
  width: 0;
  height: 3px;
  border-radius: 4px;
  background: var(--pink);
  transition: transform .5s var(--ease), width .5s var(--ease)
}

.theme-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .4rem 1rem .4rem .4rem;
  font-weight: 700;
  font-size: 1rem;
  transition: background .2s, transform .2s var(--spring);
}

.theme-btn:hover {
  background: var(--surface-2);
  transform: translateY(-2px)
}

.theme-btn:active {
  transform: scale(.95)
}

.theme-btn .ico {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--grad);
  display: grid;
  place-items: center;
  color: #fff
}

.theme-btn svg {
  width: 1.2rem;
  height: 1.2rem
}

.theme-btn .ico.spin {
  animation: spin .6s var(--ease)
}

.sun {
  display: none
}

:root[data-theme="light"] .sun {
  display: block
}

:root[data-theme="light"] .moon {
  display: none
}

@keyframes spin {
  from {
    transform: rotate(-200deg) scale(.5)
  }
}

/* ============== shared pieces ============== */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
  font-size: 1.15rem;
  padding: .95rem 1.6rem;
  transition: transform .25s var(--spring), background .2s, box-shadow .25s, border-color .2s;
}

.btn:hover {
  transform: translateY(-3px);
  background: var(--surface-3)
}

.btn:active {
  transform: scale(.96)
}

.btn svg {
  width: 1.3rem;
  height: 1.3rem;
  flex: none
}

.btn.primary {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--glow)
}

.btn.primary:hover {
  box-shadow: 0 14px 44px rgba(79, 91, 240, .6);
  background: var(--grad)
}

.btn.primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .4) 50%, transparent 65%);
  transform: translateX(-120%)
}

.btn.primary:hover::after {
  transform: translateX(120%);
  transition: transform .8s var(--ease)
}

.btn {
  white-space: nowrap
}

.btn.lg {
  font-size: 1.35rem;
  padding: 1rem 2rem
}

.btn.sm {
  font-size: 1rem;
  padding: .65rem 1.15rem
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .4);
  transform: scale(0);
  animation: ripple .7s ease-out forwards;
  pointer-events: none
}

@keyframes ripple {
  to {
    transform: scale(1);
    opacity: 0
  }
}

.tile {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: .95rem;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--grad-tile);
  color: #fff;
  font-weight: 900;
  font-size: 1.6rem;
  box-shadow: 0 6px 18px rgba(79, 91, 240, .35);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .9rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .9rem;
  background: var(--surface-2);
  white-space: nowrap
}

.pill.up {
  color: var(--win);
  background: rgba(61, 220, 151, .13)
}

.pill.down {
  color: var(--lose);
  background: rgba(255, 84, 112, .13)
}

.pill.flat {
  color: var(--muted)
}

.pill.hyped {
  color: #ffc857;
  background: rgba(255, 200, 87, .16)
}

.pill.over {
  color: #ff6b4a;
  background: rgba(160, 40, 20, .35)
}

.eyebrow {
  display: inline-block;
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: .5rem
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent
}

/* views + page-in */
.view[hidden] {
  display: none
}

.view {
  animation: viewIn .6s var(--ease) both
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(18px)
  }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: calc(var(--i, 0)*90ms)
}

.reveal.in {
  opacity: 1;
  transform: none
}

.no-js-reveal .reveal {
  opacity: 1;
  transform: none
}

/* page header (values + calculator) */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 3rem 0 1.8rem
}

.page-head h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.02em
}

.page-head .sub {
  color: var(--muted);
  font-size: 1.2rem;
  margin-top: .7rem;
  max-width: 36rem
}

.head-actions {
  display: flex;
  gap: .7rem;
  flex-wrap: wrap;
  align-items: center
}

/* ============== HOME ============== */
.hero {
  position: relative;
  text-align: center;
  padding: clamp(.8rem, 3vh, 2rem) 0 clamp(1.5rem, 4vh, 3rem);
  display: flex;
  flex-direction: column;
  align-items: center
}

.hero-logo {
  width: min(42rem, 94%, calc(31vh*2.83));
  height: auto;
  animation: logoIn 1s var(--ease) both, float 6s ease-in-out 1s infinite;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .4))
}

.hero {
  position: relative;
  text-align: center;
  padding: clamp(.8rem, 2.5vh, 2rem) 0 clamp(1.2rem, 3.2vh, 2.5rem);
  display: flex;
  flex-direction: column;
  align-items: center
}

.hero-logo {
  width: min(46rem, 94%, calc(36vh*2.83));
  height: auto;
  animation: logoIn 1s var(--ease) both, float 6s ease-in-out 1s infinite;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .4))
}

@keyframes logoIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(.9)
  }
}

@keyframes float {
  50% {
    transform: translateY(-12px)
  }
}

.tagline {
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  font-weight: 600;
  color: var(--muted);
  margin-top: 1.1rem;
  max-width: 40rem;
  text-wrap: balance;
  line-height: 1.25;
  animation: up .8s var(--ease) .25s both
}

.tagline {
  font-size: clamp(1.35rem, 2.2vw, 1.95rem);
  font-weight: 600;
  color: var(--muted);
  margin-top: 1.1rem;
  max-width: 46rem;
  text-wrap: balance;
  line-height: 1.25;
  animation: up .8s var(--ease) .25s both
}

.tagline em {
  font-style: normal;
  font-weight: 900;
  color: var(--text);
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent
}

.cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.5rem;
  animation: up .8s var(--ease) .4s both
}

.cta-row {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.5rem;
  animation: up .8s var(--ease) .4s both
}

.cta-row .go {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #fff;
  color: var(--pink);
  transition: transform .3s var(--spring)
}

.cta-row .btn:hover .go {
  transform: translateX(6px)
}

.cta-row .go svg {
  width: 1.3rem;
  height: 1.3rem
}

@keyframes up {
  from {
    opacity: 0;
    transform: translateY(24px)
  }
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2.4rem;
  width: min(46rem, 100%);
  animation: up .8s var(--ease) .55s both
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  padding: 1.1rem 1rem
}

.stat b {
  display: block;
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1.1
}

.stat span {
  color: var(--muted);
  font-weight: 600;
  font-size: .95rem
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  margin-top: 2.2rem;
  width: min(50rem, 100%);
  animation: up .8s var(--ease) .55s both
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  padding: 1.15rem 1.2rem
}

.stat b {
  display: block;
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.1
}

.stat span {
  color: var(--muted);
  font-weight: 600;
  font-size: 1rem
}

.home-sec {
  margin-top: clamp(3rem, 8vh, 5.5rem)
}

.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.4rem
}

.sec-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 900;
  letter-spacing: -.01em
}

.link {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--pink);
  position: relative
}

.link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease)
}

.link:hover::after {
  transform: scaleX(1)
}

.top-grid,
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem
}

.top-card,
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.8rem;
  padding: 1.7rem;
  transition: transform .35s var(--spring), box-shadow .35s, border-color .3s
}

.top-card {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  position: relative;
  overflow: hidden
}

.top-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0, rgba(79, 91, 240, .2), transparent 60%);
  opacity: 0;
  transition: opacity .35s
}

.top-card:hover,
.step:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
  border-color: rgba(79, 91, 240, .45)
}

.top-card:hover::before {
  opacity: 1
}

.tc-top {
  display: flex;
  justify-content: space-between;
  align-items: center
}

.rank {
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--pink)
}

.tc-main {
  display: flex;
  align-items: center;
  gap: 1rem
}

.tc-name {
  font-size: 1.5rem;
  font-weight: 800;
  min-width: 0;
  line-height: 1.15
}

.tc-name small {
  display: block;
  font-size: .95rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: .2rem
}

.tc-val {
  font-size: 3.6rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.02em
}

.tc-val small {
  font-size: 1rem;
  font-weight: 700;
  color: var(--muted);
  margin-left: .6rem;
  letter-spacing: 0
}

.top-card:hover .tile,
.step:hover .tile {
  transform: rotate(-8deg) scale(1.12)
}

.top-card .tile,
.step .tile {
  transition: transform .35s var(--spring)
}

.top-card .tile {
  width: 3.6rem;
  height: 3.6rem
}

.step .tile {
  width: 3.4rem;
  height: 3.4rem;
  margin-bottom: 1.1rem
}

.step h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: .4rem
}

.step p {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.45
}

/* ============== VALUES ============== */
.toolbar {
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
  margin-bottom: 1rem
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 14rem
}

.search-wrap svg {
  position: absolute;
  left: 1.3rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.3rem;
  height: 1.3rem;
  color: var(--muted);
  pointer-events: none;
  transition: color .2s
}

.search-wrap:focus-within svg {
  color: var(--pink)
}

.search {
  width: 100%;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 1rem 1.4rem 1rem 3.4rem;
  font-size: 1.2rem;
  font-weight: 600;
  transition: border-color .2s, box-shadow .2s;
}

.search::placeholder {
  color: var(--muted);
  font-weight: 500
}

.search:focus {
  outline: 0;
  border-color: var(--pink);
  box-shadow: 0 0 0 5px rgba(79, 91, 240, .18)
}

.sort {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 1rem 1.6rem;
  font-size: 1.1rem;
  font-weight: 700
}

.sort:focus {
  outline: 0;
  border-color: var(--pink)
}

.pills {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem
}

.chip {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: .6rem 1.35rem;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--muted);
  transition: all .25s var(--spring);
}

.chip:hover {
  color: var(--text);
  transform: translateY(-2px)
}

.chip:active {
  transform: scale(.94)
}

.chip[aria-pressed="true"] {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--glow)
}

.list-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2rem;
  padding: 1.4rem 1.6rem .8rem;
  margin-bottom: 2.5rem
}

.list-head {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .2rem .2rem 1rem
}

.list-head h2 {
  font-size: 1.7rem;
  font-weight: 900
}

.count {
  background: var(--surface-2);
  color: var(--muted);
  padding: .3rem .95rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem
}

.count.bump {
  animation: bump .4s var(--spring)
}

@keyframes bump {
  40% {
    transform: scale(1.25)
  }
}

.row {
  display: grid;
  grid-template-columns: 2.2rem 3.4rem 1fr auto minmax(7rem, auto);
  align-items: center;
  gap: 1.1rem;
  padding: .85rem 1rem;
  margin: 0 -1rem;
  border-radius: 1.3rem;
  transition: background .2s, transform .3s var(--spring);
  animation: rowIn .5s var(--ease) backwards;
  animation-delay: calc(var(--i, 0)*35ms);
}

.row:hover {
  background: var(--surface-2);
  transform: translateX(6px)
}

.row .no {
  font-weight: 800;
  color: var(--muted);
  text-align: center;
  font-size: 1rem
}

.row .tile {
  width: 3.4rem;
  height: 3.4rem
}

.row .name {
  font-size: 1.4rem;
  font-weight: 800;
  min-width: 0
}

.row .name small {
  display: block;
  font-size: .95rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: .1rem
}

.row .val {
  font-size: 1.7rem;
  font-weight: 900;
  text-align: right
}

@keyframes rowIn {
  from {
    opacity: 0;
    transform: translateY(14px)
  }
}

.empty {
  padding: 3rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 1.3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem
}

.note {
  color: var(--muted);
  font-size: .95rem;
  margin: 0 0 2.5rem;
  text-align: center
}

/* ============== CALCULATOR ============== */
.trade {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: stretch
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 26rem;
  transition: border-color .3s, box-shadow .3s;
}

.panel.flash {
  animation: flash .7s var(--ease)
}

@keyframes flash {
  30% {
    box-shadow: 0 0 0 6px rgba(79, 91, 240, .35)
  }
}

.panel-head {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-bottom: 1rem
}

.panel-head h2 {
  font-size: 1.7rem;
  font-weight: 900
}

.tag {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: .9rem;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.5rem;
  color: #fff
}

.tag.l {
  background: linear-gradient(135deg, #ff5470, #ff3d86)
}

.tag.w {
  background: linear-gradient(135deg, #3ddc97, #2bb7a0)
}

.panel-head .add-side {
  margin-left: auto
}

.drop {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 1.4rem;
  transition: background .3s
}

.hint {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  border: 2px dashed var(--line);
  border-radius: 1.4rem;
  color: var(--muted);
  font-weight: 700;
  font-size: 1.15rem;
  text-align: center;
  padding: 1rem;
  transition: opacity .3s, transform .3s var(--ease);
}

.hint svg {
  width: 2.6rem;
  height: 2.6rem;
  opacity: .6;
  animation: float 4s ease-in-out infinite
}

.drop.has-items .hint {
  opacity: 0;
  transform: scale(.96);
  pointer-events: none
}

.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: calc(.9rem*var(--s, 1));
  align-content: flex-start;
  width: 100%;
  padding: .2rem 0
}

.drop[data-d="1"] {
  --s: 1
}

.drop[data-d="2"] {
  --s: .86
}

.drop[data-d="3"] {
  --s: .72
}

.drop[data-d="4"] {
  --s: .6
}

.item {
  position: relative;
  width: calc(9.2em);
  flex: none;
  font-size: calc(1rem*var(--s, 1));
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 1.3em;
  padding: 1em .6em .8em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .45em;
  text-align: center;
  transition: box-shadow .3s, border-color .3s;
  transform-origin: top left;
}

.item:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, .3);
  border-color: rgba(79, 91, 240, .5)
}

.item.enter {
  animation: itemIn .55s var(--spring)
}

.item.leave {
  animation: itemOut .22s ease forwards
}

@keyframes itemIn {
  from {
    opacity: 0;
    transform: scale(.4) translateY(20px)
  }
}

@keyframes itemOut {
  to {
    opacity: 0;
    transform: scale(.5)
  }
}

.item .tile {
  width: 2.8em;
  height: 2.8em;
  font-size: 1.5em;
  border-radius: .75rem
}

.item .sn {
  font-weight: 800;
  font-size: 1em;
  line-height: 1.15;
  width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 2.3em;
  display: flex;
  align-items: center;
  justify-content: center
}

.item .sv {
  font-weight: 900;
  font-size: 1.45em;
  line-height: 1
}

.item .sv small {
  display: block;
  font-size: .58em;
  font-weight: 600;
  color: var(--muted);
  margin-top: .25em
}

.item .sv.bump {
  animation: bump .35s var(--spring)
}

.qty {
  display: flex;
  align-items: center;
  gap: .35em;
  background: var(--surface-3);
  border-radius: 999px;
  padding: .2em
}

.qty span {
  font-weight: 800;
  font-size: .95em;
  min-width: 1.9em
}

.qty button {
  width: 1.75em;
  height: 1.75em;
  border-radius: 50%;
  border: 0;
  background: var(--surface-2);
  font-size: 1.05em;
  line-height: 1;
  font-weight: 800;
  transition: background .2s, transform .2s var(--spring), color .2s
}

.qty button:hover {
  background: var(--pink);
  color: #fff
}

.qty button:active {
  transform: scale(.8)
}

.item .rm {
  position: absolute;
  top: .4em;
  right: .4em;
  width: 1.7em;
  height: 1.7em;
  border-radius: 50%;
  border: 0;
  background: var(--surface-3);
  color: var(--muted);
  font-size: .8em;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .2s, transform .3s var(--spring), background .2s, color .2s
}

.item:hover .rm,
.rm:focus-visible {
  opacity: 1;
  transform: none
}

.rm:hover {
  background: var(--lose);
  color: #fff;
  transform: rotate(90deg) !important
}

@media (hover:none) {
  .item .rm {
    opacity: 1;
    transform: none
  }
}

.total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--muted)
}

.total b {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -.02em
}

.vs {
  align-self: center;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-weight: 900;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  box-shadow: var(--glow);
  animation: vsPulse 3s ease-in-out infinite
}

@keyframes vsPulse {
  50% {
    transform: scale(1.12)
  }
}

.result {
  margin-top: 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2rem;
  padding: 1.6rem 1.8rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.4rem;
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: border-color .4s, box-shadow .4s;
}

.result.w {
  border-color: rgba(61, 220, 151, .55);
  box-shadow: 0 0 50px rgba(61, 220, 151, .15)
}

.result.l {
  border-color: rgba(255, 84, 112, .55);
  box-shadow: 0 0 50px rgba(255, 84, 112, .15)
}

.result.f {
  border-color: rgba(255, 200, 87, .55);
  box-shadow: 0 0 50px rgba(255, 200, 87, .12)
}

.verdict {
  width: 6.2rem;
  height: 6.2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 3.2rem;
  color: #fff;
  background: var(--surface-3);
  transition: background .4s;
}

.result.w .verdict {
  background: linear-gradient(135deg, #3ddc97, #26b87c)
}

.result.l .verdict {
  background: linear-gradient(135deg, #ff5470, #e0334f)
}

.result.f .verdict {
  background: linear-gradient(135deg, #ffc857, #f0a52b);
  color: #2a1d00
}

.verdict.pop {
  animation: pop .6s var(--spring)
}

@keyframes pop {
  from {
    transform: scale(.3) rotate(-30deg)
  }

  60% {
    transform: scale(1.18) rotate(6deg)
  }
}

.result h3 {
  font-size: 2rem;
  font-weight: 900
}

.result p {
  color: var(--muted);
  font-size: 1.15rem;
  margin-top: .15rem
}

.balance {
  grid-column: 1/-1;
  width: 100%
}

.bal-bar {
  height: .9rem;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
  display: flex
}

.bal-bar i {
  display: block;
  height: 100%;
  transition: width .7s var(--ease)
}

.bal-bar i:first-child {
  background: linear-gradient(90deg, #ff5470, #ff3d86)
}

.bal-bar i:last-child {
  background: linear-gradient(90deg, #2bb7a0, #3ddc97)
}

.bal-lbl {
  display: flex;
  justify-content: space-between;
  margin-top: .5rem;
  font-weight: 700;
  font-size: .95rem;
  color: var(--muted)
}

.confetti {
  position: absolute;
  width: .6rem;
  height: .6rem;
  border-radius: 2px;
  pointer-events: none;
  left: 3.1rem;
  top: 50%
}

/* picker modal */
body.modal-open {
  overflow: hidden
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(6, 4, 12, .6);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 1.2rem;
  animation: fadeIn .25s ease
}

.modal[hidden] {
  display: none
}

.modal.closing {
  animation: fadeOut .2s ease forwards
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2rem;
  width: min(54rem, 100%);
  max-height: min(88vh, 50rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .6);
  animation: modalIn .45s var(--spring)
}

.modal.closing .modal-card {
  animation: modalOut .2s ease forwards
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center
}

.modal-head h3 {
  font-size: 1.9rem;
  font-weight: 900
}

.x {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  border: 0;
  background: var(--surface-2);
  font-size: 1.1rem;
  transition: background .2s, transform .3s var(--spring)
}

.x:hover {
  background: var(--lose);
  color: #fff;
  transform: rotate(90deg)
}

.seg {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface-2);
  border-radius: 999px;
  padding: .3rem
}

.seg button {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  font-weight: 800;
  font-size: 1.1rem;
  padding: .75rem 1rem;
  border-radius: 999px;
  color: var(--muted);
  transition: color .25s
}

.seg button[aria-pressed="true"] {
  color: #fff
}

.seg button em {
  font-style: normal;
  opacity: .8;
  font-weight: 700;
  margin-left: .3rem
}

.seg-thumb {
  position: absolute;
  top: .3rem;
  bottom: .3rem;
  left: .3rem;
  width: calc(50% - .3rem);
  border-radius: 999px;
  background: var(--grad);
  box-shadow: var(--glow);
  transition: transform .45s var(--ease)
}

.seg[data-side="theirs"] .seg-thumb {
  transform: translateX(100%)
}

.modal .search {
  padding: .85rem 1.4rem;
  font-size: 1.1rem;
  background: var(--surface-2)
}

.pk-tabs {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap
}

.pk-tabs .chip {
  font-size: .95rem;
  padding: .45rem 1.05rem
}

.pk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.6rem, 1fr));
  gap: .8rem;
  overflow: auto;
  padding: .4rem;
  margin: -.4rem;
  flex: 1;
  min-height: 10rem
}

.pk-item {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  padding: 1.1rem .6rem .9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  text-align: center;
  transition: transform .3s var(--spring), background .2s, box-shadow .3s, border-color .2s
}

.pk-item.anim {
  animation: rowIn .45s var(--ease) backwards;
  animation-delay: calc(var(--i, 0)*28ms)
}

.pk-item:hover {
  transform: translateY(-5px);
  background: var(--surface-3);
  border-color: rgba(79, 91, 240, .5);
  box-shadow: 0 14px 28px rgba(0, 0, 0, .28)
}

.pk-item:active,
.pk-item.tap {
  transform: scale(.92)
}

.pk-item .tile {
  width: 3.2rem;
  height: 3.2rem;
  font-size: 1.7rem;
  transition: transform .3s var(--spring)
}

.pk-item:hover .tile {
  transform: rotate(-8deg) scale(1.12)
}

.pn {
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.15
}

.pv {
  font-weight: 900;
  font-size: 1.35rem;
  color: var(--pink)
}

.pc {
  font-size: .85rem;
  color: var(--muted);
  font-weight: 600
}

.badge {
  position: absolute;
  top: .5rem;
  right: .5rem;
  background: var(--grad);
  color: #fff;
  font-size: .85rem;
  font-weight: 800;
  border-radius: 999px;
  padding: .15rem .6rem;
  animation: itemIn .35s var(--spring)
}

.modal-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-weight: 600;
  font-size: .95rem
}

@keyframes fadeIn {
  from {
    opacity: 0
  }
}

@keyframes fadeOut {
  to {
    opacity: 0
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(40px) scale(.92)
  }
}

@keyframes modalOut {
  to {
    opacity: 0;
    transform: translateY(16px) scale(.96)
  }
}

/* toasts */
.toasts {
  position: fixed;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  align-items: center;
  pointer-events: none
}

.toast {
  background: var(--text);
  color: var(--bg);
  font-weight: 800;
  padding: .8rem 1.5rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
  animation: toastIn .4s var(--spring)
}

.toast.out {
  animation: toastOut .25s ease forwards
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(.9)
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(10px)
  }
}

/* footer */
.foot {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  padding: 2rem 0 2.6rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: .95rem
}

.foot nav {
  display: flex;
  gap: 1.4rem;
  font-weight: 700
}

.foot nav a:hover {
  color: var(--pink)
}

/* theme circular reveal */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal
}

::view-transition-new(root) {
  z-index: 9999
}

/* ============== responsive ============== */
@media (max-width:980px) {
  .trade {
    grid-template-columns: 1fr
  }

  .vs {
    justify-self: center;
    margin: -.2rem 0
  }

  .top-grid,
  .steps {
    grid-template-columns: 1fr
  }

  .row {
    grid-template-columns: 3.4rem 1fr auto minmax(5.4rem, auto)
  }

  .row .no {
    display: none
  }
}

@media (max-width:720px) {
  :root {
    --nav-h: 4.6rem
  }

  .logo img {
    height: 3rem
  }

  .nav-in {
    gap: .6rem
  }

  .nav-links {
    gap: .2rem
  }

  .nav-links a {
    font-size: 1.05rem;
    padding: .6rem .8rem
  }

  .nav {
    padding-top: .6rem
  }

  .nav-in {
    padding: 0 .5rem 0 .9rem;
    gap: .4rem
  }

  .hide-sm {
    display: none
  }

  .theme-btn {
    padding: .4rem
  }

  .theme-btn .lbl {
    display: none
  }

  .stats {
    grid-template-columns: 1fr 1fr 1fr;
    gap: .6rem
  }

  .stat b {
    font-size: 1.5rem
  }

  .stat span {
    font-size: .8rem
  }

  .row {
    grid-template-columns: 3rem 1fr auto
  }

  .row .pill {
    display: none
  }

  .row .tile {
    width: 3rem;
    height: 3rem
  }

  .row .name {
    font-size: 1.2rem
  }

  .row .val {
    font-size: 1.4rem;
    text-align: right
  }

  .panel {
    min-height: 17rem
  }

  .btn.lg {
    font-size: 1.25rem;
    padding: 1rem 1.5rem
  }

  .result {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center
  }

  .head-actions {
    width: 100%
  }

  .head-actions .btn.lg {
    flex: 1
  }

  .modal {
    align-items: end;
    padding: 0
  }

  .modal-card {
    border-radius: 2rem 2rem 0 0;
    max-height: 92vh;
    width: 100%
  }
}

@media (max-width:420px) {
  .nav-links a {
    padding: .55rem .55rem;
    font-size: .95rem
  }

  .nav-links {
    gap: 0
  }

  .logo img {
    height: 2.6rem
  }
}

@media (prefers-reduced-motion:reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important
  }

  .reveal {
    opacity: 1;
    transform: none
  }
}

/* ===== item detail popup ===== */
.row {
  cursor: pointer
}

.modal-card.detail {
  position: relative;
  width: min(36rem, 100%);
  overflow-y: auto;
  gap: 1.1rem
}

.d-x {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2
}

.d-top {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding-right: 3rem
}

.d-top h3 {
  font-size: 1.9rem;
  font-weight: 900;
  line-height: 1.1
}

.tile.big {
  width: 4.6rem;
  height: 4.6rem;
  font-size: 2.1rem;
  flex: none
}

.d-cat {
  display: inline-block;
  margin-top: .35rem;
  color: var(--muted);
  font-weight: 700
}

.d-value {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  background: var(--surface-2);
  border-radius: 1.3rem;
  padding: 1rem 1.3rem
}

.d-value span {
  color: var(--muted);
  font-weight: 700
}

.d-value b {
  font-size: 2.4rem;
  font-weight: 900;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent
}

.dstats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: .7rem
}

.dstat {
  background: var(--surface-2);
  border-radius: 1.1rem;
  padding: .75rem 1rem
}

.dstat span {
  display: block;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: .15rem
}

.dstat b {
  font-size: 1.15rem;
  font-weight: 800
}

.dstat b.up {
  color: var(--win)
}

.dstat b.down {
  color: var(--lose)
}

.dstat b.hyped {
  color: var(--fair)
}

.dstat b.over {
  color: #ff6b4a
}

.dblock h4 {
  font-size: .95rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: .4rem
}

.dblock p {
  font-size: 1.1rem;
  line-height: 1.45;
  white-space: pre-line
}

.d-actions {
  display: flex;
  gap: .7rem;
  flex-wrap: wrap
}

.d-actions .btn {
  flex: 1;
  justify-content: center
}

#dt-body {
  display: flex;
  flex-direction: column;
  gap: 1.1rem
}

#dt-body>* {
  flex: none
}

/* ores unit labels */
.row .val small {
  display: block;
  font-size: .5em;
  font-weight: 600;
  color: var(--muted);
  margin-top: .1em
}

.d-value b small {
  font-size: .45em;
  font-weight: 700;
  -webkit-text-fill-color: var(--muted);
  color: var(--muted)
}

.row .val {
  white-space: nowrap
}

.row .val.txt {
  font-size: 1.25rem
}

.tc-val {
  white-space: nowrap
}

/* ---- tiers + extras ---- */
.tier-sel {
  width: 100%;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: .5rem .8rem;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  text-overflow: ellipsis
}

.tier-sel:focus {
  outline: 0;
  border-color: var(--pink)
}

.pk-item .tier-sel {
  margin-top: .3rem;
  font-size: .8rem;
  padding: .4rem .5rem
}

.pv small {
  font-size: .6em;
  font-weight: 700;
  color: var(--muted)
}

.d-tier {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--surface-2);
  border-radius: 1.3rem;
  padding: .8rem 1.3rem
}

.d-tier>span {
  color: var(--muted);
  font-weight: 700
}

.d-tier .tier-sel {
  width: auto;
  flex: 1;
  max-width: 20rem;
  font-size: 1rem;
  padding: .65rem 1rem
}

.d-calc {
  color: var(--muted);
  font-weight: 700;
  font-size: .95rem;
  margin: -.2rem 0 0;
  text-align: right
}

.tier-badge {
  font-size: .7em;
  font-weight: 800;
  color: #fff;
  background: var(--grad);
  border-radius: 999px;
  padding: .1rem .6rem;
  margin-top: -.2rem
}

.floor-note {
  background: rgba(255, 80, 60, .14);
  border: 1px solid rgba(255, 80, 60, .45);
  color: #ff6b4a;
  font-weight: 800;
  text-align: center;
  border-radius: 1.1rem;
  padding: .9rem 1.2rem;
  margin: 0 0 1.2rem
}
/* Owner choice text on home top cards: smaller + allowed to stay inside the card */
.tc-val.txt {
  font-size: 2.2rem;
  white-space: normal;
  overflow-wrap: anywhere;
  letter-spacing: -.01em
}

/* quantity stepper inside the add-items picker */
.pk-qty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: .3rem
}

.pk-qty span {
  min-width: 2.2rem;
  font-weight: 800;
  font-size: 1rem
}

.pk-qty button {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: inherit;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: transform .2s var(--spring), background .2s, border-color .2s
}

.pk-qty button:hover {
  background: var(--surface-3);
  border-color: rgba(79, 91, 240, .6)
}

.pk-qty button:active {
  transform: scale(.88)
}

/* panel header: no wrapping now that the L/W tags are gone */
.panel-head h2,
.panel-head .count {
  white-space: nowrap
}

/* both totals shown under the balance bar */
.bal-tot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .5rem;
  font-weight: 700;
  color: var(--muted)
}

.bal-tot b {
  color: inherit;
  font-weight: 900
}

/* ---- mini tier popup (Nightfall / Firstlight) ---- */
.modal.tier-pop {
  z-index: 110
}

.modal-card.mini {
  width: min(26rem, 100%);
  gap: .8rem;
  padding: 1.3rem
}

.modal-card.mini .modal-head h3 {
  font-size: 1.5rem
}

.tp-sub {
  color: var(--muted);
  font-weight: 600;
  font-size: .95rem
}

.tp-rows {
  display: flex;
  flex-direction: column;
  gap: .6rem
}

.tp-row {
  display: flex;
  align-items: center;
  gap: .8rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  padding: .8rem 1rem;
  cursor: pointer;
  transition: transform .25s var(--spring), background .2s, border-color .2s
}

.tp-row:hover,
.tp-row:focus-visible {
  background: var(--surface-3);
  border-color: rgba(79, 91, 240, .6);
  outline: 0;
  transform: translateY(-2px)
}

.tp-row.on {
  border-color: rgba(79, 91, 240, .6)
}

.tp-t {
  display: flex;
  flex-direction: column;
  line-height: 1.2
}

.tp-t b {
  font-size: 1.1rem;
  font-weight: 900
}

.tp-t span {
  font-size: .8rem;
  color: var(--muted);
  font-weight: 600
}

.tp-v {
  margin-left: auto;
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--pink);
  white-space: nowrap
}

.tp-v small {
  font-size: .8rem;
  color: var(--muted);
  font-weight: 700
}

.tp-go,
.tp-add {
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap
}

.tp-qty {
  display: flex;
  align-items: center;
  gap: .4rem
}

.tp-qty span {
  min-width: 1.9rem;
  text-align: center;
  font-weight: 800
}

.tp-qty button {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: inherit;
  font-weight: 800;
  cursor: pointer
}

.tp-qty button:hover {
  background: var(--surface-3);
  border-color: rgba(79, 91, 240, .6)
}

.tp-foot {
  display: flex;
  justify-content: flex-end
}

.tp-foot:empty {
  display: none
}

.pk-tierhint {
  font-size: .8rem;
  font-weight: 800;
  color: var(--muted)
}

/* item pictures inside tiles */
.tile.img {
  padding: 0;
  overflow: hidden;
  background: #1b1c22;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35)
}

.tile.img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block
}

/* glowing rainbow rarity (Impossible Limited) */
.rarity.rainbow {
  font-weight: 900;
  background: linear-gradient(90deg, #ff4d6d, #ffb347, #ffe66d, #5be37d, #4dc3ff, #8b7bff, #ff4dd8, #ff4d6d);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 6px rgba(255, 120, 220, .55)) drop-shadow(0 0 14px rgba(90, 190, 255, .35));
  animation: rainbowShift 4s linear infinite
}

@keyframes rainbowShift {
  to {
    background-position: 300% 0
  }
}

@media (prefers-reduced-motion: reduce) {
  .rarity.rainbow {
    animation: none
  }
}

/* Impossible = shining black (dark text with a light sheen that sweeps across) */
.rarity.black {
  font-weight: 900;
  background: linear-gradient(110deg, #0a0a0e 0%, #1d1d26 28%, #7d7d90 42%, #ffffff 50%, #7d7d90 58%, #1d1d26 72%, #0a0a0e 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  -webkit-text-stroke: .9px rgba(225, 230, 255, .75);
  filter: drop-shadow(0 0 4px rgba(215, 220, 255, .7)) drop-shadow(0 0 10px rgba(160, 170, 255, .35));
  font-size: 1.08em;
  animation: blackShine 3.2s ease-in-out infinite
}

@keyframes blackShine {
  0% {
    background-position: 130% 0
  }
  100% {
    background-position: -130% 0
  }
}

/* Mythic = glowing red */
.rarity.mythic {
  font-weight: 900;
  color: #ff6b6b;
  text-shadow: 0 0 10px rgba(255, 70, 70, .55)
}

@media (prefers-reduced-motion: reduce) {
  .rarity.black {
    animation: none;
    background-position: 50% 0
  }
}

/* typeable quantity in the trade calculator */
.qty .qx { min-width: 0; opacity: .6; margin-right: -.15em }
.qty-in {
  width: 2.7em;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  font-size: .95em;
  text-align: left;
  padding: .1em 0;
  margin-left: -.1em
}
.qty-in:focus { box-shadow: 0 1px 0 var(--pink) }

/* typeable quantity in the add-items picker and the tier popup */
.pk-qty .qty-in, .tp-qty .qty-in {
  text-align: center;
  background: var(--surface-3);
  border-radius: 999px;
  margin: 0;
  padding: .3em .2em;
  font-size: 1rem;
  box-shadow: inset 0 0 0 1px var(--line)
}
.pk-qty .qty-in { width: 3.4rem }
.tp-qty .qty-in { width: 3rem }
.pk-qty .qty-in:focus, .tp-qty .qty-in:focus { box-shadow: inset 0 0 0 2px rgba(79, 91, 240, .8) }


/* ==========================================================================
   RESPONSIVE LAYER (v6)
   Makes every page fit any window size, from tiny phones to ultrawide.
   Rule of thumb used here: grids use minmax(0,1fr) so content can never push
   a column wider than the screen, and anything that could be long may wrap.
   ========================================================================== */

/* ---- 1. Fluid type scale that does not over-inflate on small windows ---- */
html {
  font-size: clamp(15px, .9vw + 7px, 23px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
}

/* never allow a long word/number to blow a layout open */
h1, h2, h3, h4, p, .name, .sn, .sub { overflow-wrap: anywhere; }

/* ---- 2. Safe areas (notches / home bars) ---- */
.nav { padding-top: max(.8rem, env(safe-area-inset-top, 0px)); }
.wrap {
  padding-left: max(var(--gut), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gut), env(safe-area-inset-right, 0px));
}
.foot { padding-bottom: max(2.6rem, calc(env(safe-area-inset-bottom, 0px) + 1.4rem)); }
.toasts { bottom: max(1.6rem, calc(env(safe-area-inset-bottom, 0px) + .8rem)); max-width: calc(100vw - 2rem); }
.toast { text-align: center; max-width: 100%; }

/* ---- 3. Grids that can actually shrink ---- */
.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { min-width: 0; }
.stat b { overflow-wrap: anywhere; }

/* Home cards: as many columns as fit (3 -> 2 -> 1) with no fixed breakpoint */
.top-grid,
.steps {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr));
}
.top-card, .step { min-width: 0; }

.trade { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.panel { min-width: 0; }
.result { grid-template-columns: auto minmax(0, 1fr); }

/* ---- 4. Calculator panel header can wrap instead of overflowing ---- */
.panel-head {
  flex-wrap: wrap;
  row-gap: .6rem;
  min-width: 0;
}
.panel-head .add-side { margin-left: auto; }

/* ---- 5. Value list ---- */
.toolbar > * { min-width: 0; }
.search-wrap { min-width: min(14rem, 100%); }
.list-card { min-width: 0; }
.row { min-width: 0; }
.row > * { min-width: 0; }
.row .val { white-space: nowrap; }

/* ---- 6. Modals: use the *dynamic* viewport so mobile browser bars don't cut them off ---- */
.modal { padding: max(1.2rem, env(safe-area-inset-top, 0px)) max(1.2rem, env(safe-area-inset-right, 0px)) max(1.2rem, env(safe-area-inset-bottom, 0px)) max(1.2rem, env(safe-area-inset-left, 0px)); }
.modal-card { max-height: min(88vh, 50rem); max-height: min(88dvh, 50rem); min-height: 0; }
.modal-card.detail { max-height: min(90vh, 48rem); max-height: min(90dvh, 48rem); }
.pk-grid { grid-template-columns: repeat(auto-fill, minmax(min(8.6rem, 100%), 1fr)); overscroll-behavior: contain; }
.modal-foot { flex-wrap: wrap; gap: .6rem 1rem; }
.seg button { min-width: 0; }

/* ---- 7. Short windows (laptops with big toolbars, landscape phones) ---- */
@media (max-height: 640px) {
  .hero-logo { width: min(30rem, 80%, calc(34vh * 2.83)); }
  .home-sec { margin-top: 2.4rem; }
  .page-head { padding: 1.6rem 0 1.2rem; }
  .modal-card { max-height: 94vh; max-height: 94dvh; padding: 1.1rem; }
}
@media (max-height: 460px) and (orientation: landscape) {
  :root { --nav-h: 3.2rem; }
  .nav { padding-top: .4rem; }
  .hero-logo { width: min(20rem, 40%); }
  .modal { padding: .4rem; }
  .modal-card { max-height: 98vh; max-height: 98dvh; border-radius: 1.4rem; }
}

/* ---- 8. Tablet / small laptop (721 – 980px) ---- */
@media (min-width: 721px) and (max-width: 980px) {
  .wrap { --gut: clamp(1.4rem, 4vw, 2.2rem); }
  .page-head { padding-top: 2.2rem; }
  /* calculator stacks, so let the two offers sit comfortably */
  .trade { grid-template-columns: minmax(0, 1fr); }
  .panel { min-height: 20rem; }
}

/* ---- 9. Phones (<= 720px) ---- */
@media (max-width: 720px) {
  html { font-size: 15px; }

  /* nav: keep the pill inside the screen */
  .nav { padding-left: .6rem; padding-right: .6rem; }
  .nav-in { max-width: 100%; min-width: 0; }
  .nav-links { min-width: 0; flex: 1 1 auto; justify-content: center; }

  /* hero */
  .hero { padding-top: .6rem; }
  .hero-logo { width: min(100%, 30rem); }
  .tagline { font-size: clamp(1.15rem, 5vw, 1.5rem); padding: 0 .4rem; }
  .cta-row { width: 100%; flex-direction: column; align-items: stretch; gap: .7rem; }
  .cta-row .btn { width: 100%; }
  .btn.lg { padding: .9rem 1.3rem; font-size: 1.15rem; }

  /* stats */
  .stats { gap: .5rem; margin-top: 1.6rem; width: 100%; }
  .stat { padding: .8rem .5rem; border-radius: 1.1rem; }
  .stat b { font-size: clamp(1.15rem, 5.4vw, 1.6rem); }
  .stat span { font-size: .78rem; }

  /* section headings */
  .sec-head { flex-wrap: wrap; align-items: baseline; row-gap: .3rem; }
  .sec-head h2 { font-size: clamp(1.5rem, 6.4vw, 2rem); }
  .top-card, .step { padding: 1.2rem; border-radius: 1.4rem; }

  /* page headers */
  .page-head { padding: 1.6rem 0 1.2rem; gap: 1rem; }
  .page-head h1 { font-size: clamp(2.1rem, 10vw, 3rem); }
  .page-head .sub { font-size: 1.05rem; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1 1 auto; }

  /* values list */
  .toolbar { gap: .6rem; }
  .search-wrap { flex: 1 1 100%; }
  .sort { flex: 1 1 100%; width: 100%; }
  .search { font-size: 1.05rem; padding: .85rem 1.1rem .85rem 3rem; }
  .search-wrap svg { left: 1.1rem; }
  .sort { font-size: 1.05rem; padding: .85rem 1.2rem; }
  .pills { gap: .4rem; margin-bottom: 1rem; }
  .chip { padding: .5rem 1rem; font-size: .95rem; }
  .list-card { padding: 1rem .9rem .5rem; border-radius: 1.5rem; margin-bottom: 1.6rem; }
  .row { margin: 0 -.5rem; padding: .7rem .5rem; gap: .8rem; }
  .row:hover { transform: none; }
  .row .name { font-size: 1.1rem; }
  .row .name small { font-size: .85rem; }
  .row .val { font-size: 1.2rem; }
  .row .val.txt { font-size: 1rem; }

  /* calculator */
  .trade { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
  .vs { width: 3rem; height: 3rem; font-size: .95rem; margin: -.2rem 0; }
  .panel { padding: 1.1rem; border-radius: 1.5rem; min-height: 15rem; }
  .panel-head h2 { font-size: 1.35rem; }
  .total { font-size: 1.1rem; }
  .total b { font-size: 2rem; }
  .result { padding: 1.3rem 1.1rem; border-radius: 1.5rem; gap: 1rem; }
  .verdict { width: 5rem; height: 5rem; font-size: 2.6rem; }
  .result h3 { font-size: 1.55rem; }
  .result p { font-size: 1rem; }
  .bal-tot { flex-wrap: wrap; gap: .2rem 1rem; font-size: .95rem; }

  /* modals become bottom sheets */
  .modal { padding: 0; align-items: end; }
  .modal-card, .modal-card.detail {
    width: 100%;
    border-radius: 1.8rem 1.8rem 0 0;
    max-height: 92vh; max-height: 92dvh;
    padding: 1.2rem 1.1rem max(1.2rem, env(safe-area-inset-bottom, 0px));
  }
  .modal-card.mini { width: 100%; }
  .modal-head h3 { font-size: 1.5rem; }
  .d-top h3 { font-size: 1.5rem; }
  .d-value b { font-size: 2rem; }
  .tile.big { width: 3.8rem; height: 3.8rem; }
  .pk-grid { gap: .6rem; }
  .modal-foot { align-items: stretch; }
  .modal-foot .btn { width: 100%; }

  /* footer */
  .foot { flex-direction: column; gap: .8rem; padding-top: 1.4rem; }
  .foot nav { flex-wrap: wrap; gap: .6rem 1.2rem; }
}

/* ---- 10. Small phones (<= 400px) ---- */
@media (max-width: 400px) {
  :root { --gut: 1rem; }
  .nav { padding-left: .4rem; padding-right: .4rem; }
  .nav-in { padding: 0 .4rem 0 .7rem; gap: .2rem; height: 3.8rem; }
  .logo img { height: 2.1rem; }
  .nav-links a { font-size: .9rem; padding: .5rem .45rem; }
  .theme-btn .ico { width: 1.8rem; height: 1.8rem; }
  .stat span { font-size: .72rem; }
  .panel-head { gap: .5rem; }
  .panel-head .count { font-size: .8rem; padding: .25rem .7rem; }
  .panel-head .add-side { padding: .6rem 1rem; }
  .pk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seg button { font-size: 1rem; padding: .7rem .5rem; }
}

/* ---- 11. Very wide screens: keep content readable, not stretched ---- */
@media (min-width: 1900px) {
  :root { --max: 92rem; }
}

/* ---- 12. Touch devices: no sticky hover lift ---- */
@media (hover: none) {
  .row:hover, .top-card:hover, .btn:hover, .chip:hover { transform: none; }
}

/* ---- 13. Polish pass ---- */
.stat { display: flex; flex-direction: column; justify-content: center; }

/* calculator header: heading scales a little so "Add item" stays on the same line */
.panel-head h2 { font-size: clamp(1.25rem, 1.9vw, 1.7rem); }

@media (max-width: 720px) {
  .hero { padding-top: 1.4rem; }
  .stat { align-items: center; text-align: center; min-height: 5.6rem; }
  .stat b.stat-date { font-size: clamp(.9rem, 4.1vw, 1.3rem); line-height: 1.2; text-wrap: balance; }
  .panel-head h2 { font-size: 1.35rem; }
  .d-top { padding-right: 3.6rem; }
}

@media (min-width: 721px) { .stat b.stat-date { font-size: 1.35rem; line-height: 2.4rem; } }


/* ==========================================================
   ABOUT PAGE
   ========================================================== */
.discord-card {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap;
  padding: 1.4rem 1.6rem; margin-bottom: 2.6rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 1.4rem;
  box-shadow: var(--shadow);
  transition: transform .35s var(--ease), border-color .3s, box-shadow .3s;
}
.discord-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .55;
  background: radial-gradient(60% 140% at 0% 0%, rgba(101, 113, 255, .35), transparent 60%), radial-gradient(50% 120% at 100% 100%, rgba(62, 166, 242, .25), transparent 60%);
}
.discord-card:hover { transform: translateY(-3px); border-color: rgba(101, 113, 255, .55); box-shadow: var(--shadow), var(--glow); }
.dc-sheen {
  position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .12), transparent);
  transform: skewX(-18deg); transition: left .9s var(--ease);
}
.discord-card:hover .dc-sheen { left: 120%; }
.dc-ico { flex: none; display: grid; place-items: center; width: 5.2rem; height: 5.2rem; border-radius: 1.2rem; background: var(--surface-2); border: 1px solid var(--line); }
.dc-ico img { width: 80%; height: auto; transition: transform .5s var(--spring); }
.discord-card:hover .dc-ico img { transform: scale(1.12) rotate(-4deg); }
.dc-txt { flex: 1 1 14rem; min-width: 0; }
.dc-txt h2 { font-size: 1.5rem; font-weight: 900; line-height: 1.15; }
.dc-txt p { color: var(--muted); font-weight: 500; margin-top: .3rem; }
.dc-go { flex: none; }

.team { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; perspective: 1000px; }

.member {
  --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg;
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 2rem 1rem 1.6rem; font: inherit; color: var(--text); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 1.5rem;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .25s ease-out, border-color .3s, box-shadow .35s;
  -webkit-tap-highlight-color: transparent;
}
.member:hover, .member:focus-visible { border-color: rgba(101, 113, 255, .6); box-shadow: var(--shadow), 0 0 0 1px rgba(101, 113, 255, .25), var(--glow); }
.member:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }
.member:active { transform: scale(.97); }
.m-glow {
  position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(18rem circle at var(--mx) var(--my), rgba(101, 113, 255, .28), transparent 60%);
}
.member:hover .m-glow, .member:focus-visible .m-glow { opacity: 1; }

.m-av { position: relative; width: 7.6rem; height: 7.6rem; margin-bottom: 1.1rem; transition: transform .45s var(--spring); }
.member:hover .m-av, .member:focus-visible .m-av { transform: translateY(-4px) scale(1.07); }
.m-ring {
  position: absolute; inset: -5px; border-radius: 50%;
  background: conic-gradient(from 0deg, #4f5bf0, #3ea6f2, #3ddc97, #ffc857, #ff5470, #4f5bf0);
  opacity: 0; transform: scale(.88); transition: opacity .3s, transform .45s var(--spring);
}
.member:hover .m-ring, .member:focus-visible .m-ring { opacity: 1; transform: scale(1); animation: m-spin 3.2s linear infinite; }
@keyframes m-spin { to { transform: rotate(360deg); } }
.m-pic {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center;
  background: var(--surface-2); border: 4px solid var(--surface);
  box-shadow: 0 0 0 2px var(--line);
}
.m-pic img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.18); transform-origin: 35% 35%; transition: transform .6s var(--ease); }
.member:hover .m-pic img { transform: scale(1.3); }
.av-init { font-size: 3.2rem; font-weight: 900; color: #fff; width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, #111218, #2b2d3a); transition: transform .5s var(--spring); }
.member:hover .av-init { transform: scale(1.15); }

.m-name { font-size: 1.45rem; font-weight: 900; line-height: 1.1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; transition: letter-spacing .3s var(--ease), color .3s; }
.member:hover .m-name { letter-spacing: .03em; color: var(--pink); }
.m-user { display: inline-flex; align-items: center; gap: .4rem; margin-top: .45rem; padding: .28rem .75rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-weight: 700; font-size: .95rem; max-width: 100%; transition: background .3s, color .3s, transform .3s var(--spring); }
.m-user svg { width: 1.05em; height: 1.05em; flex: none; }
.member:hover .m-user { background: var(--grad); color: #fff; border-color: transparent; transform: translateY(-2px); }
.m-copy { position: absolute; left: 0; right: 0; bottom: .5rem; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .35s var(--ease); }
.member:hover .m-copy, .member:focus-visible .m-copy { opacity: .85; transform: none; }
.member { padding-bottom: 2.2rem; }

@media (max-width: 900px) { .team { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .discord-card { padding: 1.1rem; gap: 1rem; }
  .dc-ico { width: 4.2rem; height: 4.2rem; }
  .dc-txt h2 { font-size: 1.25rem; }
  .dc-go { width: 100%; justify-content: center; }
  .team { gap: .8rem; }
  .member { padding: 1.4rem .6rem 1.6rem; border-radius: 1.2rem; }
  .m-av { width: 6rem; height: 6rem; }
  .m-name { font-size: 1.15rem; }
  .m-user { font-size: .8rem; padding: .25rem .6rem; }
  .m-copy { display: none; }
  .member { padding-bottom: 1.4rem; }
}
@media (hover: none) { .member { transform: none !important; } .m-copy { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .member { transform: none !important; }
  .member:hover .m-ring { animation: none; }
}


/* ---- Nav: Discord Server button ---- */
.nav-in { max-width: min(100%, 66rem); gap: 1.1rem; }
.nav-discord {
  flex: none; position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .62rem 1.2rem; border-radius: 1rem;
  background: linear-gradient(135deg, #5865f2, #6f7bff); color: #fff;
  font-weight: 800; font-size: 1.02rem; line-height: 1; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(88, 101, 242, .45), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .3s var(--spring), box-shadow .3s, filter .3s;
}
.nav-discord svg { width: 1.3em; height: 1.3em; flex: none; transition: transform .45s var(--spring); }
.nav-discord::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .38), transparent);
  transform: skewX(-20deg); transition: left .7s var(--ease);
}
.nav-discord:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 10px 26px rgba(88, 101, 242, .65), inset 0 1px 0 rgba(255, 255, 255, .3); }
.nav-discord:hover svg { transform: rotate(-12deg) scale(1.15); }
.nav-discord:hover::after { left: 130%; }
.nav-discord:active { transform: scale(.95); }
.nav-discord:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 860px) {
  .nav-discord { width: 2.5rem; height: 2.5rem; padding: 0; justify-content: center; border-radius: 50%; }
  .nav-discord .nd-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-discord svg { width: 1.35rem; height: 1.35rem; }
}
@media (max-width: 720px) { .nav-in { gap: .5rem; } }
@media (max-width: 400px) { .nav-discord { width: 2.1rem; height: 2.1rem; } .nav-discord svg { width: 1.15rem; height: 1.15rem; } }
@media (hover: none) { .nav-discord:hover { transform: none; } }
@media (max-width: 360px) {
  .logo { display: none; }
  .nav-in { padding: 0 .4rem; justify-content: space-between; }
  .nav-links { justify-content: flex-start; }
  .nav-links a { font-size: .85rem; padding: .5rem .4rem; }
}

/* ===== Round 3: trend pills, values header + rarity column, bigger add-items popup ===== */

/* trend pills: double arrows each side */
.pill .ar, .dstat b .ar { font-size: .62em; letter-spacing: -.14em; line-height: 1; display: inline-block; transform: translateY(-.02em); }
.pill.up    { color: #3ddc97; background: rgba(61, 220, 151, .16); }
.pill.over  { color: #86efac; background: #14532d; box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .28); }
.pill.down  { color: #ff6f86; background: rgba(255, 84, 112, .15); }
.dstat b.over { color: #4ade80; }
.dstat b .tw { margin: 0 .35em; }
.pill .tw { margin: 0 .05rem; }

/* values list: header row + rarity column (rows share one fixed grid so the columns line up) */
.row { grid-template-columns: 2.2rem 3.4rem minmax(0, 1fr) 10.5rem 12.5rem 9rem; }
.row .rar { font-size: 1rem; font-weight: 800; text-align: center; white-space: nowrap; color: var(--muted); }
.row .pill { justify-self: center; }
.row .r-inline { display: none; }
.row.row-head {
  margin-bottom: .35rem; padding-top: .2rem; padding-bottom: .65rem; border-radius: 0;
  border-bottom: 1px solid var(--line); background: none; animation: none; transform: none !important; pointer-events: none;
}
.row.row-head[hidden] { display: none; }
.row-head .name, .row-head .rar, .row-head .pill, .row-head .val, .row-head .no {
  font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.row-head .name { margin: 0; }
.row-head .pill { background: none; padding: 0; box-shadow: none; }
.row-head .val { font-size: .8rem; }
.row-head .val small { display: inline; font-size: 1em; font-weight: 700; letter-spacing: .06em; margin: 0; text-transform: none; }
@media (max-width: 980px) {
  .row { grid-template-columns: 3.4rem minmax(0, 1fr) 11.5rem 8.5rem; }
  .row .rar { display: none; }
  .row .r-inline { display: inline; }
}
@media (max-width: 720px) {
  .row { grid-template-columns: 3rem minmax(0, 1fr) auto; }
  .row.row-head { padding-bottom: .5rem; }
}

/* add-items popup: much bigger, fixed height so rows never jump, room for hover lift */
#picker { padding: max(.8rem, env(safe-area-inset-top, 0px)) .8rem max(.8rem, env(safe-area-inset-bottom, 0px)); }
#picker .modal-card { width: min(82rem, 100%); height: min(94vh, 64rem); height: min(94dvh, 64rem); max-height: none; padding: 1.6rem 1.8rem 1.3rem; gap: 1.1rem; }
#picker .pk-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(11.5rem, 100%), 1fr));
  gap: 1rem; align-content: start; padding: 1rem .8rem 1.4rem; margin: -.6rem -.8rem -.4rem;
  scroll-padding: 1rem; min-height: 0;
}
#picker .pk-item { padding: 1.3rem .8rem 1.1rem; }
@media (max-width: 980px) {
  #picker { padding: 0; align-items: end; }
  #picker .modal-card { width: 100%; height: 95vh; height: 95dvh; border-radius: 1.8rem 1.8rem 0 0; padding: 1.2rem 1.1rem max(1rem, env(safe-area-inset-bottom, 0px)); }
  #picker .pk-grid { grid-template-columns: repeat(auto-fill, minmax(min(9.4rem, 100%), 1fr)); gap: .75rem; padding: .8rem .6rem 1.2rem; margin: -.4rem -.6rem 0; }
}

/* ===== Legal pages (Terms, Privacy, Roblox + Legal disclaimers) ===== */
.legal-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.4rem; }
.legal-tabs .chip[aria-current="page"] { background: var(--grad, var(--pink)); color: #fff; border-color: transparent; }
.legal-card { background: var(--surface); border: 1px solid var(--line); border-radius: 2rem; padding: clamp(1.4rem, 3.4vw, 2.6rem); max-width: 60rem; }
.legal-sec + .legal-sec { margin-top: 1.9rem; padding-top: 1.7rem; border-top: 1px solid var(--line); }
.legal-sec h2 { font-size: 1.35rem; font-weight: 800; margin: 0 0 .7rem; }
.legal-sec p, .legal-sec li { color: var(--muted); font-size: 1.05rem; line-height: 1.7; }
.legal-sec p + p, .legal-sec p + ul, .legal-sec ul + p { margin-top: .8rem; }
.legal-sec ul { margin: .5rem 0 0; padding-left: 1.3rem; display: grid; gap: .45rem; }
.legal-sec strong { color: var(--text, #fff); }
.legal-sec a { color: var(--pink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.foot-legal { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-weight: 700; width: 100%; font-size: .9rem; }
.foot-legal a:hover { color: var(--pink); }
@media (max-width: 720px) {
  .legal-card { border-radius: 1.5rem; }
  .legal-sec p, .legal-sec li { font-size: 1rem; }
  .legal-tabs .chip { font-size: .9rem; padding: .45rem .9rem; }
}

/* Limited = glowing purple */
.rarity.limited {
  font-weight: 900;
  color: #c4a3ff;
  text-shadow: 0 0 8px rgba(170, 120, 255, .85), 0 0 18px rgba(140, 90, 255, .5);
  animation: limitedGlow 2.6s ease-in-out infinite alternate
}
@keyframes limitedGlow {
  from { text-shadow: 0 0 6px rgba(170, 120, 255, .6), 0 0 12px rgba(140, 90, 255, .3) }
  to { text-shadow: 0 0 10px rgba(190, 140, 255, 1), 0 0 24px rgba(150, 100, 255, .65) }
}
@media (prefers-reduced-motion: reduce) { .rarity.limited { animation: none } }

/* tier hint under tiered items */
.row .name small.tier-hint { font-size: .78rem; font-weight: 700; color: var(--pink); margin-top: .15rem; letter-spacing: .01em; }
@media (max-width: 720px) { .row .name small.tier-hint { font-size: .74rem; } }

/* ===== Desktop zoomed out ~30% (everything is rem-based, so shrinking the root size scales the whole site) ===== */
@media (min-width: 981px) {
  html { font-size: clamp(11.2px, .77vw + 3.85px, 16.1px); }   /* was clamp(16px, 1.1vw + 5.5px, 23px) */
  :root { --max: 120rem; }                                       /* 84rem / 0.7, so the page still fills the screen like before */
  .nav-in { max-width: min(100%, 94rem); }
}

/* +10 Refinement toggle in the tier popup */
.tp-ref { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .7rem .9rem; margin-bottom: .55rem; border-radius: 1rem; border: 1px dashed var(--line, rgba(255,255,255,.18)); }
.tp-ref .tp-t b { display: block; } .tp-ref .tp-t span { font-size: .8rem; opacity: .7; }
.tp-seg { display: inline-flex; border-radius: 999px; overflow: hidden; border: 1px solid var(--line, rgba(255,255,255,.18)); }
.tp-seg button { padding: .4rem .95rem; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.tp-seg button[aria-pressed="true"] { background: var(--pink, #5865f2); color: #fff; }

/* SEO text block + no-JS table */
.seo-copy { max-width: 62rem; margin: 3rem auto 0; }
.seo-copy h2 { font-size: 1.15rem; margin: 1.4rem 0 .4rem; }
.seo-copy p { opacity: .8; line-height: 1.65; }
.seo-copy a { color: var(--pink, #4aa3ff); }
.seo-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.seo-table th, .seo-table td { text-align: left; padding: .4rem .6rem; border-bottom: 1px solid var(--line); }

/* wishlist star, result stats, disabled undo */
.wish { display: inline-flex; margin-left: .45rem; font-size: 1.05rem; line-height: 1; cursor: pointer; opacity: .45; color: #ffc857; transition: transform .15s, opacity .15s; vertical-align: middle; }
.wish:hover, .wish:focus-visible { opacity: 1; transform: scale(1.2); outline: none; }
.wish.on { opacity: 1; }
.chip-wish { margin-left: .2rem; }
.res-stats { display: flex; gap: 1.4rem; justify-content: center; flex-wrap: wrap; margin: .7rem 0 .2rem; font-size: .92rem; opacity: .85; }
.res-stats b { font-variant-numeric: tabular-nums; margin: 0 .15rem; }
.btn[disabled] { opacity: .4; cursor: not-allowed; pointer-events: none; }
.dc-ico img { height: 2.6rem; width: auto; }

/* ===== Navbar: floating glass pill with a filled active-page pill ===== */
.nav { padding-top: 1rem; }
.nav-in {
  max-width: min(100%, 72rem); height: 4.3rem; padding: 0 .8rem 0 1.3rem; gap: 1.2rem;
  background: rgba(24, 26, 38, .78); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, .09); box-shadow: 0 12px 34px rgba(0, 0, 0, .35);
}
:root[data-theme="light"] .nav-in { background: rgba(255, 255, 255, .82); border-color: rgba(30, 10, 60, .1); box-shadow: 0 10px 30px rgba(30, 10, 60, .14); }
.logo img { height: 2.9rem; }
.nav-links { gap: .25rem; }
.nav-links a { font-size: 1rem; font-weight: 700; padding: .62rem 1.1rem; border-radius: 999px; color: #c3c9dd; transition: color .2s, background .2s, transform .2s; }
:root[data-theme="light"] .nav-links a { color: #5a5470; }
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, .07); }
:root[data-theme="light"] .nav-links a:hover { background: rgba(30, 10, 60, .06); }
.nav-links a[aria-current="page"] { color: var(--text); background: transparent; }
.nav-ind { top: 0; bottom: auto; height: auto; border-radius: 999px; background: rgba(62, 166, 242, .26); box-shadow: inset 0 0 0 1px rgba(62, 166, 242, .35); }
:root[data-theme="light"] .nav-ind { background: rgba(62, 166, 242, .2); }
.nav-discord { border-radius: 999px; padding: .7rem 1.3rem; }
.theme-btn { border-radius: 999px; }
@media (max-width: 720px) {
  .nav-in { height: 3.7rem; padding: 0 .6rem 0 .9rem; gap: .5rem; }
  .logo img { height: 2.3rem; }
  .nav-links a { font-size: .88rem; padding: .5rem .6rem; }
  .nav-discord .nd-txt { display: none; }
  .nav-discord { padding: .6rem; }
}
@media (max-width: 520px) {
  .nav { padding-inline: .55rem; }
  .nav-in { gap: .25rem; padding: 0 .45rem 0 .75rem; }
  .logo img { height: 1.85rem; }
  .nav-links { margin-inline: auto; gap: 0; }
  .nav-links a { font-size: .8rem; padding: .45rem .5rem; }
  .nav-discord { padding: .5rem; }
  .theme-btn { padding: 0; }
}
