/* Quirks checker — violet accent on near-black (standalone app) */

:root {
  --bg-deep: #0a0814;
  --bg-panel: #14121e;
  --bg-panel-2: #0e0c18;
  --border-subtle: rgba(167, 139, 250, 0.22);
  --og-lime: #c4b5fd;
  --og-lime-muted: rgba(196, 181, 253, 0.55);
  --lo-yellow: var(--og-lime);
  --lo-blue: #a78bfa;
  --text: #f2f2f2;
  --text-muted: #9a9a9a;
  --danger: #ff7a7a;
  --ok: #5ee3a4;
  --btn-primary-depth: #4c1d95;
  --btn-primary-fg: #0a0a0a;
  --bg-gradient-spot: rgba(167, 139, 250, 0.09);
  --bg-gradient-depth: rgba(0, 0, 0, 0.5);
  --radius: 16px;
  --font: "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
  --lo-brand-logo-height: 5rem;
  --lo-modal-brand-logo-height: 4rem;
}

[data-theme="light"] {
  --bg-deep: #f5f3fa;
  --bg-panel: #ffffff;
  --bg-panel-2: #ebe6f5;
  --border-subtle: rgba(91, 33, 182, 0.2);
  --og-lime: #6d28d9;
  --og-lime-muted: rgba(91, 33, 182, 0.62);
  --lo-blue: #7c3aed;
  --text: #1c1426;
  --text-muted: #5c5566;
  --btn-primary-depth: #c4b5fd;
  --btn-primary-fg: #fafaff;
  --bg-gradient-spot: rgba(124, 58, 237, 0.1);
  --bg-gradient-depth: rgba(0, 0, 0, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background:
    radial-gradient(
      ellipse 110% 75% at 50% -8%,
      var(--bg-gradient-spot) 0%,
      transparent 52%
    ),
    radial-gradient(
      ellipse 90% 50% at 80% 100%,
      var(--bg-gradient-depth) 0%,
      transparent 45%
    ),
    var(--bg-deep);
  color: var(--text);
  line-height: 1.5;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 1rem 2.75rem;
}

.page-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  margin: 0 0 0.75rem;
}

.back-to-menu {
  display: inline-flex;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--og-lime-muted);
  text-decoration: none;
  padding: 0.35rem 0.5rem 0.35rem 0;
  margin: -0.35rem 0 -0.35rem -0.25rem;
  border-radius: 8px;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}

.back-to-menu:hover {
  color: var(--og-lime);
  background: rgba(196, 181, 253, 0.12);
}

.back-to-menu:focus-visible {
  outline: 2px solid var(--og-lime);
  outline-offset: 2px;
}

.theme-toggle {
  display: inline-flex;
  flex-shrink: 0;
  position: relative;
  z-index: 0;
  padding: 3px;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 999px;
  line-height: 0;
  animation: quirks-hero-info-glow 2.2s ease-in-out infinite;
}

.theme-toggle::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  border: 2px solid rgba(196, 181, 253, 0.65);
  pointer-events: none;
  z-index: -1;
  animation: quirks-hero-info-pulse-ring 2.2s ease-out infinite;
}

.theme-toggle__track {
  --theme-toggle-pad: 0.125rem;
  --theme-toggle-thumb: 1.375rem;
  position: relative;
  display: block;
  width: 3.5rem;
  height: 1.75rem;
  border-radius: 999px;
  border: 1px solid rgba(196, 181, 253, 0.45);
  background: rgba(167, 139, 250, 0.12);
  box-sizing: border-box;
}

.theme-toggle__icon {
  position: absolute;
  top: 50%;
  margin-top: -0.42rem;
  width: 0.85rem;
  height: 0.85rem;
  color: var(--og-lime-muted);
  pointer-events: none;
  z-index: 1;
  opacity: 0.55;
}

.theme-toggle__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.theme-toggle__icon--sun {
  left: 0.35rem;
}

.theme-toggle__icon--moon {
  right: 0.35rem;
}

.theme-toggle__thumb {
  position: absolute;
  top: var(--theme-toggle-pad);
  left: var(--theme-toggle-pad);
  width: var(--theme-toggle-thumb);
  height: var(--theme-toggle-thumb);
  border-radius: 50%;
  background: var(--og-lime);
  box-shadow: 0 0.08rem 0.28rem rgba(0, 0, 0, 0.28);
  z-index: 2;
  transition: transform 0.22s ease;
  transform: translateX(0);
}

.theme-toggle[aria-checked="false"] .theme-toggle__thumb {
  transform: translateX(
    calc(3.5rem - var(--theme-toggle-thumb) - 2 * var(--theme-toggle-pad))
  );
}

.theme-toggle[aria-checked="true"] .theme-toggle__icon--sun {
  color: var(--og-lime);
  opacity: 1;
}

.theme-toggle[aria-checked="false"] .theme-toggle__icon--moon {
  color: var(--og-lime);
  opacity: 1;
}

.theme-toggle:hover .theme-toggle__track {
  border-color: var(--og-lime);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--og-lime);
  outline-offset: 3px;
}

.brand-bar {
  text-align: center;
  padding: 0.5rem 0 1.35rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-bar__logos {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.85rem 1.2rem;
  width: 100%;
  max-width: 100%;
  /* lofg + project logo — ~3× prior size; shared height */
  --brand-row-h: clamp(3.96rem, 18.6vw, 9.6rem);
}

@media (min-width: 480px) {
  .brand-bar__logos {
    --brand-row-h: clamp(5.55rem, 27vw, 11.55rem);
  }
}

.brand-bar__img {
  display: block;
  flex-shrink: 1;
  min-width: 0;
  width: auto;
  height: var(--brand-row-h);
  max-height: var(--brand-row-h);
  object-fit: contain;
}

/* lofg.png */
.brand-bar__img--lo {
  flex: 1 1 0;
  max-width: min(52%, 39rem);
}

/* project logo — same height as lofg via --brand-row-h */
.brand-bar__img--og {
  flex: 0 1 auto;
  max-width: min(34%, 15rem);
}

.brand-bar__x {
  flex-shrink: 0;
  font-size: clamp(2.85rem, 12vw, 5.25rem);
  font-weight: 200;
  color: var(--og-lime);
  line-height: 1;
  user-select: none;
}

.hero {
  text-align: center;
  padding: 1rem 0 1.5rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--og-lime-muted);
  font-weight: 600;
}

.hero__headline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.65rem;
  margin: 0 0 0.65rem;
}

.hero__headline h1 {
  margin: 0;
  font-size: clamp(1.4rem, 4.5vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero__info-btn {
  position: relative;
  z-index: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid rgba(196, 181, 253, 0.55);
  background: rgba(167, 139, 250, 0.12);
  color: var(--og-lime);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  flex-shrink: 0;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
  animation: quirks-hero-info-glow 2.2s ease-in-out infinite;
}

.hero__info-btn::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(196, 181, 253, 0.65);
  pointer-events: none;
  z-index: -1;
  animation: quirks-hero-info-pulse-ring 2.2s ease-out infinite;
}

.hero__info-btn:hover {
  background: rgba(167, 139, 250, 0.22);
  border-color: var(--og-lime);
  color: var(--text);
}

.hero__info-btn:focus-visible {
  outline: 2px solid var(--og-lime);
  outline-offset: 3px;
}

@keyframes quirks-hero-info-glow {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(196, 181, 253, 0.35),
      0 0 12px rgba(167, 139, 250, 0.15);
  }
  50% {
    box-shadow:
      0 0 0 6px rgba(196, 181, 253, 0.12),
      0 0 18px rgba(167, 139, 250, 0.28);
  }
}

@keyframes quirks-hero-info-pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.75;
  }
  70%,
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__info-btn {
    animation: none;
    box-shadow: 0 0 0 1px rgba(196, 181, 253, 0.35);
  }

  .hero__info-btn::after {
    animation: none;
    opacity: 0.35;
    transform: none;
    inset: -2px;
  }

  .theme-toggle {
    animation: none;
    box-shadow: 0 0 0 1px rgba(196, 181, 253, 0.35);
  }

  .theme-toggle::after {
    animation: none;
    opacity: 0.35;
    transform: none;
    inset: -2px;
  }

  .theme-toggle__thumb {
    transition: none;
  }
}

.hero__info-icon {
  position: relative;
  top: 0.5px;
}

.lede {
  margin: 0 auto;
  max-width: 38rem;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.2rem 1.1rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.mode-panel {
  margin-bottom: 1rem;
}

.lookup-shell {
  margin-bottom: 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-panel);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.lookup-shell__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 1rem 1.1rem;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 0;
  background: var(--bg-panel-2);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.lookup-shell__toggle:hover {
  background: rgba(223, 255, 0, 0.06);
}

.lookup-shell.is-collapsed .lookup-shell__toggle {
  border-bottom: none;
}

.lookup-shell.is-collapsed .lookup-shell__body {
  display: none;
}

.lookup-shell__title-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  min-width: 0;
}

.lookup-shell__title {
  color: var(--og-lime);
}

.lookup-shell__meta {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

.lookup-shell__chevron {
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--og-lime-muted);
  border-bottom: 2px solid var(--og-lime-muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.lookup-shell.is-collapsed .lookup-shell__chevron {
  transform: rotate(-45deg);
}

.lookup-shell__body {
  padding: 0 0 0.25rem;
}

.lookup-shell__body .mode-panel {
  margin: 0.85rem 1rem 1rem;
  box-shadow: none;
}

.lookup-shell__body .mode-panel:last-child {
  margin-bottom: 1rem;
}

.wallet-stats {
  margin: 0 0 1rem;
  padding: 0.85rem 1.05rem;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel-2);
  font-size: 1.05rem;
  color: var(--text-muted);
}

.wallet-stats__line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.25rem;
}

.wallet-stats .wallet-stats__matched,
.wallet-stats .wallet-stats__ogenies,
.wallet-stats .wallet-stats__certs {
  color: var(--text);
}

.wallet-stats strong {
  color: var(--og-lime);
  font-weight: 800;
  font-size: 1.12em;
}

.wallet-stats__sep {
  color: var(--text-muted);
  user-select: none;
}

.mode-title {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  color: var(--og-lime);
  font-weight: 700;
}

.mode-desc {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.input-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

.input-row .btn-primary {
  width: 100%;
}

input[type="text"] {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--bg-panel-2);
  color: var(--text);
  outline: none;
}

input[type="text"]:focus {
  border-color: var(--og-lime);
  box-shadow: 0 0 0 3px rgba(223, 255, 0, 0.14);
}

textarea.wallet-input-multiline {
  width: 100%;
  min-height: 5.5rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  line-height: 1.45;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--bg-panel-2);
  color: var(--text);
  outline: none;
  resize: vertical;
  box-sizing: border-box;
}

textarea.wallet-input-multiline:focus {
  border-color: var(--og-lime);
  box-shadow: 0 0 0 3px rgba(223, 255, 0, 0.14);
}

.hint {
  margin: 0.65rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.btn-primary {
  cursor: pointer;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.2rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--btn-primary-fg);
  background: var(--og-lime);
  box-shadow: 0 4px 0 var(--btn-primary-depth);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 0 var(--btn-primary-depth);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 var(--btn-primary-depth);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/** Inactive: lime outline + glow; active: full lime (matches collection pills). */
.btn-primary.flex-modal__generate:disabled {
  opacity: 1;
  cursor: not-allowed;
  background: var(--bg-panel-2);
  color: var(--og-lime-muted);
  border: 1px solid rgba(223, 255, 0, 0.5);
  box-shadow:
    0 0 0 1px rgba(223, 255, 0, 0.12),
    0 0 20px rgba(223, 255, 0, 0.18);
}

.btn-primary.flex-modal__generate:disabled:hover {
  transform: none;
  box-shadow:
    0 0 0 1px rgba(223, 255, 0, 0.12),
    0 0 20px rgba(223, 255, 0, 0.18);
}

.btn-primary.flex-modal__download:disabled {
  opacity: 1;
  cursor: not-allowed;
  background: var(--bg-panel-2);
  color: var(--og-lime-muted);
  border: 1px solid rgba(223, 255, 0, 0.5);
  box-shadow:
    0 0 0 1px rgba(223, 255, 0, 0.12),
    0 0 20px rgba(223, 255, 0, 0.18);
}

.btn-primary.flex-modal__download:disabled:hover {
  transform: none;
  box-shadow:
    0 0 0 1px rgba(223, 255, 0, 0.12),
    0 0 20px rgba(223, 255, 0, 0.18);
}

.btn-secondary {
  display: inline-block;
  margin-top: 0.55rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: #0a0a0a;
  background: var(--lo-blue);
  border-radius: 10px;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-secondary:hover {
  filter: brightness(1.08);
}

.status {
  min-height: 1.4rem;
  margin: 0.65rem 0 0;
  font-size: 0.9rem;
}

.status.loading {
  color: var(--lo-yellow);
}

.status.error {
  color: var(--danger);
}

.results-block.hidden {
  display: none;
}

.results-block {
  margin-top: 1.25rem;
}

.wallet-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.15rem;
  padding: 0.75rem 0.95rem;
  background: var(--bg-panel-2);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}

.wallet-filter-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 0.2rem;
}

.filter-btn {
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.52rem 1.05rem;
  border-radius: 999px;
  font-family: inherit;
  transition:
    background 0.12s ease,
    color 0.12s ease,
    border-color 0.12s ease;
}

.filter-btn:hover {
  color: var(--text);
  border-color: rgba(223, 255, 0, 0.35);
}

.filter-btn.is-active {
  background: var(--og-lime);
  color: #0a0a0a;
  border-color: var(--og-lime);
  box-shadow: 0 2px 0 var(--btn-primary-depth);
}

.wallet-section-wrap.hidden {
  display: none !important;
}

.unmatched-sub.hidden {
  display: none !important;
}

.wallet-section-wrap {
  margin-bottom: 0.25rem;
}

.wallet-section-wrap[data-wallet-section="matched"] > .section-title {
  margin-top: 1.25rem;
}

.wallet-section-wrap[data-wallet-section="unmatched"] {
  margin-top: 2rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.wallet-section-wrap[data-wallet-section="unmatched"] > .unmatched-sub:first-child .section-title {
  margin-top: 0;
}

.unmatched-sub + .unmatched-sub {
  margin-top: 1.85rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.wallet-section-wrap .section-title + .wallet-grid,
.unmatched-sub .section-title + .wallet-grid,
.unmatched-sub .section-blurb + .wallet-grid {
  margin-top: 1.05rem;
}

.section-title {
  font-size: 1.18rem;
  margin: 1.5rem 0 0.85rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid rgba(223, 255, 0, 0.28);
  color: var(--og-lime);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.section-blurb {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.quirks-export-section {
  margin-top: 1rem;
}

.quirks-export-controls__row {
  display: flex;
}

.quirks-export-controls__btn {
  width: 100%;
  margin-top: 0.15rem;
}

.quirks-export-controls__progress {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  min-height: 1.1em;
}

.quirks-gif-options-modal {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.quirks-gif-options-modal.hidden {
  display: none;
}

.quirks-gif-options-modal:not(.hidden) {
  pointer-events: auto;
  opacity: 1;
}

.quirks-gif-options-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.quirks-gif-options-modal__panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 1rem 1rem 1.05rem;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

.quirks-gif-options-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.quirks-gif-options-modal__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.quirks-gif-options-modal__close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.quirks-gif-options-modal__close:hover {
  color: var(--text);
  background: rgba(223, 255, 0, 0.08);
}

.quirks-gif-options-modal__summary {
  margin: 0 0 0.85rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.quirks-gif-options-modal__label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.quirks-gif-options-modal__label--section {
  margin-top: 0.9rem;
}

.quirks-gif-options-modal__hint {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.quirks-gif-options-modal__input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.7rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}

.quirks-gif-options-modal__input:focus {
  outline: none;
  border-color: rgba(223, 255, 0, 0.45);
  box-shadow: 0 0 0 3px rgba(223, 255, 0, 0.12);
}

.quirks-gif-options-modal__speed-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin: 0.35rem 0 0.35rem;
}

.quirks-gif-options-modal__range-row {
  display: flex;
  align-items: center;
}

.quirks-gif-options-modal__range-row--speed {
  margin-bottom: 0.65rem;
}

.quirks-gif-options-modal__range {
  flex: 1 1 auto;
  min-width: 0;
}

.quirks-gif-options-modal__duration {
  margin: 0.15rem 0 0;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.quirks-gif-options-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.95rem;
}

.quirks-gif-options-modal__btn {
  flex: 1 1 120px;
  min-width: 0;
}

.quirks-gif-modal {
  position: fixed;
  inset: 0;
  z-index: 10045;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.quirks-gif-modal.hidden {
  display: none;
}

.quirks-gif-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.quirks-gif-modal__panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 1.05rem 1.05rem 1rem;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  display: grid;
  justify-items: center;
}

.quirks-gif-modal__text {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--text);
}

.quirks-gif-modal__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: rgba(223, 255, 0, 0.75);
  border-radius: 50%;
  animation: quirks-gif-spin 0.75s linear infinite;
}

@keyframes quirks-gif-spin {
  to {
    transform: rotate(360deg);
  }
}

.results-block .section-title:first-child {
  margin-top: 0;
}

.empty-hint {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
  padding: 0.35rem 0;
}

.empty-hint.prominent {
  padding: 0.75rem 0;
  font-size: 1rem;
}

.wallet-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 520px) {
  .wallet-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.wallet-card {
  background: var(--bg-panel-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.wallet-card__body {
  margin-top: 0.15rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.wallet-card--ok {
  border-left: 4px solid var(--ok);
}

.wallet-card--warn {
  border-left: 4px solid var(--danger);
}

.wallet-card--info {
  border-left: 4px solid var(--lo-blue);
}

.wallet-card--nocert {
  border-left: 4px solid rgba(223, 255, 0, 0.35);
  opacity: 0.95;
}

.wallet-card__badge--nocert {
  color: var(--og-lime-muted);
}

.wallet-card__visuals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.wallet-card__visuals--triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 640px) {
  .wallet-card__visuals--triple {
    grid-template-columns: 1fr;
  }
}

.wallet-card__visuals--single {
  grid-template-columns: 1fr;
  max-width: 160px;
}

.wallet-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wallet-col__thumb {
  width: 100%;
}

.wallet-col__thumb .nft-thumb,
.wallet-col__thumb .nft-thumb.nft-thumb--counterpart {
  width: 100%;
}

.wallet-col__os {
  width: 100%;
  margin-top: 0.45rem;
}

.btn-secondary--wallet-col {
  display: block;
  width: 100%;
  margin-top: 0;
  text-align: center;
  box-sizing: border-box;
  padding: 0.5rem 0.65rem;
  font-size: 0.84rem;
  line-height: 1.25;
}

span.btn-secondary--wallet-col.btn-secondary--disabled {
  display: block;
  width: 100%;
  text-align: center;
  opacity: 0.55;
  cursor: not-allowed;
}

.wallet-card__id {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--og-lime);
}

.wallet-card__badge {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
}

.wallet-card__badge--ok {
  color: var(--ok);
}

.wallet-card__badge--bad {
  color: var(--danger);
  font-size: 1.05rem;
}

.wallet-card__badge--extra {
  color: var(--lo-blue);
}

.wallet-card__meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.nft-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.nft-thumb__loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.nft-thumb__loading::after {
  content: "";
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: rgba(255, 255, 255, 0.9);
  animation: nft-thumb-spin 0.65s linear infinite;
}

@keyframes nft-thumb-spin {
  to {
    transform: rotate(360deg);
  }
}

.nft-thumb.is-loaded .nft-thumb__loading,
.nft-thumb__counterpart-visual.is-loaded .nft-thumb__loading {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

.nft-thumb img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nft-thumb img.is-broken {
  display: none;
}

.nft-thumb-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.5rem;
}

.nft-thumb img.is-broken + .nft-thumb-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  z-index: 4;
  pointer-events: auto;
}

/* Keep Retry above placeholder art and tappable while the thumb is in error state */
.nft-thumb.is-broken .nft-thumb-fallback .nft-thumb__retry,
.nft-thumb__counterpart-visual.is-broken .nft-thumb-fallback .nft-thumb__retry {
  position: relative;
  z-index: 6;
  flex-shrink: 0;
}

.nft-thumb-fallback__msg {
  display: block;
  max-width: 100%;
}

.nft-thumb__failed-ph {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: contain;
  opacity: 0.85;
}

.nft-thumb__retry {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 0.42rem 0.9rem;
  font-size: 0.76rem;
  font-weight: 700;
  font-family: inherit;
  color: #0a0a0a;
  background: var(--og-lime);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.nft-thumb__retry:hover {
  filter: brightness(1.08);
}

.nft-thumb__retry:active {
  transform: scale(0.98);
}

@keyframes nft-retry-illuminate {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(196, 181, 253, 0.35),
      0 0 12px rgba(167, 139, 250, 0.25);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(196, 181, 253, 0.65),
      0 0 22px rgba(167, 139, 250, 0.55),
      0 0 36px rgba(167, 139, 250, 0.28);
  }
}

.nft-thumb.is-broken .nft-thumb__retry,
.nft-thumb__counterpart-visual.is-broken .nft-thumb__retry {
  animation: nft-retry-illuminate 1.45s ease-in-out infinite;
}

.nft-thumb--metadata-fetch .nft-thumb__retry--metadata,
.nft-thumb__counterpart-visual--metadata-fetch .nft-thumb__retry--metadata {
  animation: nft-retry-illuminate 1.45s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .nft-thumb.is-broken .nft-thumb__retry,
  .nft-thumb__counterpart-visual.is-broken .nft-thumb__retry,
  .nft-thumb--metadata-fetch .nft-thumb__retry--metadata,
  .nft-thumb__counterpart-visual--metadata-fetch .nft-thumb__retry--metadata {
    animation: none;
    box-shadow:
      0 0 0 1px rgba(196, 181, 253, 0.45),
      0 0 14px rgba(167, 139, 250, 0.3);
  }
}

.nft-thumb .nft-thumb__retry--floating,
.nft-thumb__counterpart-visual .nft-thumb__retry--floating {
  position: absolute;
  bottom: 0.45rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  max-width: calc(100% - 1rem);
}

.nft-thumb .nft-thumb__retry--floating:active,
.nft-thumb__counterpart-visual .nft-thumb__retry--floating:active {
  transform: translateX(-50%) scale(0.98);
}

/* Round-arrow reload: always kept in DOM; not removed when an image loads (unlike Retry). */
.nft-thumb__reload {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 14;
  width: 2rem;
  height: 2rem;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.75);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.45);
  font: inherit;
  line-height: 0;
  pointer-events: auto;
}

.nft-thumb__reload:hover {
  background: rgba(30, 41, 59, 0.92);
  color: #fff;
}

.nft-thumb__reload:focus-visible {
  outline: 2px solid var(--og-lime);
  outline-offset: 2px;
}

.nft-thumb__reload:active {
  transform: scale(0.94);
}

@media (prefers-reduced-motion: reduce) {
  .nft-thumb__reload:active {
    transform: none;
  }
}

.nft-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  border-style: dashed;
}

.nft-thumb--counterpart {
  position: relative;
  padding: 0;
  cursor: pointer;
  outline: none;
}

.nft-thumb--counterpart:focus-visible {
  box-shadow: 0 0 0 2px var(--og-lime);
}

.nft-thumb__counterpart-visual {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
}

/*
 * Matched-but-not-owned preview: subtle tint (not an error).
 * Strong red only when the image pipeline actually failed (:has .is-broken).
 */
.nft-thumb--counterpart.nft-thumb--counterpartExternal .nft-thumb__counterpart-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  background: rgba(30, 58, 138, 0.22);
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.35);
  transition:
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.nft-thumb--counterpart.nft-thumb--counterpartExternal:hover .nft-thumb__counterpart-visual::after,
.nft-thumb--counterpart.nft-thumb--counterpartExternal:focus-within .nft-thumb__counterpart-visual::after,
.nft-thumb--counterpart.nft-thumb--counterpartExternal.is-revealed .nft-thumb__counterpart-visual::after {
  background: rgba(30, 58, 138, 0.14);
  box-shadow: inset 0 0 0 1px rgba(165, 180, 252, 0.45);
}

.nft-thumb--counterpart.nft-thumb--counterpartExternal:has(
    .nft-thumb__counterpart-visual.is-broken
  )
  .nft-thumb__counterpart-visual::after {
  background: rgba(153, 27, 27, 0.62);
  box-shadow:
    inset 0 0 0 3px rgba(220, 38, 38, 0.95),
    inset 0 0 48px rgba(69, 10, 10, 0.55);
}

.nft-thumb--counterpart.nft-thumb--counterpartExternal:has(
    .nft-thumb__counterpart-visual.is-broken
  ):hover
  .nft-thumb__counterpart-visual::after,
.nft-thumb--counterpart.nft-thumb--counterpartExternal:has(
    .nft-thumb__counterpart-visual.is-broken
  ):focus-within
  .nft-thumb__counterpart-visual::after,
.nft-thumb--counterpart.nft-thumb--counterpartExternal:has(
    .nft-thumb__counterpart-visual.is-broken
  ).is-revealed
  .nft-thumb__counterpart-visual::after {
  background: rgba(153, 27, 27, 0.48);
  box-shadow:
    inset 0 0 0 3px rgba(248, 113, 113, 0.75),
    inset 0 0 36px rgba(69, 10, 10, 0.42);
}

.nft-thumb__counterpart-visual--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
}

.nft-thumb--counterpart.nft-thumb--counterpartExternal .nft-thumb__counterpart-visual--empty {
  background: rgba(30, 41, 59, 0.72);
  border-color: rgba(129, 140, 248, 0.4);
}

.nft-thumb--counterpart.nft-thumb--counterpartExternal:has(
    .nft-thumb__counterpart-visual.is-broken
  )
  .nft-thumb__counterpart-visual--empty {
  background: rgba(91, 15, 15, 0.72);
  border-color: rgba(252, 165, 165, 0.65);
}

.nft-thumb__counterpart-visual--metadata-fetch {
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
  z-index: 3;
  pointer-events: auto;
  text-align: center;
}

.nft-thumb__counterpart-visual--metadata-fetch .nft-thumb-fallback__msg {
  position: relative;
  z-index: 1;
  font-size: 0.75rem;
  line-height: 1.3;
}

.nft-thumb--metadata-fetch {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem;
  text-align: center;
}

.nft-thumb--metadata-fetch .nft-thumb-fallback {
  display: block;
  position: static;
}

.nft-thumb__counterpart-img {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.78;
  transition:
    opacity 0.22s ease,
    filter 0.22s ease;
}

.nft-thumb--counterpart.nft-thumb--counterpartExternal .nft-thumb__counterpart-img {
  opacity: 0.88;
  filter: saturate(0.92) contrast(0.96);
}

.nft-thumb--counterpart:hover .nft-thumb__counterpart-img,
.nft-thumb--counterpart:focus-within .nft-thumb__counterpart-img,
.nft-thumb--counterpart.is-revealed .nft-thumb__counterpart-img {
  opacity: 1;
}

.nft-thumb--counterpart.nft-thumb--counterpartExternal:hover .nft-thumb__counterpart-img,
.nft-thumb--counterpart.nft-thumb--counterpartExternal:focus-within .nft-thumb__counterpart-img,
.nft-thumb--counterpart.nft-thumb--counterpartExternal.is-revealed .nft-thumb__counterpart-img {
  opacity: 1;
  filter: none;
}

.nft-thumb--counterpart.nft-thumb--counterpartExternal:has(
    .nft-thumb__counterpart-visual.is-broken
  )
  .nft-thumb__counterpart-img {
  opacity: 0.58;
  filter: saturate(0.75) contrast(0.9);
}

.nft-thumb__counterpart-visual .nft-thumb-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
}

.nft-thumb__counterpart-visual
  .nft-thumb__counterpart-img.is-broken
  + .nft-thumb-fallback {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  z-index: 4;
  pointer-events: auto;
  padding: 0.35rem;
}

.nft-thumb__counterpart-label {
  position: absolute;
  top: 0.35rem;
  left: 0.35rem;
  right: 0.35rem;
  z-index: 2;
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--text);
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  pointer-events: none;
}

.nft-thumb--counterpartExternal .nft-thumb__counterpart-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-shadow:
    0 0 12px rgba(0, 0, 0, 0.9),
    0 1px 4px rgba(0, 0, 0, 0.95);
}

/* Always-visible retry on external-match cards (inner fallback can be covered or absent). */
.nft-thumb--counterpart.nft-thumb--counterpartExternal .nft-thumb__retry--slot-action {
  position: absolute;
  bottom: 0.35rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  max-width: calc(100% - 0.75rem);
  white-space: nowrap;
  font-size: 0.72rem;
  padding: 0.34rem 0.7rem;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-family: inherit;
  color: #0a0a0a;
  background: var(--og-lime);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}

.nft-thumb--counterpart.nft-thumb--counterpartExternal .nft-thumb__retry--slot-action:hover {
  filter: brightness(1.08);
}

.nft-thumb--counterpart.nft-thumb--counterpartExternal .nft-thumb__retry--slot-action:active {
  transform: translateX(-50%) scale(0.98);
}

.nft-thumb--counterpart.nft-thumb--counterpartExternal:has(
    .nft-thumb__counterpart-visual.is-broken
  )
  .nft-thumb__retry--slot-action,
.nft-thumb--counterpart.nft-thumb--counterpartExternal:has(
    .nft-thumb__counterpart-visual--metadata-fetch
  )
  .nft-thumb__retry--slot-action {
  animation: nft-retry-illuminate 1.45s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .nft-thumb--counterpart.nft-thumb--counterpartExternal:has(
      .nft-thumb__counterpart-visual.is-broken
    )
    .nft-thumb__retry--slot-action,
  .nft-thumb--counterpart.nft-thumb--counterpartExternal:has(
      .nft-thumb__counterpart-visual--metadata-fetch
    )
    .nft-thumb__retry--slot-action {
    animation: none;
    box-shadow:
      0 0 0 1px rgba(196, 181, 253, 0.45),
      0 0 14px rgba(167, 139, 250, 0.3);
  }
}

.nft-thumb__find {
  position: absolute;
  bottom: 0.45rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  padding: 0.38rem 0.7rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: #0a0a0a;
  background: var(--og-lime);
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.nft-thumb__find:hover {
  filter: brightness(1.08);
}

.nft-thumb__find--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.nft-thumb--empty .nft-thumb-fallback {
  display: block;
  position: static;
}

.mono {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.88em;
}

.token-pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.token-pair--nocert {
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .token-pair {
    grid-template-columns: 1fr 1fr;
  }

  .token-pair--nocert {
    align-items: start;
    grid-template-columns: 1fr 1fr;
  }
}

.token-no-cert-pane {
  background: var(--bg-panel-2);
  border: 1px dashed rgba(223, 255, 0, 0.25);
  border-radius: var(--radius);
  padding: 1rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  min-height: 100%;
}

.token-no-cert-pane__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--og-lime-muted);
}

.token-no-cert-pane__body {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.verdict--nocert {
  background: rgba(223, 255, 0, 0.06);
  border: 1px solid rgba(223, 255, 0, 0.2);
  color: var(--text);
  font-weight: 600;
}

.token-side {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}

.token-side--ogenie {
  border-top: 3px solid var(--og-lime);
}

.token-side--cert {
  border-top: 3px solid var(--lo-blue);
}

.token-side--quirkie {
  border-top: 3px solid var(--og-lime);
}

.token-side--quirking {
  border-top: 3px solid #818cf8;
}

.token-side--inx {
  border-top: 3px solid #f472b6;
}

.token-side--quirkkid {
  border-top: 3px solid #c4b5fd;
}

.token-results-toolbar {
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.token-results-toolbar__hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 32rem;
  line-height: 1.35;
}

.token-side .nft-thumb {
  max-width: 200px;
  margin: 0 auto 0.75rem;
}

/* INX slot with no token art: small Quirkies mark top-left (not INX / metadata placeholder). */
.inx-missing-thumb {
  position: relative;
  box-sizing: border-box;
  min-height: 7.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 0.65rem 0.65rem;
}

.inx-missing-thumb__logo {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  width: 2.65rem;
  height: auto;
  max-height: 2.85rem;
  object-fit: contain;
  z-index: 1;
  pointer-events: none;
}

.inx-missing-thumb__msg {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.35;
  text-align: center;
  max-width: 11rem;
}

.token-side__label {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.token-side__owner {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.verdict {
  margin: 1.25rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
}

.verdict--ok {
  background: rgba(94, 227, 164, 0.12);
  border: 1px solid rgba(94, 227, 164, 0.35);
  color: var(--ok);
}

.verdict--bad {
  background: rgba(255, 122, 122, 0.1);
  border: 1px solid rgba(255, 122, 122, 0.3);
  color: var(--danger);
}

.footer {
  margin-top: 2.75rem;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.footer__credit {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.footer__meta {
  margin: 0;
  font-size: 0.68rem;
  color: var(--text-muted);
}

[data-theme="light"] input[type="text"],
[data-theme="light"] textarea.wallet-input-multiline {
  border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] input[type="text"]:focus,
[data-theme="light"] textarea.wallet-input-multiline:focus {
  box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.2);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Flex Your Genies */
.flex-actions {
  margin: 0.85rem 0 1.1rem;
  padding: 0;
}

.flex-open-btn {
  width: 100%;
}

body.flex-modal-active {
  overflow: hidden;
}

.flex-modal {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.25rem;
  padding-top: max(1.25rem, env(safe-area-inset-top));
  overflow-y: auto;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

.flex-modal.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.flex-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.flex-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(92vw, 720px);
  margin-bottom: 2rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem 1.5rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

.flex-modal__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-family: inherit;
}

.flex-modal__close:hover {
  color: var(--text);
  background: rgba(223, 255, 0, 0.12);
}

.flex-modal__brands {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.55rem;
  width: 100%;
  max-width: 100%;
  margin: 0 2.75rem 0.75rem 0;
}

.flex-modal__brand-img {
  display: block;
  flex-shrink: 1;
  flex-grow: 1;
  flex-basis: 0;
  min-width: 0;
  height: clamp(2rem, 10vw, var(--lo-modal-brand-logo-height));
  width: auto;
  max-height: clamp(2rem, 10vw, var(--lo-modal-brand-logo-height));
  object-fit: contain;
}

.flex-modal__brand-img--lo {
  flex-grow: 1.55;
  max-width: 70%;
}

.flex-modal__brand-img--og {
  flex-grow: 1;
  max-width: 38%;
}

.flex-modal__brand-x {
  flex-shrink: 0;
  font-size: clamp(1.2rem, 4.5vw, 1.6rem);
  font-weight: 200;
  color: var(--og-lime);
  line-height: 1;
  user-select: none;
}

.flex-modal__title {
  margin: 0 2.25rem 0.5rem 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--og-lime);
}

.flex-modal__lede {
  margin: 0 0 1rem;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.flex-modal__collection-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.flex-collection-pill {
  flex: 1;
  display: block;
  cursor: pointer;
  margin: 0;
  position: relative;
  min-width: 0;
}

.flex-collection-pill__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}

.flex-collection-pill__label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  border: 1px solid rgba(223, 255, 0, 0.5);
  background: var(--bg-panel-2);
  color: var(--og-lime-muted);
  box-shadow:
    0 0 0 1px rgba(223, 255, 0, 0.1),
    0 0 18px rgba(223, 255, 0, 0.14);
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  user-select: none;
}

.flex-collection-pill:hover
  .flex-collection-pill__input:not(:checked)
  + .flex-collection-pill__label {
  border-color: rgba(223, 255, 0, 0.75);
  color: var(--og-lime);
  box-shadow:
    0 0 0 1px rgba(223, 255, 0, 0.18),
    0 0 26px rgba(223, 255, 0, 0.22);
}

.flex-collection-pill__input:focus-visible + .flex-collection-pill__label {
  outline: 2px solid var(--og-lime);
  outline-offset: 2px;
}

.flex-collection-pill__input:checked + .flex-collection-pill__label {
  background: var(--og-lime);
  border-color: var(--og-lime);
  color: var(--bg-deep);
  box-shadow: 0 4px 0 var(--btn-primary-depth);
}

.flex-modal__sort {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.flex-modal__sort-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.35;
}

.flex-modal__sort-note {
  font-weight: 500;
  color: var(--og-lime-muted);
}

.flex-modal__select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  font-family: inherit;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-panel-2);
  color: var(--text);
  cursor: pointer;
}

.flex-modal__select:focus {
  outline: none;
  border-color: var(--og-lime);
  box-shadow: 0 0 0 3px rgba(223, 255, 0, 0.14);
}

.flex-preview-hint {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.flex-preview-grid {
  display: grid;
  gap: 0;
  margin-bottom: 1rem;
  padding: 0;
  background: var(--bg-panel-2);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
}

.flex-tile {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  background: #ffffff;
  border: none;
  outline: none;
}

.flex-tile--brand {
  position: relative;
  background: var(--og-lime);
  min-height: 0;
  overflow: hidden;
}

/* Brand tile: full cell, contain so the whole asset fits the square */
.flex-tile--brand > .flex-tile__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  z-index: 0;
  pointer-events: none;
}

/* pblo sits above the grid art */
.flex-tile__brand-stack {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  max-height: 52%;
  min-height: 0;
  box-sizing: border-box;
  padding: 0;
  gap: 0;
  line-height: 0;
  pointer-events: none;
}

.flex-tile__brand-pblo {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: top center;
  flex-shrink: 0;
  pointer-events: none;
  display: block;
}

.flex-tile--empty {
  background: #ffffff;
}

.flex-tile--dragging {
  opacity: 0.92;
}

.flex-tile--reordering {
  z-index: 4;
  pointer-events: none;
  will-change: transform;
}

.flex-tile--shuffle-in {
  will-change: opacity, transform;
}

.flex-tile__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: auto;
}

.flex-modal__generate {
  width: 100%;
}

.flex-modal__error {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: var(--danger);
  line-height: 1.4;
  display: none;
}

.flex-modal__error.is-visible {
  display: block;
}

.flex-preview-wrap {
  margin-top: 1.15rem;
}

.flex-preview-label {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.flex-modal__download {
  width: 100%;
  margin-top: 0.85rem;
}

/* Full-screen loader: brand logo spins + red→green progress bar */
.global-loading {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.22s ease,
    visibility 0.22s ease;
}

.global-loading.is-active {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.global-loading__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
}

.global-loading__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(320px, 92vw);
}

.global-loading__spin-wrap {
  position: relative;
  transform: scale(0.65);
  opacity: 0;
}

.global-loading.is-active .global-loading__spin-wrap {
  animation: global-loading-pop 0.4s cubic-bezier(0.34, 1.35, 0.64, 1) forwards;
}

.global-loading__img {
  display: block;
  width: min(120px, 32vw);
  height: auto;
  transform-origin: center center;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.55));
}

.global-loading.is-active .global-loading__img {
  animation: global-loading-spin 1.05s linear infinite;
}

.global-loading__progress {
  width: min(240px, 78vw);
  height: 8px;
  margin-top: 1.35rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  opacity: 0;
}

.global-loading.is-active .global-loading__progress {
  opacity: 1;
  transition: opacity 0.35s ease 0.12s;
}

.global-loading__progress-inner {
  height: 100%;
  width: min(52%, 140px);
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    #c62828 0%,
    #ff8f00 28%,
    #cddc39 52%,
    #43a047 78%,
    #1b5e20 100%
  );
  will-change: transform;
}

.global-loading.is-active .global-loading__progress-inner {
  animation: global-loading-bar-slide 2s ease-in-out infinite;
}

.global-loading__hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin: 0.85rem 0 0;
  padding: 0 0.75rem;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  opacity: 0;
}

.global-loading__hint-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.global-loading__hint-sub {
  font-size: 0.8rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: 0.02em;
  line-height: 1.4;
  max-width: 18rem;
}

.global-loading__pct {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.35s ease 0.28s,
    transform 0.35s ease 0.28s;
}

.global-loading.is-active .global-loading__pct {
  opacity: 1;
  transform: translateY(0);
}

.global-loading.is-active .global-loading__hint {
  opacity: 1;
  transition: opacity 0.35s ease 0.22s;
}

@keyframes global-loading-pop {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes global-loading-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes global-loading-bar-slide {
  0% {
    transform: translateX(-105%);
  }
  100% {
    transform: translateX(220%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .global-loading.is-active .global-loading__spin-wrap {
    animation: none;
    transform: scale(1);
    opacity: 1;
  }

  .global-loading.is-active .global-loading__img {
    animation: global-loading-spin 2.5s linear infinite;
  }

  .global-loading.is-active .global-loading__progress-inner {
    animation: none;
    transform: translateX(24%);
  }

  .global-loading.is-active .global-loading__hint {
    transition: none;
    opacity: 1;
  }
}
