:root {
  /* LO Flex Grid–style blues + punchy yellow */
  --lo-blue-deep: #2d6fd4;
  --lo-blue-mid: #4a8df3;
  --lo-blue-light: #7bb9f9;
  --lo-blue-primary: #1e73ff;
  --lo-yellow: #ffd84d;
  --lo-yellow-bright: #ffdf66;
  --lo-navy: #0f2f6e;
  --hot-glow: rgba(255, 216, 77, 0.55);
  --cold-glow: rgba(30, 115, 255, 0.32);
  --text-on-light: #0f172a;
  --text-on-lo: #ffffff;
  --muted-on-lo: rgba(255, 255, 255, 0.88);
  --glass: rgba(255, 255, 255, 0.22);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-strong: rgba(255, 255, 255, 0.94);
  --shadow: 0 12px 40px rgba(15, 47, 110, 0.28);
  --shadow-soft: 0 8px 24px rgba(15, 47, 110, 0.18);
  --radius-lg: 24px;
  --radius-md: 20px;
  --tap: 0.95;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text-on-light);
  font-family: ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: linear-gradient(180deg, var(--lo-blue-light) 0%, var(--lo-blue-mid) 42%, var(--lo-blue-deep) 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(closest-side at 50% 36%, rgba(255, 255, 255, 0.09), transparent 68%);
  mix-blend-mode: soft-light;
  opacity: 0.9;
}

button,
input {
  font: inherit;
}

.screen {
  display: none;
  min-height: 100dvh;
  background: linear-gradient(180deg, var(--lo-blue-light) 0%, var(--lo-blue-mid) 42%, var(--lo-blue-deep) 100%);
  background-attachment: fixed;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}

.screen--active {
  display: block;
}

/* -------------------------
   Pick 3 mode
   ------------------------- */
.pick3-headrow {
  width: 100%;
  max-width: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

.pick3-header-pill {
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  text-shadow: 0 1px 2px rgba(15, 47, 110, 0.35);
}

.pick3-header-pill.is-green {
  background: rgba(76, 175, 80, 0.92);
  border-color: rgba(76, 175, 80, 0.9);
}

.pick3-header-pill.is-yellow {
  background: rgba(255, 216, 77, 0.96);
  border-color: rgba(255, 216, 77, 0.95);
  color: #111;
  text-shadow: none;
}

.pick3-header-pill.is-red {
  background: rgba(255, 77, 77, 0.92);
  border-color: rgba(255, 77, 77, 0.9);
}

.pick3-header-pill.is-done {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
}

.pick3-timer {
  min-width: 78px;
  text-align: center;
  padding: 12px 14px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 18px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.95);
}

.pick3-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 640px;
  margin: 0 auto;
}

/* 2 (top row) + 1 (big underneath) on all screens */
.pick3-item.large {
  grid-column: span 2;
}

/* (intentionally no 3-up desktop layout for Pick 3) */

.pick3-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  cursor: pointer;
  touch-action: manipulation;
}

.pick3-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  width: 140%;
  text-align: center;
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 2.5px;
  padding: 16px 0;
  border: 6px solid;
  border-radius: 12px;
  opacity: 0.85;
  display: none;
  pointer-events: none;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
  animation: stampIn 0.25s ease-out;
}

.stamp.green {
  display: block;
  color: #2ecc71;
  border-color: #2ecc71;
  background: rgba(46, 204, 113, 0.28);
}

.stamp.yellow {
  display: block;
  color: #f1c40f;
  border-color: #f1c40f;
  background: rgba(241, 196, 15, 0.28);
}

.stamp.red {
  display: block;
  color: #e74c3c;
  border-color: #e74c3c;
  background: rgba(231, 76, 60, 0.28);
}

@keyframes stampIn {
  0% {
    transform: translate(-50%, -50%) scale(1.5) rotate(-15deg);
    opacity: 0;
  }
  60% {
    transform: translate(-50%, -50%) scale(0.9) rotate(-15deg);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1) rotate(-15deg);
  }
}

@media (max-width: 420px) {
  .pick3-grid {
    gap: 12px;
  }
  .stamp {
    font-size: 1.35rem;
    padding: 14px 0;
  }
}

/* Slightly bigger cards on phones by reducing card padding */
@media (max-width: 420px) {
  #screen-pick3 .card {
    padding: 10px;
  }
}

/* Pick 3: make header logo match tile/card width */
#screen-pick3 .lo-logo-pair {
  width: 100%;
  max-width: 480px; /* slightly inset vs tiles */
}

#screen-pick3 .logo--brand {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 420px) {
  #screen-pick3 .content {
    padding-top: 8px;
  }
}

.pick3-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.pick3-overlay.visible {
  display: flex;
}

.collection-mode-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(17, 17, 17, 0.92);
  color: white;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
  text-align: center;
  width: fit-content;
  max-width: min(92vw, 520px);
}

.collection-mode-banner.visible {
  opacity: 1;
}

.pick3-result {
  background: rgba(255, 216, 77, 0.96);
  border: 1px solid rgba(255, 216, 77, 0.95);
  border-radius: 18px;
  padding: 18px 20px;
  color: #111;
  font-weight: 900;
  font-size: 1.1rem;
  text-align: center;
  width: min(92vw, 420px);
  box-shadow: var(--shadow);
}

/* ——— Loading ——— */
.center-stack {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 24px;
  gap: 18px;
  text-align: center;
}

.center-stack .lo-logo-pair {
  max-width: 520px;
  width: 100%;
}

.logo {
  display: block;
  object-fit: contain;
}

.logo--large {
  width: min(200px, 52vw);
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(15, 47, 110, 0.35));
}

.muted {
  margin: 0;
  color: var(--muted-on-lo);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 2px rgba(15, 47, 110, 0.35);
}

/* ——— Main: hero logo at top (above card) ——— */
.lo-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px 8px;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.lo-hero--add,
.lo-hero--main {
  position: relative;
  padding-top: 16px;
}

a.icon-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn--overlay {
  position: absolute;
  left: 12px;
  top: 14px;
  z-index: 2;
}

.clear-filter-btn {
  width: 100%;
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 1000;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clear-filter-btn--glow {
  border-color: rgba(255, 216, 77, 0.95) !important;
  box-shadow: 0 0 0 2px rgba(255, 216, 77, 0.26), 0 14px 34px rgba(255, 216, 77, 0.18) !important;
  background: rgba(255, 216, 77, 0.12) !important;
  animation: clearGlowPulse 1.15s ease-in-out infinite;
}

@keyframes clearGlowPulse {
  0% {
    box-shadow: 0 0 0 2px rgba(255, 216, 77, 0.18), 0 10px 26px rgba(255, 216, 77, 0.1);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(255, 216, 77, 0.32), 0 18px 44px rgba(255, 216, 77, 0.22);
    transform: translateY(-1px);
  }
  100% {
    box-shadow: 0 0 0 2px rgba(255, 216, 77, 0.18), 0 10px 26px rgba(255, 216, 77, 0.1);
    transform: translateY(0);
  }
}

.clear-filter-btn.hidden {
  display: none;
}

.clear-filter-btn:active {
  transform: scale(var(--tap));
}

.collections-btn {
  width: 100%;
  margin-top: 6px;
}

.collections-btn:active {
  transform: scale(var(--tap));
}

.lo-hero--add .title {
  margin-top: 6px;
  font-size: 22px;
  letter-spacing: 0.02em;
}

.lo-hero--add .subtitle--small {
  margin-top: -2px;
  font-size: 16px;
  font-weight: 900;
}

.lo-logo-pair {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 0;
  margin-bottom: -2px;
}

.lo-logo-pair .logo--brand {
  margin-top: -6px;
}

.logo--hero {
  width: min(184px, 48vw);
  height: auto;
  max-height: 200px;
  filter: drop-shadow(0 10px 20px rgba(15, 47, 110, 0.35));
}

.logo--brand {
  width: 100%;
  height: auto;
  max-height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(15, 47, 110, 0.28));
}

.lo-subtitle {
  font-weight: 800;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 1px 2px rgba(15, 47, 110, 0.35);
  margin-top: -2px;
}

.lo-microtext {
  margin: 6px 0 0;
  padding: 10px 18px;
  max-width: min(100%, 520px);
  display: inline-block;
  font-weight: 900;
  font-size: 18px;
  line-height: 1.35;
  text-align: center;
  color: var(--lo-navy);
  background: rgba(255, 216, 77, 0.94);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(15, 47, 110, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 300ms ease, transform 300ms ease, box-shadow 300ms ease;
}

.lo-microtext.is-fading {
  opacity: 0;
  transform: translateY(-2px);
}

/* ——— Content blocks ——— */
.content {
  padding: 6px 16px 28px;
  display: grid;
  gap: 14px;
  max-width: 520px;
  margin: 0 auto;
}

.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 55px rgba(15, 47, 110, 0.32), 0 6px 18px rgba(15, 47, 110, 0.18);
  padding: 14px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 40%);
  opacity: 0.55;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32), 0 0 0 1px rgba(30, 115, 255, 0.14);
  opacity: 0.9;
}

.nft-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

/* Main rating: yellow “mat” behind the NFT art */
#screen-main .nft-stage {
  background: linear-gradient(
    165deg,
    var(--lo-yellow-bright) 0%,
    var(--lo-yellow) 42%,
    rgba(255, 200, 60, 0.92) 100%
  );
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.55),
    inset 0 -8px 24px rgba(180, 140, 0, 0.18);
}

/* Main rating: whole card (padding + label strip) reads yellow, not blue glass */
#screen-main .card {
  padding: 18px;
  background: linear-gradient(
    180deg,
    rgba(255, 236, 150, 0.96) 0%,
    rgba(255, 216, 77, 0.94) 38%,
    rgba(255, 200, 70, 0.93) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 18px 50px rgba(15, 47, 110, 0.2), 0 8px 22px rgba(180, 140, 0, 0.28);
}

#screen-main .card::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), transparent 48%);
  opacity: 0.45;
}

#screen-main .card::after {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  opacity: 0.65;
}

.nft-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: var(--radius-lg);
  transform: translateZ(0) scale(0.98);
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform, opacity;
}

.nft-image.is-ready {
  opacity: 1;
  transform: translateZ(0) scale(1);
}

.nft-image.is-exiting {
  opacity: 0;
  transform: scale(0.985);
}

.nft-image.vote-hot {
  transform: translateX(16px) rotate(1.6deg) scale(0.99);
  opacity: 0;
}

.nft-image.vote-cold {
  transform: translateX(-16px) rotate(-1.6deg) scale(0.99);
  opacity: 0;
}

.nft-image.vote-hot,
.nft-image.vote-cold {
  transition: opacity 250ms ease-out, transform 250ms ease-out;
}

.nft-image.is-reset {
  transition: none;
  transform: translateZ(0) scale(0.98);
}

.nft-image.is-ready {
  animation: nft-idle 3.6s ease-in-out infinite;
}

.nft-image.vote-hot,
.nft-image.vote-cold,
.nft-image.is-reset {
  animation: none;
}

@keyframes nft-idle {
  0%,
  100% {
    transform: translateZ(0) scale(1);
  }
  50% {
    transform: translateZ(0) scale(1.01);
  }
}

.nft-skeleton {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(
    90deg,
    rgba(30, 115, 255, 0.15),
    rgba(255, 216, 77, 0.28),
    rgba(30, 115, 255, 0.15)
  );
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
  opacity: 1;
  transition: opacity 180ms ease;
}

.nft-skeleton.is-hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes shimmer {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 200% 0%;
  }
}

.progress-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(15, 47, 110, 0.82);
  box-shadow: 0 3px 10px rgba(15, 47, 110, 0.12);
  line-height: 1.2;
  pointer-events: none;
  transform-origin: center;
  transition: transform 0.15s ease;
  font-variant-numeric: tabular-nums;
}

.progress-badge.bump {
  transform: scale(1.08);
}

@keyframes progress-badge-glow {
  0%,
  100% {
    box-shadow: 0 3px 10px rgba(15, 47, 110, 0.12);
  }
  50% {
    box-shadow:
      0 3px 10px rgba(15, 47, 110, 0.12),
      0 0 14px rgba(255, 216, 77, 0.75),
      0 0 26px rgba(30, 115, 255, 0.28);
  }
}

.progress-badge--glow {
  animation: progress-badge-glow 0.65s ease-out;
}

.nft-score-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding: 6px 10px 7px;
  max-width: calc(100% - 20px);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 47, 110, 0.12);
  box-shadow: 0 4px 14px rgba(15, 47, 110, 0.18);
  pointer-events: none;
  text-align: right;
}

.nft-score-badge__value {
  font-weight: 1000;
  font-size: 15px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: var(--lo-blue-primary);
  font-variant-numeric: tabular-nums;
}

.nft-score-badge__votes {
  font-weight: 800;
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(15, 47, 110, 0.55);
  font-variant-numeric: tabular-nums;
}

.collection {
  margin-top: 10px;
  font-weight: 900;
  font-size: 13px;
  color: var(--text-on-lo);
  text-align: center;
  text-shadow: 0 1px 2px rgba(15, 47, 110, 0.4);
}

/* Main rating: collection name under the NFT (only #nft-collection uses .collection) */
#screen-main #nft-collection.collection {
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-top: 12px;
  color: var(--lo-navy);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

#screen-main #nft-collection.collection.is-clickable {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

.buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 16px 14px;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-soft);
  transition: transform 140ms cubic-bezier(0.2, 0.9, 0.2, 1.2), filter 120ms ease, opacity 120ms ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  will-change: transform;
}

.buttons .btn {
  font-size: 22px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.btn:disabled {
  opacity: 0.55;
}

.btn--primary {
  background: linear-gradient(180deg, #2a7cff 0%, var(--lo-blue-primary) 100%);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 0 rgba(15, 47, 110, 0.35), var(--shadow-soft);
}

.btn--accent {
  background: linear-gradient(180deg, var(--lo-yellow-bright) 0%, var(--lo-yellow) 100%);
  color: var(--lo-navy);
  border: 2px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 7px 0 rgba(180, 140, 0, 0.4), 0 10px 28px rgba(15, 47, 110, 0.18);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-on-lo);
  border: 2px solid rgba(255, 216, 77, 0.65);
  box-shadow: 0 3px 0 rgba(15, 47, 110, 0.18);
  padding: 14px 14px;
  opacity: 0.9;
}

.btn--compact {
  padding: 0 14px;
  border-radius: 999px;
  height: 54px;
  white-space: nowrap;
}

.btn.is-pressed {
  transform: scale(var(--tap));
  filter: brightness(0.98);
}

.btn.is-bouncing {
  animation: btn-bounce 140ms ease-out;
}

@keyframes btn-bounce {
  0% {
    transform: scale(0.98);
  }
  55% {
    transform: scale(1.03);
  }
  100% {
    transform: scale(1);
  }
}

.btn.glow-hot {
  animation: glow-hot 180ms ease-out;
}

.btn.glow-cold {
  animation: glow-cold 180ms ease-out;
}

@keyframes glow-hot {
  0% {
    box-shadow: 0 0 0 rgba(255, 216, 77, 0), var(--shadow-soft);
  }
  100% {
    box-shadow: 0 0 22px rgba(255, 216, 77, 0.35), var(--shadow-soft);
  }
}

@keyframes glow-cold {
  0% {
    box-shadow: 0 0 0 rgba(30, 115, 255, 0), var(--shadow-soft);
  }
  100% {
    box-shadow: 0 0 22px rgba(30, 115, 255, 0.28), var(--shadow-soft);
  }
}

/* ——— Score overlay ——— */
.score-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 47, 110, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
  padding: 20px;
}

.score-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.score-overlay.is-hiding {
  opacity: 0;
  transition: opacity 520ms ease;
}

.score-overlay__card {
  background: var(--glass-strong);
  border-radius: var(--radius-lg);
  border: 3px solid var(--lo-yellow);
  box-shadow: var(--shadow), 0 0 0 1px rgba(30, 115, 255, 0.2);
  padding: 20px 18px;
  text-align: center;
  max-width: 320px;
  width: 100%;
  transform: scale(0.85);
  will-change: transform, box-shadow, background;
}

.score-overlay.is-visible .score-overlay__card {
  animation: overlay-pop 420ms cubic-bezier(0.18, 0.9, 0.2, 1.1);
}

@keyframes overlay-pop {
  0% {
    transform: scale(0.85);
  }
  55% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.score-overlay.is-hot .score-overlay__card {
  box-shadow: var(--shadow), 0 0 0 1px rgba(30, 115, 255, 0.18), 0 0 28px var(--hot-glow);
}

.score-overlay.is-cold .score-overlay__card {
  border-color: rgba(30, 115, 255, 0.55);
  box-shadow: var(--shadow), 0 0 0 1px rgba(30, 115, 255, 0.25), 0 0 28px var(--cold-glow);
}

.score-title {
  font-weight: 1000;
  font-size: 56px;
  letter-spacing: 0.02em;
  color: var(--lo-blue-primary);
}

.score-subtitle {
  margin-top: 8px;
  font-weight: 800;
  color: #3d5a80;
}

.score-votes {
  margin-top: 6px;
  font-weight: 800;
  color: #3d5a80;
  opacity: 0.92;
}

/* ——— Welcome intro (centered modal, Flex Grid–style) ——— */
.intro-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  box-sizing: border-box;
}

.intro-modal.is-open {
  display: flex;
}

.intro-modal--round-complete {
  z-index: 2100;
}

/* Ensure analytics modal always stacks above Collections picker */
.intro-modal--analytics {
  z-index: 12000;
}

.intro-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 16, 32, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.intro-modal__card {
  position: relative;
  z-index: 1;
  width: min(480px, 96vw);
  max-height: min(90dvh, 720px);
  overflow: auto;
  border-radius: 28px;
  padding: 34px 30px 28px;
  background: linear-gradient(180deg, var(--lo-blue-mid) 0%, var(--lo-blue-deep) 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: var(--shadow), 0 0 0 1px rgba(15, 47, 110, 0.2);
  text-align: center;
}

.intro-modal--game .intro-modal__card {
  /* Keep the chooser feeling like a fixed card (no internal scroll) */
  overflow: hidden;
  max-height: min(92dvh, 680px);
  padding: 30px 26px 22px;
}

.intro-modal--game .intro-modal__logos {
  margin-bottom: 8px;
}

.intro-modal--game .intro-modal__logos .intro-modal__brand {
  margin-top: -4px;
}

/* Make the game chooser fit without scrolling (phones) */
.intro-modal--game .intro-modal__lo-png {
  width: min(108px, 30vw);
  max-height: 120px;
}

.intro-modal--game .intro-modal__logo {
  width: min(150px, 40vw);
  max-height: 160px;
}

.intro-modal--game .intro-modal__brand {
  max-height: 88px;
}

.intro-modal--game .intro-modal__title {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.intro-modal--game .intro-modal__info {
  gap: 8px;
}

.intro-modal--game .intro-modal__body-line {
  font-size: 1.02rem;
  line-height: 1.35;
}

.intro-modal--game .intro-modal__continue {
  margin-top: 14px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.intro-modal--game .intro-modal__cta-secondary {
  margin-top: 8px;
}

.intro-modal--game .intro-modal__divider {
  margin: 12px 0 10px;
}

.intro-modal__divider {
  height: 1px;
  width: 100%;
  margin: 14px 0 12px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 216, 77, 0.85) 20%,
    rgba(255, 255, 255, 0.45) 50%,
    rgba(255, 216, 77, 0.85) 80%,
    transparent 100%
  );
  box-shadow: 0 10px 22px rgba(255, 216, 77, 0.12);
  border-radius: 999px;
}

.intro-modal__info-btn,
.intro-modal__close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-on-lo);
  font-weight: 1000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(7, 12, 24, 0.28);
  cursor: pointer;
}

.intro-modal__back-btn {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-on-lo);
  font-weight: 1000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(7, 12, 24, 0.28);
  cursor: pointer;
}

.intro-modal__back-btn:active {
  transform: translateY(1px);
}

.intro-modal--game .intro-modal__info-btn {
  border-color: rgba(255, 216, 77, 0.9);
  background: rgba(255, 216, 77, 0.95);
  color: #0f2f6e;
  box-shadow: 0 12px 26px rgba(7, 12, 24, 0.32), 0 0 0 3px rgba(255, 216, 77, 0.22);
  font-size: 1.05rem;
}

.intro-modal--how .intro-modal__close-btn {
  border-color: rgba(255, 216, 77, 0.9);
  background: rgba(255, 216, 77, 0.95);
  color: #0f2f6e;
  box-shadow: 0 12px 26px rgba(7, 12, 24, 0.32), 0 0 0 3px rgba(255, 216, 77, 0.22);
}

.intro-modal--analytics .intro-modal__close-btn {
  border-color: rgba(255, 216, 77, 0.9);
  background: rgba(255, 216, 77, 0.95);
  color: #0f2f6e;
  box-shadow: 0 12px 26px rgba(7, 12, 24, 0.32), 0 0 0 3px rgba(255, 216, 77, 0.22);
}

.intro-modal__info-btn:active,
.intro-modal__close-btn:active {
  transform: translateY(1px);
}

.intro-modal__card--how {
  /* Match the Choose Game popup sizing */
  width: min(480px, 96vw);
  text-align: left;
  /* Allow the info modal to be taller so nothing is clipped */
  max-height: min(96dvh, 900px);
  overflow: auto;
  padding: 44px 30px 34px;
}

.intro-modal__card--analytics {
  width: min(520px, 96vw);
  max-height: min(92dvh, 760px);
  overflow: auto;
  padding: 26px 22px 22px;
  text-align: left;
}

.intro-modal__logos--fixed {
  /* Keep logo stack position consistent across all analytics popups */
  min-height: 250px;
  justify-content: flex-start;
  margin-bottom: 8px;
}

.intro-modal__logos--fixed .intro-modal__lo-png {
  transform: none;
  margin-bottom: 10px;
}

.analytics-title {
  font-weight: 1000;
  font-size: 1.45rem;
  letter-spacing: 0.02em;
  color: var(--text-on-lo);
  text-shadow: 0 2px 0 rgba(15, 47, 110, 0.35);
  margin: 2px 8px 14px;
  padding-right: 54px; /* space for close button */
}

.analytics-hero {
  background: rgba(255, 216, 77, 0.92);
  border: 1px solid rgba(255, 216, 77, 0.9);
  border-radius: 20px;
  padding: 14px 14px 12px;
  box-shadow: 0 18px 40px rgba(15, 47, 110, 0.18);
  margin: 0 6px 14px;
}

.analytics-hero__label {
  font-weight: 1000;
  letter-spacing: 0.02em;
  color: #0f2f6e;
  opacity: 0.95;
}

.analytics-hero__score {
  margin-top: 6px;
  font-weight: 1000;
  font-size: 2.6rem;
  letter-spacing: 0.02em;
  color: #0f2f6e;
  line-height: 1;
}

.analytics-hero__sub {
  margin-top: 6px;
  font-weight: 900;
  color: rgba(15, 47, 110, 0.92);
  opacity: 0.95;
}

.analytics-top {
  margin: 0 6px 4px;
}

.analytics-top__label {
  font-weight: 1000;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 0 rgba(15, 47, 110, 0.25);
  margin: 6px 8px 10px;
}

.analytics-search {
  margin: 0 8px 10px;
}

.analytics-search .input {
  width: 100%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 47, 110, 0.16);
}

.analytics-top__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.analytics-item {
  display: grid;
  grid-template-columns: 42px 84px 1fr;
  gap: 10px;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  padding: 10px;
  box-shadow: 0 10px 22px rgba(7, 12, 24, 0.14);
}

.analytics-rank {
  font-size: 1.4rem;
  text-align: center;
}

.analytics-img {
  width: 84px;
  height: 84px;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.analytics-meta {
  min-width: 0;
}

.analytics-name {
  font-weight: 1000;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-stats {
  margin-top: 4px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.88);
}

.analytics-pill {
  background: rgba(15, 47, 110, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
}

.analytics-empty.hidden {
  display: none;
}

.analytics-empty {
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 14px;
  text-align: center;
}

.analytics-empty__title {
  font-weight: 1000;
  color: rgba(255, 255, 255, 0.95);
}

.analytics-empty__sub {
  margin-top: 6px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.86);
}

.intro-modal__card--analytics .btn {
  margin-top: 12px;
  width: 100%;
}

.intro-modal__card--analytics .btn.hidden {
  display: none;
}

.browse-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 10px 6px 6px;
}

@media (min-width: 760px) {
  .browse-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.browse-tile {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 22px rgba(7, 12, 24, 0.14);
}

.browse-tile img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: rgba(255, 255, 255, 0.92);
}

.browse-score {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 216, 77, 0.95);
  color: #0f2f6e;
  border: 1px solid rgba(255, 216, 77, 0.9);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 1000;
  font-size: 0.92rem;
  box-shadow: 0 12px 26px rgba(7, 12, 24, 0.24);
}

.nft-stats-hero {
  margin: 10px 6px 4px;
  display: grid;
  gap: 12px;
}

.nft-stats-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 18px 45px rgba(7, 12, 24, 0.18);
}

.nft-stats-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nft-stats-badge {
  background: rgba(255, 216, 77, 0.92);
  border: 1px solid rgba(255, 216, 77, 0.9);
  color: #0f2f6e;
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 1000;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 26px rgba(7, 12, 24, 0.18);
}

@media (min-width: 520px) {
  .analytics-top__grid {
    grid-template-columns: 1fr;
  }
}

.intro-modal__info--how {
  margin-top: 6px;
}

.how-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.how-block {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 12px 12px 10px;
  box-shadow: 0 10px 22px rgba(7, 12, 24, 0.18);
}

.how-logo {
  display: block;
  width: min(300px, 100%);
  height: auto;
  margin: 0 auto 8px;
  filter: drop-shadow(0 10px 18px rgba(7, 12, 24, 0.22));
}

.how-line {
  font-weight: 800;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.35;
  margin: 5px 0;
  font-size: 1.06rem;
}

.how-line strong {
  color: rgba(255, 216, 77, 0.98);
  text-shadow: 0 2px 0 rgba(15, 47, 110, 0.25);
}

.intro-modal__logos {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 0;
  margin-bottom: 14px;
}

.intro-modal__logos .intro-modal__lo-png {
  margin-bottom: 10px;
  transform: translateY(-4px);
}

.intro-modal__logos .intro-modal__logo {
  margin-top: 0;
}

.intro-modal__logos .intro-modal__brand {
  margin-top: -6px;
}

.intro-modal__logos--how {
  margin-top: 6px;
  margin-bottom: 10px;
}

.intro-modal__logos--how .intro-modal__logo {
  margin-top: 0;
}

/* Info modal header: prevent top clipping */
.intro-modal--how .intro-modal__logos .intro-modal__lo-png {
  transform: none;
  margin-bottom: 8px;
}

.intro-modal--how .intro-modal__logos .intro-modal__logo {
  width: min(170px, 46vw);
}

.intro-modal--how .intro-modal__logos .intro-modal__lo-png {
  width: min(140px, 38vw);
  height: auto;
}

/* Same size relationship as main hero `.logo--hero` + `.logo--brand` */
.intro-modal__logo {
  width: min(184px, 48vw);
  height: auto;
  max-height: 200px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(15, 47, 110, 0.35));
}

.intro-modal__lo-png {
  width: min(136px, 36vw);
  height: auto;
  max-height: 148px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(15, 47, 110, 0.32));
}

.intro-modal__brand {
  width: 100%;
  height: auto;
  max-height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(15, 47, 110, 0.28));
}

.intro-modal__title {
  margin: 0 0 14px;
  font-weight: 1000;
  font-size: 1.45rem;
  letter-spacing: 0.02em;
  color: var(--text-on-lo);
  text-shadow: 0 2px 0 rgba(15, 47, 110, 0.35);
  text-align: center;
}

.intro-modal__info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.intro-modal__body-line {
  margin: 0;
  max-width: 36ch;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.94);
  text-align: center;
  text-shadow: 0 1px 2px rgba(15, 47, 110, 0.25);
}

.intro-modal__continue {
  width: 100%;
  margin-top: 22px;
  padding-top: 16px;
  padding-bottom: 16px;
  font-size: 18px;
}

.intro-modal__cta-secondary {
  width: 100%;
  margin-top: 10px;
  margin-bottom: 0;
}

.btn-round-replay {
  width: 100%;
  margin-top: 10px;
}

/* ——— Share button + sheet ——— */
.share-btn {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 18px);
  transform: translateX(-50%);
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-on-lo);
  border: 2px solid rgba(255, 216, 77, 0.65);
  box-shadow: 0 4px 0 rgba(15, 47, 110, 0.2);
  font-weight: 900;
  letter-spacing: 0.01em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
  will-change: transform, opacity;
}

.share-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.share-sheet {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 20;
}

.share-sheet.is-open {
  display: grid;
}

.share-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 47, 110, 0.55);
}

.share-sheet__card {
  position: relative;
  align-self: end;
  margin: 0 auto;
  width: min(520px, 100%);
  border-top-left-radius: 26px;
  border-top-right-radius: 26px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  padding: 14px 14px 18px;
  transform: translateY(12px);
  animation: sheet-up 220ms ease-out;
}

@keyframes sheet-up {
  from {
    transform: translateY(26px);
  }
  to {
    transform: translateY(12px);
  }
}

.share-sheet__header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 6px 4px 10px;
}

.share-sheet__title {
  font-weight: 1000;
  color: var(--lo-blue-primary);
  letter-spacing: 0.01em;
}

.share-close {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 0;
  background: rgba(30, 115, 255, 0.12);
  color: var(--lo-blue-primary);
  font-weight: 1000;
}

.share-preview {
  width: 100%;
  border-radius: 18px;
  border: 2px solid rgba(15, 23, 42, 0.08);
  background: #f2f7ff;
  display: block;
}

.share-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.share-hint {
  margin-top: 10px;
  font-weight: 800;
  color: #3d5a80;
  text-align: center;
  font-size: 12px;
}

/* ——— Collections modal (bottom sheet) ——— */
.collections-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  box-sizing: border-box;
}

.collections-modal.hidden {
  display: none;
}

.collections-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 16, 32, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.collections-content {
  position: relative;
  z-index: 1;
  width: min(520px, 96vw);
  max-height: min(90dvh, 760px);
  overflow: auto;

  border-radius: 28px;
  padding: 26px 22px 22px;
  background: linear-gradient(180deg, var(--lo-blue-mid) 0%, var(--lo-blue-deep) 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: var(--shadow), 0 0 0 1px rgba(15, 47, 110, 0.2);
  text-align: center;
}

.collections-back {
  position: absolute;
  left: 12px;
  top: 14px;
  z-index: 2;
}

.collections-title {
  font-weight: 1000;
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  color: var(--text-on-lo);
  text-shadow: 0 2px 0 rgba(15, 47, 110, 0.35);
  text-align: center;
  margin: 6px 0 14px;
}

.collections-subtitle {
  margin: -8px 0 14px;
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--muted-on-lo);
  text-shadow: 0 1px 2px rgba(15, 47, 110, 0.35);
  text-align: center;
}

.collections-search {
  margin: 0 auto 14px;
  width: min(420px, 100%);
}

.collections-search .input {
  width: 100%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 47, 110, 0.16);
}

.collections-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.collection-item {
  display: flex;
  justify-content: space-between;
  align-items: center;

  background: rgba(255, 255, 255, 0.92);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 47, 110, 0.12);
  box-shadow: 0 6px 16px rgba(15, 47, 110, 0.12);

  font-weight: 1000;
  letter-spacing: 0.01em;
  color: #0f2f6e;
}

.collection-item__count {
  font-variant-numeric: tabular-nums;
  color: var(--lo-blue-primary);
  font-weight: 1000;
}

/* Ensure Collections modal rows match the LO header typography even if
   other `.collection-item` rules exist elsewhere in the stylesheet. */
.collections-modal .collection-item {
  font-weight: 1000;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.collections-modal .collection-item__count {
  font-weight: 1000;
  letter-spacing: 0.02em;
}

.collection-item.is-active {
  border-color: rgba(255, 216, 77, 0.95);
  box-shadow: 0 0 0 2px rgba(255, 216, 77, 0.28), 0 6px 16px rgba(15, 47, 110, 0.12);
}

/* ——— Add screen topbar ——— */
.topbar {
  padding: 14px 12px 10px;
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: start;
}

.topbar__center {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.topbar__spacer {
  height: 1px;
}

.logo--header-mini {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(15, 47, 110, 0.35));
}

.title {
  font-weight: 900;
  font-size: 17px;
  letter-spacing: 0.02em;
}

.title--on-lo {
  color: var(--text-on-lo);
  text-shadow: 0 2px 0 rgba(15, 47, 110, 0.35);
}

.subtitle {
  font-weight: 800;
  font-size: 13px;
}

.subtitle--on-lo {
  color: var(--lo-yellow);
  text-shadow: 0 1px 2px rgba(15, 47, 110, 0.45);
}

.icon-btn {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 2px solid rgba(15, 47, 110, 0.2);
  background: linear-gradient(180deg, var(--lo-yellow-bright) 0%, var(--lo-yellow) 100%);
  color: var(--lo-navy);
  font-weight: 1000;
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 5px 0 rgba(180, 140, 0, 0.35);
  transition: transform 120ms ease;
  -webkit-tap-highlight-color: transparent;
}

.icon-btn:active {
  transform: scale(0.97);
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.chain-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.chain-btn {
  flex: 1;
  padding: 10px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  font-weight: 900;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.18);
  color: var(--text-on-lo);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 47, 110, 0.18);
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms ease, filter 140ms ease, background 140ms ease;
}

.chain-btn:active {
  transform: scale(var(--tap));
}

.chain-btn.active {
  background: linear-gradient(180deg, var(--lo-yellow-bright) 0%, var(--lo-yellow) 100%);
  color: var(--lo-navy);
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow: 0 7px 0 rgba(180, 140, 0, 0.35), 0 10px 26px rgba(15, 47, 110, 0.16);
}

.field {
  display: grid;
  gap: 6px;
}

.field__label {
  font-weight: 900;
  font-size: 12px;
  color: var(--muted-on-lo);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.input {
  width: 100%;
  height: 54px;
  border-radius: var(--radius-md);
  border: 2px solid rgba(255, 255, 255, 0.45);
  padding: 0 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-on-light);
  box-shadow: var(--shadow-soft);
}

.input::placeholder {
  color: #6b7a90;
}

.input:focus {
  border-color: var(--lo-yellow);
  box-shadow: 0 0 0 4px rgba(255, 216, 77, 0.35);
}

.grid-wrap {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wallet-loading {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: rgba(15, 47, 110, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.wallet-loading.is-hidden {
  display: none;
}

.wallet-loading__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px;
}

.wallet-loading__ring {
  position: relative;
  width: 128px;
  height: 128px;
  display: grid;
  place-items: center;
}

.wallet-loading__orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.22);
  border-top-color: var(--lo-yellow);
  border-right-color: rgba(255, 216, 77, 0.35);
  animation: wallet-load-spin 0.9s linear infinite;
  box-sizing: border-box;
}

.wallet-loading__logo {
  position: relative;
  z-index: 1;
  width: 88px;
  height: 88px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(15, 47, 110, 0.35));
}

.wallet-loading__label {
  margin: 0;
  font-weight: 1000;
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-on-lo);
  text-shadow: 0 2px 4px rgba(15, 47, 110, 0.45);
}

@keyframes wallet-load-spin {
  to {
    transform: rotate(360deg);
  }
}

.add-top-actions {
  display: grid;
  gap: 8px;
}

.add-top-actions .selected-count {
  text-align: left;
  font-size: 12px;
  opacity: 0.95;
}

.add-top-actions .toast {
  text-align: left;
}

.collection-search-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.collection-search-wrap.is-hidden {
  display: none;
}

.collection-search-label {
  font-weight: 900;
  font-size: 12px;
  color: var(--muted-on-lo);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(15, 47, 110, 0.35);
}

.collection-search-input {
  width: 100%;
}

.nft-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.grid-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.35);
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.grid-item:active {
  transform: scale(0.98);
}

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

.grid-item.is-selected {
  border-color: var(--lo-yellow);
  box-shadow: 0 0 0 2px var(--lo-blue-primary), 0 8px 20px rgba(15, 47, 110, 0.35);
}

.check {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--lo-yellow);
  color: var(--lo-navy);
  display: grid;
  place-items: center;
  font-weight: 1000;
  box-shadow: var(--shadow-soft);
  border: 2px solid rgba(255, 255, 255, 0.85);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 120ms ease, transform 120ms ease;
}

.grid-item.is-selected .check {
  opacity: 1;
  transform: scale(1);
}

.footer-actions {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.selected-count {
  font-weight: 900;
  color: var(--text-on-lo);
  font-size: 13px;
  text-align: center;
  text-shadow: 0 1px 2px rgba(15, 47, 110, 0.35);
}

.toast {
  min-height: 18px;
  text-align: center;
  font-weight: 900;
  color: var(--lo-yellow);
  font-size: 14px;
  text-shadow: 0 1px 3px rgba(15, 47, 110, 0.5);
  opacity: 0;
  transition: opacity 160ms ease;
}

.toast.is-visible {
  opacity: 1;
}

.add-nft-message {
  margin: 0 0 8px;
  min-height: 1.25em;
  font-weight: 800;
  font-size: 13px;
  color: var(--lo-yellow);
  text-align: center;
  text-shadow: 0 1px 2px rgba(15, 47, 110, 0.35);
}

.wallet-nft-area {
  min-height: 120px;
}

.collection-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.collection-item {
  width: 100%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  background: linear-gradient(180deg, var(--lo-yellow-bright) 0%, var(--lo-yellow) 100%);
  color: var(--lo-navy);
  box-shadow: 0 7px 0 rgba(180, 140, 0, 0.35), 0 10px 26px rgba(15, 47, 110, 0.16);
  transition: transform 120ms ease, filter 160ms ease, border-color 160ms ease;
}

.collection-item:active {
  transform: scale(0.99);
}

.collection-item:hover {
  filter: brightness(1.03);
}

.collection-name {
  font-weight: 800;
  color: var(--lo-navy);
  text-align: left;
}

.collection-count {
  font-weight: 1000;
  color: var(--lo-navy);
  opacity: 0.82;
  white-space: nowrap;
}

.collection-picker-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.collection-back-btn {
  border: none;
  background: linear-gradient(180deg, var(--lo-yellow-bright) 0%, var(--lo-yellow) 100%);
  color: var(--lo-navy);
  font-weight: 1000;
  border-radius: 999px;
  padding: 9px 12px;
  cursor: pointer;
  font: inherit;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 5px 0 rgba(180, 140, 0, 0.35);
}

.active-collection-title {
  font-weight: 900;
  color: var(--text-on-lo);
  font-size: 1rem;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(15, 47, 110, 0.35);
}

.nft-select-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.nft-select-tile-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
}

.nft-select-tile-wrap > .nft-select-tile {
  width: 100%;
  height: 100%;
}

.nft-select-tile {
  position: relative;
  border: 3px solid transparent;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.32);
  padding: 0;
  cursor: pointer;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 6px 18px rgba(15, 47, 110, 0.18);
}

.nft-select-tile--image-loading {
  cursor: wait;
}

.nft-select-tile--image-failed {
  cursor: default;
}

.nft-select-tile:disabled {
  opacity: 0.78;
}

.nft-select-tile-wrap--failed .nft-select-tile {
  filter: grayscale(0.35);
}

.nft-tile-retry {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  z-index: 6;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-weight: 1000;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(180deg, var(--lo-yellow-bright) 0%, var(--lo-yellow) 100%);
  color: var(--lo-navy);
  box-shadow: 0 5px 0 rgba(180, 140, 0, 0.35);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nft-tile-retry:active {
  transform: translateX(-50%) scale(0.97);
}

.nft-tile-retry.is-hidden {
  display: none;
}

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

.nft-select-tile.selected {
  border-color: #ffd84d;
  box-shadow: 0 0 0 3px rgba(255, 216, 77, 0.35);
}

.nft-select-tile--in-app {
  border-color: rgba(30, 115, 255, 0.45);
  box-shadow:
    inset 0 0 0 2px rgba(30, 115, 255, 0.22),
    0 6px 18px rgba(15, 47, 110, 0.22);
}

.nft-select-tile--in-app img {
  opacity: 0.88;
}

.nft-select-tile--in-app.selected {
  border-color: #ffd84d;
  box-shadow: 0 0 0 3px rgba(255, 216, 77, 0.35);
}

.nft-in-app-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 2;
  font-size: 9px;
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--lo-blue-primary);
  box-shadow: 0 2px 8px rgba(15, 47, 110, 0.2);
  pointer-events: none;
}

.selected-check {
  display: none;
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  background: #ffd84d;
  color: #111;
  border-radius: 999px;
  width: 24px;
  height: 24px;
  font-weight: 900;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
}

.nft-select-tile.selected .selected-check {
  display: flex;
}

@media (min-width: 720px) {
  .content {
    padding-top: 12px;
  }

  .logo--hero {
    width: min(208px, 22vw);
    max-height: 220px;
  }

  .logo--brand {
    width: min(380px, 72vw);
    max-height: 130px;
  }

  .intro-modal__logo {
    width: min(208px, 22vw);
    max-height: 220px;
  }

  .intro-modal__lo-png {
    width: min(156px, 17vw);
    max-height: 168px;
  }

  .intro-modal__brand {
    width: min(380px, 72vw);
    max-height: 130px;
  }
}
