:root {
  color-scheme: dark;
  --bg: #020706;
  --bg-2: #07110f;
  --surface: rgba(8, 18, 17, 0.72);
  --surface-strong: rgba(12, 28, 26, 0.86);
  --glass: rgba(218, 255, 248, 0.06);
  --text: #effffb;
  --muted: #9cb8b1;
  --accent: #35e6c4;
  --accent-2: #7b8cff;
  --accent-3: #103b35;
  --gold: #ffe3a3;
  --good: #5cf2a8;
  --bad: #ff5f78;
  --steady: #7fc8ff;
  --shadow: rgba(0, 0, 0, 0.5);
  --soft-line: rgba(218, 255, 248, 0.1);
  --nav-bg: rgba(3, 10, 9, 0.6);
  --page-wash:
    radial-gradient(ellipse at 50% -12%, rgba(53, 230, 196, 0.18), transparent 42%),
    radial-gradient(ellipse at 12% 72%, rgba(123, 140, 255, 0.11), transparent 38%),
    radial-gradient(ellipse at 86% 40%, rgba(16, 59, 53, 0.34), transparent 42%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  --card-wash:
    linear-gradient(150deg, rgba(218, 255, 248, 0.1), rgba(218, 255, 248, 0.026) 46%, rgba(53, 230, 196, 0.075)),
    rgba(6, 15, 14, 0.88);
  --glow: 0 0 18px rgba(53, 230, 196, 0.12), 0 0 52px rgba(123, 140, 255, 0.055);
  --big-glow: 0 0 34px rgba(53, 230, 196, 0.16), 0 0 90px rgba(123, 140, 255, 0.075);
}

body[data-theme="light"] {
  color-scheme: light;
  --bg: #fff7fb;
  --bg-2: #effcff;
  --surface: rgba(255, 255, 255, 0.62);
  --surface-strong: rgba(255, 255, 255, 0.84);
  --glass: rgba(255, 255, 255, 0.46);
  --text: #302836;
  --muted: #7a7188;
  --accent: #ff93b7;
  --accent-2: #8bd9ff;
  --accent-3: #b8f4c6;
  --gold: #b885ff;
  --good: #40bd92;
  --bad: #e95e75;
  --steady: #5da9ff;
  --shadow: rgba(138, 91, 132, 0.18);
  --soft-line: rgba(255, 255, 255, 0.42);
  --nav-bg: rgba(255, 255, 255, 0.46);
  --page-wash:
    radial-gradient(ellipse at 50% -10%, rgba(255, 184, 213, 0.65), transparent 42%),
    radial-gradient(ellipse at 15% 74%, rgba(184, 244, 198, 0.56), transparent 36%),
    radial-gradient(ellipse at 88% 42%, rgba(139, 217, 255, 0.48), transparent 40%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  --card-wash:
    linear-gradient(150deg, rgba(255, 255, 255, 0.84), rgba(255, 248, 252, 0.54) 48%, rgba(139, 217, 255, 0.2)),
    rgba(255, 255, 255, 0.7);
  --glow: 0 0 34px rgba(255, 147, 183, 0.24), 0 0 90px rgba(139, 217, 255, 0.2);
  --big-glow: 0 0 80px rgba(255, 147, 183, 0.34), 0 0 180px rgba(184, 244, 198, 0.2);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page-wash);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: background 900ms ease, color 650ms ease;
  animation: pageBreath 14s ease-in-out infinite alternate;
}

body.home-route {
  height: 100vh;
  overflow: hidden;
}

body.discord-route {
  height: 100vh;
  overflow: hidden;
}

body.home-route::before,
body.home-route::after,
body.discord-route::before,
body.discord-route::after {
  display: none;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: -18%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.58;
  background:
    conic-gradient(from 120deg at 50% 50%, transparent, rgba(53, 230, 196, 0.11), transparent, rgba(123, 140, 255, 0.08), transparent);
  filter: blur(34px);
  animation: auraDrift 22s linear infinite;
}

body::after {
  opacity: 0.32;
  animation-duration: 33s;
  animation-direction: reverse;
}

body[data-theme="light"]::before,
body[data-theme="light"]::after {
  background:
    conic-gradient(from 100deg at 50% 50%, transparent, rgba(255, 147, 183, 0.3), transparent, rgba(139, 217, 255, 0.28), rgba(184, 244, 198, 0.22), transparent);
}

a {
  color: inherit;
}

#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  transition: opacity 600ms ease;
}

main {
  position: relative;
  z-index: 1;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 100vw;
  padding: 14px clamp(18px, 4vw, 56px);
  background:
    linear-gradient(180deg, rgba(8, 6, 7, 0.8), rgba(8, 6, 7, 0.56)),
    color-mix(in srgb, var(--bg) 72%, transparent);
  box-shadow:
    inset 0 -1px 0 rgba(255, 255, 255, 0.045),
    0 14px 44px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px) saturate(1.05);
  transition: background 700ms ease, box-shadow 700ms ease, transform 500ms ease;
  animation: navSettle 700ms ease both;
  pointer-events: auto;
}

.brand {
  flex: 0 0 auto;
  display: inline-flex;
  width: 74px;
  height: 48px;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  color: var(--text);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: none;
  transition: color 650ms ease, background 650ms ease, box-shadow 650ms ease, transform 280ms ease;
}

.brand img {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 10px color-mix(in srgb, var(--accent) 26%, transparent))
    drop-shadow(0 4px 12px rgba(0, 0, 0, 0.26));
  transition: filter 650ms ease, transform 280ms ease;
}

.brand:hover {
  transform: translateY(-1px) scale(1.015);
}

.brand:hover img {
  filter:
    drop-shadow(0 0 14px color-mix(in srgb, var(--accent) 36%, transparent))
    drop-shadow(0 6px 14px rgba(0, 0, 0, 0.28));
}

.brand.is-active {
  color: color-mix(in srgb, var(--text) 88%, var(--accent));
  box-shadow: none;
}

.nav-menu {
  display: flex;
  min-width: 0;
  gap: 10px;
  align-items: center;
  overflow: visible;
  scrollbar-width: none;
}

.nav-menu::-webkit-scrollbar {
  display: none;
}

.nav-link,
.primary-action,
.back-button,
.trade-add button,
.trade-row button,
.theme-toggle {
  position: relative;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.016)),
    rgba(5, 4, 5, 0.3);
  color: var(--text);
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 7px 20px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(12px);
  transition:
    background 650ms ease,
    color 650ms ease,
    box-shadow 650ms ease,
    transform 240ms ease,
    filter 240ms ease;
}

.primary-action::before,
.back-button::before,
.trade-add button::before,
.trade-row button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  opacity: 0;
  transform: translateX(-120%);
  transition: opacity 300ms ease;
}

.primary-action:hover::before,
.back-button:hover::before,
.trade-add button:hover::before,
.trade-row button:hover::before {
  opacity: 0.65;
  animation: shimmer 850ms ease;
}

.nav-link:hover,
.primary-action:hover,
.back-button:hover,
.trade-add button:hover,
.trade-row button:hover,
.theme-toggle:hover {
  transform: translateY(-2px);
  filter: saturate(1.12);
}

.nav-link {
  padding: 10px 15px;
  font-size: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(9, 7, 8, 0.32);
}

.nav-link.is-active {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, transparent), rgba(255, 255, 255, 0.035)),
    rgba(13, 8, 9, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 7px 18px rgba(0, 0, 0, 0.13);
}

body[data-theme="light"] .topbar {
  background:
    linear-gradient(180deg, rgba(255, 251, 253, 0.78), rgba(255, 251, 253, 0.56)),
    rgba(255, 255, 255, 0.48);
  box-shadow:
    inset 0 -1px 0 rgba(255, 255, 255, 0.56),
    0 14px 40px rgba(138, 91, 132, 0.11);
}

body[data-theme="light"] .brand,
body[data-theme="light"] .nav-link,
body[data-theme="light"] .back-button,
body[data-theme="light"] .trade-add button,
body[data-theme="light"] .trade-row button,
body[data-theme="light"] .theme-toggle {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 247, 251, 0.38)),
    rgba(255, 255, 255, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 8px 22px rgba(138, 91, 132, 0.12);
}

body[data-theme="light"] .brand {
  background: transparent;
  box-shadow: none;
}

body[data-theme="light"] .nav-link.is-active {
  background:
    linear-gradient(135deg, rgba(255, 147, 183, 0.16), rgba(255, 255, 255, 0.5)),
    rgba(255, 255, 255, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 8px 20px rgba(138, 91, 132, 0.1);
}

.theme-toggle {
  display: grid;
  width: 58px;
  height: 34px;
  padding: 4px;
  cursor: pointer;
}

.toggle-sky {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background:
    radial-gradient(circle at 74% 30%, rgba(255, 48, 72, 0.34), transparent 28%),
    linear-gradient(135deg, #110709, #2c0710);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.48), 0 0 24px rgba(255, 48, 72, 0.2);
  transition: background 650ms ease, box-shadow 650ms ease;
}

.toggle-sun,
.toggle-moon {
  position: absolute;
  top: 50%;
  width: 21px;
  height: 21px;
  border-radius: 999px;
  transform: translateY(-50%);
  transition: transform 650ms cubic-bezier(.2, 1.4, .35, 1), opacity 420ms ease, box-shadow 650ms ease;
}

.toggle-moon {
  left: 5px;
  background: #ff3048;
  box-shadow: 0 0 18px rgba(255, 48, 72, 0.8), inset -6px -3px 0 #5b0710;
}

.toggle-sun {
  right: 5px;
  background: #ffd980;
  opacity: 0;
  box-shadow: 0 0 18px rgba(255, 205, 105, 0.74);
}

body[data-theme="light"] .toggle-sky {
  background:
    radial-gradient(circle at 22% 26%, rgba(255, 255, 255, 0.86), transparent 22%),
    linear-gradient(135deg, #aee9ff, #ffd5e7 58%, #d8ffc9);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.7), 0 0 24px rgba(255, 147, 183, 0.25);
}

body[data-theme="light"] .toggle-moon {
  opacity: 0;
  transform: translate(25px, -50%) scale(0.65) rotate(120deg);
}

body[data-theme="light"] .toggle-sun {
  opacity: 1;
  transform: translate(-25px, -50%) rotate(180deg);
}

.hero {
  position: relative;
  display: grid;
  height: 100vh;
  overflow: hidden;
  place-items: center;
  padding: 104px 20px 42px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -12%;
  background:
    radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 36%),
    radial-gradient(ellipse at 50% 84%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 42%);
  filter: blur(8px);
  pointer-events: none;
  animation: heroAura 8s ease-in-out infinite alternate;
}

.hero-center {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(1000px, 100%);
  min-width: 0;
  justify-self: center;
  place-items: center;
  text-align: center;
  animation: floatIn 900ms ease both;
}

h1 {
  max-width: 11ch;
  margin: 0;
  font-size: clamp(52px, 8vw, 104px);
  line-height: 0.92;
  letter-spacing: 0;
  text-shadow:
    0 0 24px color-mix(in srgb, var(--accent) 42%, transparent),
    0 22px 90px var(--shadow);
  transition: text-shadow 700ms ease, color 700ms ease, transform 700ms ease;
  animation: titlePulse 4.8s ease-in-out infinite;
}

.primary-action {
  margin-top: 28px;
  padding: 15px 22px;
  background:
    linear-gradient(135deg, var(--accent), var(--accent-2)),
    var(--glass);
  color: #fff7f8;
  box-shadow:
    0 0 42px color-mix(in srgb, var(--accent) 42%, transparent),
    0 20px 60px var(--shadow);
  animation: buttonPulse 2.8s ease-in-out infinite;
}

body[data-theme="light"] .primary-action {
  color: #302836;
}

.hero-carousel {
  display: flex;
  width: min(1008px, 100%);
  min-width: 0;
  justify-self: center;
  gap: 14px;
  margin-top: 42px;
  padding: 24px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.carousel-track {
  display: flex;
  width: max-content;
  gap: 14px;
  animation: slideTrack 30s linear infinite;
  will-change: transform;
}

.carousel-card {
  flex: 0 0 176px;
  min-height: 176px;
  border: 0;
  padding: 16px;
  border-radius: 8px;
  background: var(--card-wash);
  color: var(--text);
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    0 12px 38px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px) saturate(1.25);
  animation: cardFloat 5.5s ease-in-out infinite;
  transition: background 700ms ease, box-shadow 300ms ease, transform 300ms ease, filter 300ms ease;
}

.carousel-card:hover,
.carousel-card:focus-visible {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 18px 44px rgba(0, 0, 0, 0.32),
    0 0 22px color-mix(in srgb, var(--accent) 13%, transparent);
  filter: saturate(1.12) brightness(1.04);
  transform: translateY(-10px) scale(1.055);
  outline: none;
}

.carousel-card:nth-child(2n) {
  animation-delay: -1.2s, -2s;
}

.carousel-card:nth-child(3n) {
  animation-delay: -2.3s, -3.1s;
}

.carousel-card strong,
.value-card h3 {
  display: block;
  overflow-wrap: anywhere;
}

.carousel-card span {
  display: block;
  margin-top: 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  text-shadow: 0 0 18px color-mix(in srgb, var(--gold) 36%, transparent);
}

.pet-icon,
.pet-badge {
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04)),
    color-mix(in srgb, var(--accent) 12%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 32px color-mix(in srgb, var(--accent) 32%, transparent),
    0 12px 36px var(--shadow);
  color: var(--text);
  font-size: 38px;
  font-weight: 950;
  transition: background 700ms ease, box-shadow 700ms ease, transform 350ms ease;
}

.pet-icon img,
.pet-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  border-radius: inherit;
  filter: drop-shadow(0 10px 18px color-mix(in srgb, var(--accent) 28%, transparent));
  transition: filter 700ms ease, transform 350ms ease;
}

.pet-icon.is-rainbow,
.pet-badge.is-rainbow,
.trade-pick-icon.is-rainbow {
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.18), transparent 44%),
    conic-gradient(from 0deg, rgba(255, 71, 95, 0.72), rgba(255, 210, 161, 0.68), rgba(83, 240, 161, 0.66), rgba(106, 183, 255, 0.7), rgba(184, 133, 255, 0.72), rgba(255, 71, 95, 0.72));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 18px rgba(255, 71, 95, 0.34),
    0 0 28px rgba(83, 240, 161, 0.22),
    0 0 42px rgba(106, 183, 255, 0.28),
    0 12px 36px var(--shadow);
  animation: rainbowAuraSpin 7s linear infinite;
}

.pet-icon.is-rainbow img,
.pet-badge.is-rainbow img,
.trade-pick-icon.is-rainbow img {
  filter:
    drop-shadow(0 10px 18px rgba(106, 183, 255, 0.38))
    drop-shadow(0 0 14px rgba(255, 210, 161, 0.22))
    hue-rotate(24deg)
    saturate(1.45);
}

.pet-icon {
  width: 78px;
  height: 78px;
  margin: 0 auto 14px;
}

.value-page,
.calculator-page,
.details-screen,
.placeholder-page {
  position: relative;
  min-height: 100vh;
  padding: 104px clamp(18px, 4vw, 60px) 72px;
  background: var(--page-wash);
  transition: background 900ms ease;
}

.value-page {
  overflow: hidden;
}

.value-page::before,
.value-page::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.value-page::before {
  z-index: 0;
  height: min(720px, 76vh);
  background:
    radial-gradient(circle at 9% 18%, rgba(255, 255, 255, 0.88) 0 1px, transparent 1.8px),
    radial-gradient(circle at 22% 38%, rgba(118, 255, 231, 0.66) 0 1px, transparent 1.7px),
    radial-gradient(circle at 38% 16%, rgba(255, 255, 255, 0.76) 0 1px, transparent 1.7px),
    radial-gradient(circle at 58% 29%, rgba(123, 140, 255, 0.74) 0 1px, transparent 1.8px),
    radial-gradient(circle at 78% 14%, rgba(255, 255, 255, 0.82) 0 1px, transparent 1.7px),
    radial-gradient(circle at 91% 36%, rgba(118, 255, 231, 0.7) 0 1px, transparent 1.8px),
    radial-gradient(ellipse at 50% -16%, rgba(53, 230, 196, 0.16), transparent 58%),
    linear-gradient(180deg, rgba(1, 5, 12, 0.96) 0%, rgba(3, 12, 18, 0.76) 38%, rgba(5, 16, 16, 0.26) 68%, transparent 100%);
  background-size:
    190px 170px,
    250px 210px,
    310px 190px,
    280px 230px,
    350px 220px,
    240px 180px,
    auto,
    auto;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.86) 54%, rgba(0, 0, 0, 0.28) 82%, transparent 100%);
  animation: skyTwinkle 7s ease-in-out infinite alternate;
}

.value-page::after {
  z-index: 0;
  height: min(820px, 86vh);
  background:
    radial-gradient(ellipse at 80% 8%, rgba(123, 140, 255, 0.13), transparent 44%),
    linear-gradient(180deg, transparent 0%, rgba(2, 7, 6, 0.12) 45%, transparent 100%);
  opacity: 0.72;
}

body[data-theme="light"] .value-page::before,
body[data-theme="light"] .value-page::after {
  display: none;
}

.value-page > *,
.calculator-page > *,
.placeholder-page > * {
  position: relative;
  z-index: 1;
}

.section-head {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto 24px;
  animation: floatIn 650ms ease both;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: none;
  transition: color 700ms ease, text-shadow 700ms ease;
}

h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 66px);
  line-height: 1;
  letter-spacing: 0;
}

.tools {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}

.search {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

input,
select {
  width: 220px;
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035)),
    var(--surface);
  color: var(--text);
  padding: 12px 13px;
  font: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 10px 34px var(--shadow);
  outline: none;
  transition: background 650ms ease, box-shadow 300ms ease, transform 240ms ease, color 650ms ease;
}

input:focus,
select:focus {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 34px color-mix(in srgb, var(--accent) 28%, transparent),
    0 16px 42px var(--shadow);
}

.market-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto 26px;
}

.strip-live {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: center;
}

.strip-live strong,
.strip-live span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.strip-live strong {
  margin-top: 0;
  color: var(--good);
  font-size: 24px;
  line-height: 1;
}

.strip-live i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--good);
  box-shadow: 0 0 16px var(--good);
  animation: liveBlink 1.1s ease-in-out infinite;
}

.investment-gold {
  color: transparent;
  background:
    linear-gradient(90deg, #8d5b13 0%, #f7c45b 14%, #fff0a8 28%, #b87918 42%, #ffe28a 56%, #8d5b13 70%, #f7c45b 84%, #fff0a8 100%);
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  filter: drop-shadow(0 0 10px rgba(255, 210, 116, 0.22));
  animation: metallicTextSlide 5.8s linear infinite;
}

.top-diamond {
  color: transparent;
  background:
    linear-gradient(90deg, #8eeaff, #ffffff, #b6f6ff, #7dbdff, #f7feff, #8eeaff);
  background-size: 260% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  filter:
    drop-shadow(0 0 9px rgba(142, 234, 255, 0.26))
    drop-shadow(0 0 16px rgba(255, 255, 255, 0.12));
  animation: diamondTextSlide 5.4s linear infinite;
}

.strip-item {
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018)),
    color-mix(in srgb, var(--surface) 70%, transparent);
  padding: 14px 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 30px rgba(0, 0, 0, 0.14);
  animation: softRise 700ms ease both;
  transition: background 700ms ease, box-shadow 700ms ease, transform 260ms ease;
}

.strip-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
}

.strip-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.strip-item strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
}

.strip-item.strip-live strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 0;
  color: var(--good);
  font-size: 24px;
  line-height: 1;
}

.trade-calculator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.62fr) minmax(0, 1fr);
  gap: 18px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

.trade-picker-screen {
  position: fixed;
  inset: 0;
  z-index: 45;
  overflow: auto;
  padding: 94px clamp(16px, 4vw, 52px) 44px;
  background: var(--page-wash);
  animation: detailsIn 260ms ease both;
}

.trade-picker-panel {
  max-width: 1180px;
  margin: 0 auto;
}

.trade-picker-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.trade-picker-search {
  max-width: 360px;
}

.trade-picker-search input {
  width: 100%;
}

.trade-picker-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.trade-picker-filter select {
  width: 176px;
}

.trade-picker-filter {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.trade-filter-tabs {
  display: flex;
  width: min(100%, 560px);
  flex-wrap: wrap;
  gap: 7px;
}

.trade-filter-tabs button {
  border: 0;
  border-radius: 999px;
  padding: 10px 12px;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018)),
    color-mix(in srgb, var(--surface) 72%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 8px 18px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 950;
  transition: color 250ms ease, background 350ms ease, box-shadow 350ms ease, transform 220ms ease;
}

.trade-filter-tabs button:hover,
.trade-filter-tabs button:focus-visible {
  transform: translateY(-1px);
  color: var(--text);
  outline: none;
}

.trade-filter-tabs button.is-active {
  color: var(--text);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 26%, transparent), rgba(255, 255, 255, 0.04)),
    color-mix(in srgb, var(--surface-strong) 84%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 0 1px color-mix(in srgb, var(--accent) 24%, transparent),
    0 0 24px color-mix(in srgb, var(--accent) 13%, transparent);
}

.trade-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.trade-pick-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 84px;
  border: 0;
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
    color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 12px 32px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  text-align: left;
  transition: transform 220ms ease, box-shadow 300ms ease, filter 220ms ease;
}

.trade-pick-card:hover,
.trade-pick-card:focus-visible {
  transform: translateY(-2px);
  filter: saturate(1.1);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 18px 40px rgba(0, 0, 0, 0.22);
}

.trade-pick-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 18%, transparent);
  font-weight: 950;
}

.trade-pick-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.trade-pick-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.trade-pick-card strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.trade-pick-value {
  color: var(--gold);
  font-size: 20px;
  font-weight: 950;
}

.trade-side,
.trade-result {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: var(--card-wash);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 22px 70px var(--shadow),
    var(--glow);
  animation: softRise 700ms ease both, cardBreath 5.2s ease-in-out infinite;
  transition: background 700ms ease, box-shadow 700ms ease, transform 260ms ease;
}

.trade-side::before,
.trade-result::before {
  content: "";
  position: absolute;
  inset: -40% auto auto -20%;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 32%, transparent), transparent 70%);
  filter: blur(10px);
  animation: auraPulse 4s ease-in-out infinite;
}

.trade-side {
  padding: 18px;
}

.trade-side-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.trade-side-head h3 {
  margin: 0;
  font-size: 24px;
}

.trade-side-head strong {
  color: var(--gold);
  font-size: 30px;
  line-height: 1;
  text-shadow: 0 0 28px color-mix(in srgb, var(--gold) 38%, transparent);
}

.trade-add {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 10px;
  margin-bottom: 16px;
}

.trade-add select,
.trade-add input {
  width: 100%;
}

.trade-add input {
  text-align: center;
}

.trade-add button,
.trade-row button {
  padding: 12px 14px;
  color: var(--text);
  cursor: pointer;
}

.trade-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.trade-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035)),
    color-mix(in srgb, var(--surface) 70%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 12px 36px var(--shadow);
  animation: softRise 320ms ease both;
}

.trade-row strong,
.trade-row span {
  display: block;
  overflow-wrap: anywhere;
}

.trade-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.trade-row b {
  grid-column: 3;
  grid-row: 1;
  color: var(--gold);
  font-size: 18px;
  text-shadow: 0 0 20px color-mix(in srgb, var(--gold) 26%, transparent);
}

.trade-row > button {
  grid-column: 3;
  grid-row: 2;
  padding: 9px 10px;
  font-size: 12px;
}

.trade-qty-control {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: 26px 42px 26px;
  align-items: center;
  overflow: hidden;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02)),
    color-mix(in srgb, var(--surface) 70%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 8px 18px rgba(0, 0, 0, 0.12);
}

.trade-qty-control .qty-step {
  display: grid;
  width: 26px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 950;
  transition: background 220ms ease, color 220ms ease;
}

.trade-qty-control .qty-step:hover,
.trade-qty-control .qty-step:focus-visible {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: #fff;
  outline: none;
}

.trade-qty-control .qty-input {
  width: 42px;
  height: 30px;
  padding: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.035);
  box-shadow:
    inset 1px 0 0 rgba(255, 255, 255, 0.06),
    inset -1px 0 0 rgba(255, 255, 255, 0.06);
  text-align: center;
  font-size: 13px;
  font-weight: 950;
  appearance: textfield;
}

.trade-qty-control .qty-input::-webkit-outer-spin-button,
.trade-qty-control .qty-input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.trade-icon {
  display: grid;
  grid-row: 1 / span 2;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 24%, transparent);
  color: var(--text);
  font-weight: 900;
}

.trade-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.trade-empty {
  margin: 0;
  padding: 18px;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  background: color-mix(in srgb, var(--surface) 56%, transparent);
}

.trade-result {
  display: grid;
  min-height: 260px;
  padding: 24px;
  place-items: center;
  text-align: center;
}

.trade-result > * {
  position: relative;
  z-index: 1;
}

#tradeVerdict {
  display: block;
  font-size: clamp(48px, 8vw, 86px);
  line-height: 0.9;
  text-shadow: 0 0 42px color-mix(in srgb, var(--accent) 44%, transparent);
  animation: titlePulse 3.6s ease-in-out infinite;
}

#tradeVerdict[data-verdict="w"],
#tradeVerdict[data-verdict="good"] {
  color: var(--good);
}

#tradeVerdict[data-verdict="fair"] {
  color: var(--gold);
}

#tradeVerdict[data-verdict="bad"],
#tradeVerdict[data-verdict="l"] {
  color: var(--bad);
}

#tradePercent {
  display: inline-grid;
  min-width: 92px;
  margin-top: 8px;
  padding: 8px 12px;
  place-items: center;
  border-radius: 999px;
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  box-shadow: 0 0 26px color-mix(in srgb, var(--accent) 26%, transparent);
  font-weight: 900;
}

#tradeSummary {
  max-width: 230px;
  margin: 12px 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.value-card {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.022) 52%, color-mix(in srgb, var(--accent) 5%, transparent)),
    color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--text);
  display: grid;
  min-height: 242px;
  align-content: space-between;
  gap: 12px;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 14px 38px rgba(0, 0, 0, 0.18);
  transition:
    transform 260ms ease,
    background 700ms ease,
    color 650ms ease,
    box-shadow 420ms ease,
    filter 260ms ease;
  animation: softRise 520ms ease both;
}

.value-card.is-rainbow-card {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025) 42%, rgba(255, 71, 180, 0.08)),
    color-mix(in srgb, var(--surface) 82%, transparent);
}

.value-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 18%, rgba(255, 255, 255, 0.12) 42%, transparent 64%);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-90%);
  animation: cardShine 7s ease-in-out infinite;
}

.value-card::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 36%, transparent), transparent);
  opacity: 0.58;
  transform: scaleX(0.72);
  animation: valueLinePulse 3.8s ease-in-out infinite;
}

.value-card:nth-child(3n + 1) {
  animation-delay: 0ms, -1.2s;
}

.value-card:nth-child(3n + 2) {
  animation-delay: 70ms, -2.1s;
}

.value-card:nth-child(3n) {
  animation-delay: 140ms, -3s;
}

.value-card:hover,
.value-card:focus-visible {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    0 22px 48px rgba(0, 0, 0, 0.26),
    0 0 22px color-mix(in srgb, var(--accent) 9%, transparent);
  transform: translateY(-4px);
  outline: none;
}

.value-card:hover .pet-icon,
.value-card:focus-visible .pet-icon {
  transform: translateY(-2px) scale(1.06) rotate(-2deg);
}

.value-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.value-card .pet-icon {
  width: 72px;
  height: 72px;
  margin: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 10px 24px rgba(0, 0, 0, 0.18);
}

.value-card h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  min-height: 56px;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.12;
}

.variant-controls {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.variant-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.variant-break {
  flex-basis: 100%;
  height: 0;
}

.variant-pill,
.rainbow-toggle {
  border: 0;
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02)),
    rgba(7, 5, 6, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 18px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  transition: transform 220ms ease, background 450ms ease, box-shadow 450ms ease, filter 220ms ease, color 250ms ease, opacity 250ms ease;
}

.variant-pill:hover,
.rainbow-toggle:hover {
  filter: saturate(1.14);
}

.variant-pill.is-active {
  color: #fff;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 52%, #1a060a), color-mix(in srgb, var(--accent-2) 34%, #13080a)),
    rgba(14, 7, 9, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 0 1px color-mix(in srgb, var(--accent-2) 42%, transparent),
    0 0 24px color-mix(in srgb, var(--accent) 24%, transparent);
  transform: translateY(-1px);
}

.rainbow-toggle {
  position: relative;
  display: block;
  width: 46px;
  height: 28px;
  flex: 0 0 46px;
  margin-left: auto;
  padding: 0;
  color: transparent;
  background:
    radial-gradient(circle at 24% 34%, rgba(255, 255, 255, 0.14), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018)),
    rgba(7, 5, 6, 0.34);
  border-radius: 999px;
  opacity: 0.58;
  font-size: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    inset 0 0 18px rgba(0, 0, 0, 0.26),
    0 7px 16px rgba(0, 0, 0, 0.12);
  transition:
    opacity 620ms ease,
    box-shadow 900ms ease,
    background 900ms ease,
    transform 360ms ease;
}

.rainbow-toggle::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 4px;
  left: 5px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.88), transparent 28%),
    linear-gradient(135deg, #ff475f 0%, #ffd2a1 25%, #53f0a1 48%, #6ab7ff 70%, #b885ff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 2px 8px rgba(0, 0, 0, 0.28),
    0 0 8px rgba(106, 183, 255, 0.1);
  filter: saturate(0.72) brightness(0.86);
  transform-origin: center;
  transition:
    background 520ms ease,
    box-shadow 520ms ease,
    filter 520ms ease,
    transform 980ms cubic-bezier(.16, .82, .22, 1);
}

.rainbow-toggle::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 76% 50%, rgba(255, 255, 255, 0.5), transparent 22%),
    linear-gradient(90deg, #ff475f 0%, #ffd2a1 18%, #53f0a1 38%, #6ab7ff 58%, #b885ff 78%, #ff475f 100%);
  background-size: 600% 100%;
  opacity: 0;
  pointer-events: none;
  animation: rainbowSlide 6s linear infinite;
  transition: opacity 780ms ease;
}

.rainbow-toggle.is-active {
  opacity: 1;
  background:
    linear-gradient(90deg, #ff475f 0%, #ffd2a1 18%, #53f0a1 38%, #6ab7ff 58%, #b885ff 78%, #ff475f 100%),
    rgba(7, 5, 6, 0.36);
  background-size: 600% 100%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 0 16px rgba(255, 255, 255, 0.06),
    0 0 14px rgba(255, 71, 95, 0.18),
    0 0 24px rgba(106, 183, 255, 0.2);
  animation: rainbowSlide 6s linear infinite;
}

.rainbow-toggle.is-active::before {
  transform: translateX(16px) rotate(180deg);
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.92), transparent 28%),
    linear-gradient(135deg, #ff475f 0%, #ffd2a1 28%, #53f0a1 48%, #6ab7ff 68%, #b885ff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 2px 8px rgba(0, 0, 0, 0.28),
    0 0 7px rgba(255, 210, 161, 0.3),
    0 0 13px rgba(106, 183, 255, 0.32);
  filter: saturate(1.5) brightness(1.08);
}

.rainbow-toggle.is-active::after {
  opacity: 0.32;
}

.rainbow-toggle.is-toggling::before {
  animation: rainbowKnobDrift 980ms cubic-bezier(.16, .82, .22, 1);
}

.rainbow-toggle.is-toggling::after {
  animation: rainbowSlide 6s linear infinite, rainbowTrackBloom 980ms ease;
}

.value-card-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.value-stack {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.exist-count {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: color-mix(in srgb, var(--text) 84%, var(--gold));
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 18px color-mix(in srgb, var(--accent) 16%, transparent);
}

.value-number {
  display: block;
  color: var(--gold);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 950;
  line-height: 1;
  text-shadow: none;
  transition: color 700ms ease, text-shadow 700ms ease;
}

.infinity-value {
  display: inline-block;
  color: transparent;
  background: linear-gradient(90deg, #ff475f 0%, #ffd2a1 16.666%, #53f0a1 33.333%, #6ab7ff 50%, #b885ff 66.666%, #ff475f 83.333%, #ffd2a1 100%);
  background-size: 600% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  font-size: clamp(38px, 4vw, 54px);
  line-height: 0.72;
  text-shadow: none;
  animation: rainbowSlide 6s linear infinite;
}

.rainbow-name {
  color: transparent;
  background:
    linear-gradient(90deg, #ff475f 0%, #ffd2a1 16.666%, #53f0a1 33.333%, #6ab7ff 50%, #b885ff 66.666%, #ff475f 83.333%, #ffd2a1 100%);
  background-size: 600% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  filter: drop-shadow(0 0 12px rgba(106, 183, 255, 0.2));
  animation: rainbowSlide 6s linear infinite;
}

.trend {
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 0 24px color-mix(in srgb, currentColor 22%, transparent);
  animation: pillGlow 2.7s ease-in-out infinite;
}

.trend.rising {
  background: color-mix(in srgb, var(--good) 18%, transparent);
  color: var(--good);
}

.trend.falling {
  background: color-mix(in srgb, var(--bad) 18%, transparent);
  color: var(--bad);
}

.trend.steady {
  background: color-mix(in srgb, var(--steady) 18%, transparent);
  color: var(--steady);
}

.details-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  overflow: auto;
  background: var(--page-wash);
  animation: detailsIn 360ms ease both;
}

.back-button {
  margin-bottom: 24px;
  padding: 12px 16px;
  cursor: pointer;
}

.details-layout {
  display: grid;
  gap: 22px;
  max-width: 1080px;
  margin: 0 auto;
}

.details-main {
  display: flex;
  gap: 20px;
  align-items: center;
  animation: floatIn 500ms ease both;
}

.stat-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.detail-exist {
  flex: 0 0 auto;
}

.pet-badge {
  flex: 0 0 118px;
  width: 118px;
  height: 118px;
  font-size: 58px;
}

#detailMeta {
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stats > div,
.chart-panel {
  border-radius: 8px;
  background: var(--card-wash);
  padding: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 18px 60px var(--shadow);
  transition: background 700ms ease, box-shadow 700ms ease;
}

.stats span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stats strong {
  display: block;
  margin-top: 6px;
  font-size: 30px;
}

.chart-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.chart-head h3,
.chart-head p {
  margin: 0;
}

.chart-head p {
  color: var(--muted);
}

#historyChart {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 22px color-mix(in srgb, var(--accent) 20%, transparent));
}

.placeholder-page {
  display: grid;
  place-items: center;
  text-align: center;
}

.placeholder-page h2 {
  max-width: 12ch;
}

.discord-page {
  display: grid;
  place-items: center;
  height: 100vh;
  min-height: 100vh;
  padding: 96px clamp(18px, 4vw, 60px) 36px;
  background: transparent;
  overflow: hidden;
}

.discord-panel {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  width: min(100%, 540px);
  padding: 38px clamp(22px, 5vw, 46px);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.02)),
    color-mix(in srgb, var(--surface) 82%, transparent);
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    0 22px 70px var(--shadow),
    0 0 44px color-mix(in srgb, var(--accent) 12%, transparent);
  animation: floatIn 520ms ease both;
}

.discord-mark {
  display: grid;
  width: 74px;
  height: 74px;
  margin-bottom: 14px;
  place-items: center;
}

.discord-mark img {
  width: 74px;
  height: 74px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 18px color-mix(in srgb, var(--accent) 32%, transparent))
    drop-shadow(0 8px 20px rgba(0, 0, 0, 0.28));
}

.discord-panel h2 {
  max-width: 13ch;
  margin-bottom: 12px;
  font-size: clamp(32px, 4.4vw, 52px);
}

.discord-copy {
  max-width: 34ch;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.5;
}

.discord-invite {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 8px;
  color: var(--text);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 28%, transparent), rgba(255, 255, 255, 0.045)),
    color-mix(in srgb, var(--surface-strong) 86%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 14px 34px var(--shadow),
    0 0 28px color-mix(in srgb, var(--accent) 22%, transparent);
  font-size: 15px;
  font-weight: 950;
  text-decoration: none;
  transition: transform 260ms ease, box-shadow 360ms ease, filter 260ms ease;
}

.discord-invite:hover,
.discord-invite:focus-visible {
  transform: translateY(-2px);
  filter: saturate(1.12);
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 18px 42px var(--shadow),
    0 0 38px color-mix(in srgb, var(--accent) 32%, transparent);
}

.info-page {
  min-height: 100vh;
  padding: 112px clamp(18px, 5vw, 70px) 64px;
  position: relative;
}

.info-head {
  max-width: 1180px;
  margin: 0 auto 24px;
}

.info-grid {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.info-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.025)),
    color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 18px 54px var(--shadow);
  animation: cardRise 700ms ease both;
}

.info-card::before {
  content: "";
  position: absolute;
  inset: -45% auto auto -16%;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 18%, transparent), transparent 66%);
  opacity: .75;
  pointer-events: none;
}

.info-card span {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 26px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent-2);
  background: rgba(255,255,255,.08);
  font-size: 12px;
  font-weight: 950;
}

.info-card h3 {
  position: relative;
  margin: 0 0 10px;
  font-size: clamp(20px, 2.3vw, 30px);
  line-height: 1.08;
}

.info-card p {
  position: relative;
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.7;
}

.info-card.is-featured {
  min-height: 220px;
  background:
    radial-gradient(circle at 82% 16%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 34%),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, transparent), rgba(255,255,255,.04)),
    color-mix(in srgb, var(--surface-strong) 88%, transparent);
}

body[data-theme="light"] .info-card {
  background:
    linear-gradient(145deg, rgba(255,255,255,.7), rgba(255,255,255,.42)),
    color-mix(in srgb, var(--surface) 94%, transparent);
}

@keyframes pageBreath {
  from {
    background-position: 0% 0%;
  }
  to {
    background-position: 18% 10%;
  }
}

@keyframes auraDrift {
  from {
    transform: rotate(0deg) scale(1);
  }
  to {
    transform: rotate(360deg) scale(1.08);
  }
}

@keyframes skyTwinkle {
  from {
    opacity: 0.72;
    filter: saturate(1) brightness(0.96);
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, center, center;
  }
  to {
    opacity: 0.98;
    filter: saturate(1.18) brightness(1.08);
    background-position: 12px 8px, -10px 14px, 8px -12px, -14px -9px, 10px 12px, -8px 10px, center, center;
  }
}

@keyframes navSettle {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(120%);
  }
}

@keyframes heroAura {
  from {
    opacity: 0.62;
    transform: scale(0.98) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1.04) translateY(-8px);
  }
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes titlePulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-4px) scale(1.012);
  }
}

@keyframes buttonPulse {
  0%,
  100% {
    box-shadow: 0 0 38px color-mix(in srgb, var(--accent) 34%, transparent), 0 20px 60px var(--shadow);
  }
  50% {
    box-shadow: 0 0 62px color-mix(in srgb, var(--accent) 52%, transparent), 0 28px 80px var(--shadow);
  }
}

@keyframes slideTrack {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-50% - 7px));
  }
}

@keyframes cardFloat {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -8px;
  }
}

@keyframes softRise {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cardBreath {
  0%,
  100% {
    filter: saturate(1);
  }
  50% {
    filter: saturate(1.15);
  }
}

@keyframes cardShine {
  0%,
  48% {
    transform: translateX(-80%);
    opacity: 0;
  }
  58% {
    opacity: 0.55;
  }
  72%,
  100% {
    transform: translateX(80%);
    opacity: 0;
  }
}

@keyframes valueLinePulse {
  0%,
  100% {
    opacity: 0.32;
    transform: scaleX(0.62);
  }
  50% {
    opacity: 0.72;
    transform: scaleX(1);
  }
}

@keyframes rainbowSlide {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 100% 50%;
  }
}

@keyframes rainbowAuraSpin {
  from {
    background-position: 0 0;
    filter: hue-rotate(0deg) saturate(1.18);
  }
  to {
    background-position: 0 0;
    filter: hue-rotate(360deg) saturate(1.18);
  }
}

@keyframes moonHaloSpin {
  from {
    transform: rotate(0deg) scale(0.92);
  }
  to {
    transform: rotate(360deg) scale(0.92);
  }
}

@keyframes moonButtonPulse {
  0%,
  100% {
    transform: translateY(0);
    filter: saturate(1);
  }
  50% {
    transform: translateY(-1px);
    filter: saturate(1.18);
  }
}

@keyframes rainbowKnobSettle {
  0% {
    scale: 1;
  }
  45% {
    scale: 1.14 0.88;
  }
  72% {
    scale: 0.96 1.06;
  }
  100% {
    scale: 1;
  }
}

@keyframes rainbowKnobDrift {
  0% {
    filter: saturate(0.9) brightness(0.92);
  }
  45% {
    filter: saturate(1.18) brightness(1);
  }
  100% {
    filter: saturate(1.5) brightness(1.08);
  }
}

@keyframes rainbowTrackBloom {
  0% {
    filter: saturate(0.82) brightness(0.9);
  }
  50% {
    filter: saturate(1.45) brightness(1.12);
  }
  100% {
    filter: saturate(1) brightness(1);
  }
}

@keyframes metallicTextSlide {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 200% 50%;
  }
}

@keyframes diamondTextSlide {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 260% 50%;
  }
}

@keyframes liveBlink {
  0%,
  100% {
    opacity: 0.42;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes auraPulse {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(0.95);
  }
  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}

@keyframes pillGlow {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.18);
  }
}

@keyframes detailsIn {
  from {
    opacity: 0;
    transform: scale(0.99);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: center;
    gap: 10px;
    padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
    overflow: hidden;
    animation: none;
    transform: none;
  }

  .brand {
    width: 52px;
    height: 38px;
  }

  .brand img {
    width: 44px;
    height: 44px;
  }

  .nav-menu {
    flex: 1 1 auto;
    max-width: calc(100vw - 132px);
    gap: 7px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 4px;
    -webkit-overflow-scrolling: touch;
  }

  .nav-link {
    flex: 0 0 auto;
    padding: 8px 10px;
    font-size: 12px;
  }

  .theme-toggle {
    flex: 0 0 auto;
    width: 48px;
    height: 30px;
  }

  .hero {
    padding-top: calc(112px + env(safe-area-inset-top));
  }

  .carousel-card {
    flex-basis: 142px;
    min-height: 158px;
  }

  .pet-icon {
    width: 64px;
    height: 64px;
    font-size: 30px;
  }

  .section-head,
  .details-main,
  .chart-head {
    align-items: start;
    flex-direction: column;
  }

  .section-head {
    display: grid;
  }

  input,
  select {
    width: min(100%, 320px);
  }

  .market-strip,
  .stats {
    grid-template-columns: 1fr;
  }

  .value-card {
    min-height: 220px;
  }

  .value-card .pet-icon {
    width: 60px;
    height: 60px;
  }

  .value-card-bottom {
    align-items: center;
  }

  .trade-calculator {
    grid-template-columns: 1fr;
  }

  .info-page {
    padding: 104px 14px 48px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .info-card,
  .info-card.is-featured {
    min-height: auto;
    padding: 20px;
  }

  .trade-add {
    grid-template-columns: minmax(0, 1fr) 74px;
  }

  .trade-row {
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }

  .trade-qty-control {
    grid-column: 2 / 3;
    width: max-content;
  }

  .trade-row b {
    grid-column: 3 / 4;
  }

  .trade-row > button {
    grid-column: 2 / -1;
  }
}

@media (max-width: 430px) {
  .topbar {
    gap: 6px;
    padding-inline: 8px;
  }

  .brand {
    width: 46px;
    height: 36px;
  }

  .brand img {
    width: 40px;
    height: 40px;
  }

  .nav-menu {
    max-width: calc(100vw - 106px);
    gap: 5px;
    padding-right: 0;
  }

  .nav-link {
    padding: 8px 9px;
    font-size: 11px;
  }

  .theme-toggle {
    width: 44px;
    height: 28px;
    padding: 3px;
  }
}
