:root {
  color-scheme: dark;
  --bg: #0b0d0d;
  --panel: #141818;
  --panel-2: #0f1313;
  --line: #293131;
  --line-strong: #3a4542;
  --text: #f3efe6;
  --muted: #a8b0aa;
  --accent: #5fe0a2;
  --accent-2: #7fc7ff;
  --warn: #f0bd62;
  --bad: #ff6b6b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(95, 224, 162, 0.1), transparent 28%),
    radial-gradient(circle at 84% 4%, rgba(127, 199, 255, 0.08), transparent 26%),
    linear-gradient(180deg, #050707 0%, var(--bg) 46%, #070909 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

.cosmic-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.cosmic-bg::before,
.cosmic-bg::after {
  content: "";
  position: absolute;
  inset: -12%;
  background:
    radial-gradient(circle at 50% 18%, rgba(95, 224, 162, 0.08), transparent 28%),
    radial-gradient(circle at 72% 62%, rgba(183, 132, 255, 0.055), transparent 30%),
    radial-gradient(circle at 28% 80%, rgba(240, 189, 98, 0.05), transparent 24%);
  filter: blur(1px);
}

.cosmic-bg::after {
  opacity: 0.55;
  transform: translate3d(0, 0, 0);
  animation: nebulaPulse 16s ease-in-out infinite alternate;
}

.starfield {
  position: absolute;
  inset: -12%;
  opacity: 0.44;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.82) 0 1px, transparent 1.8px),
    radial-gradient(circle, rgba(95, 224, 162, 0.62) 0 1px, transparent 1.9px),
    radial-gradient(circle, rgba(127, 199, 255, 0.54) 0 1px, transparent 1.7px);
  background-position: 0 0, 38px 72px, 118px 24px;
  background-size: 170px 170px, 230px 230px, 310px 310px;
  animation: starDrift 42s linear infinite;
}

.stars-b {
  opacity: 0.3;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.72) 0 1px, transparent 1.7px),
    radial-gradient(circle, rgba(240, 189, 98, 0.46) 0 1px, transparent 1.8px);
  background-position: 60px 40px, 180px 130px;
  background-size: 260px 260px, 390px 390px;
  animation-duration: 64s;
  animation-direction: reverse;
}

.meteor {
  position: absolute;
  width: 230px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(247, 255, 250, 0.96), rgba(95, 224, 162, 0.72), transparent);
  filter: drop-shadow(0 0 8px rgba(95, 224, 162, 0.48));
  opacity: 0;
  transform: translate3d(0, 0, 0) rotate(-22deg);
  animation: meteorFall 6.8s linear infinite;
}

.meteor::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(247, 255, 250, 0.95);
  box-shadow: 0 0 12px rgba(95, 224, 162, 0.85);
  transform: translateY(-50%);
}

.meteor-1 {
  top: 7%;
  left: 86%;
  animation-delay: -0.8s;
}

.meteor-2 {
  top: 16%;
  left: 98%;
  width: 180px;
  animation-delay: -2.1s;
  animation-duration: 7.4s;
}

.meteor-3 {
  top: 31%;
  left: 78%;
  width: 260px;
  animation-delay: -3.4s;
  animation-duration: 8.2s;
}

.meteor-4 {
  top: 46%;
  left: 92%;
  width: 165px;
  animation-delay: -4.7s;
  animation-duration: 7.8s;
}

.meteor-5 {
  top: 62%;
  left: 74%;
  width: 135px;
  animation-delay: -5.6s;
  animation-duration: 9s;
}

.meteor-6 {
  top: 20%;
  left: 62%;
  width: 155px;
  animation-delay: -1.4s;
  animation-duration: 6.2s;
}

.meteor-7 {
  top: 38%;
  left: 108%;
  width: 220px;
  animation-delay: -6.1s;
  animation-duration: 8.8s;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0;
}

@keyframes starDrift {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-120px, 92px, 0);
  }
}

@keyframes nebulaPulse {
  from {
    transform: scale(1);
    opacity: 0.42;
  }

  to {
    transform: scale(1.05) translate3d(1.4%, -1%, 0);
    opacity: 0.74;
  }
}

@keyframes meteorFall {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(-22deg);
  }

  8% {
    opacity: 0.92;
  }

  34% {
    opacity: 0;
    transform: translate3d(-820px, 370px, 0) rotate(-22deg);
  }

  100% {
    opacity: 0;
    transform: translate3d(-820px, 370px, 0) rotate(-22deg);
  }
}

.header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0 20px;
}

.header-copy {
  min-width: 0;
}

.header-side {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.top-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 8px;
}

.logo-slot {
  width: clamp(46px, 5.5vw, 72px);
  height: clamp(46px, 5.5vw, 72px);
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border: 1px solid rgba(95, 224, 162, 0.48);
  background: #050707;
  overflow: hidden;
}

.logo-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(95, 224, 162, 0.48));
}

.language-switch {
  display: inline-flex;
  min-height: 42px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.sound-toggle {
  min-width: 124px;
  background: transparent;
  color: var(--text);
  border-color: rgba(95, 224, 162, 0.45);
}

.sound-toggle.active {
  background: rgba(95, 224, 162, 0.14);
  color: var(--accent);
}

.language-switch button {
  min-height: 40px;
  padding: 0 13px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}

.language-switch button:last-child {
  border-right: 0;
}

.language-switch button.active {
  background: #e7eadf;
  color: #101313;
}

.credit {
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid rgba(240, 189, 98, 0.45);
  color: #f5d39a;
  background: rgba(240, 189, 98, 0.08);
  font-weight: 700;
}

.build-stamp {
  width: fit-content;
  margin-top: 12px;
  padding: 6px 10px;
  border: 1px solid rgba(95, 224, 162, 0.35);
  color: var(--accent);
  background: rgba(95, 224, 162, 0.06);
  font-size: 12px;
  font-weight: 700;
}

.eyebrow,
.label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.95;
}

h2 {
  font-size: 24px;
  color: #f7d796;
  text-shadow: 0 0 18px rgba(240, 189, 98, 0.16);
}

h3 {
  font-size: 19px;
  margin-top: 6px;
  color: #f4f0e7;
}

.lede,
.section-head p,
.guide-panel p,
.help-text,
.activity-help,
.tool p + h3 {
  max-width: 680px;
}

.lede,
.section-head p,
.guide-panel p,
.help-text,
.activity-help {
  margin-top: 12px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.network {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  white-space: nowrap;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--bad);
}

.dot.good {
  background: var(--accent);
}

.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 18px;
}

.campaign-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 16px;
  align-items: start;
}

.mission-flow {
  display: grid;
  gap: 16px;
}

.mission {
  scroll-margin-top: 16px;
}

.mission-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--accent);
  font-weight: 800;
}

.mission-title .eyebrow {
  color: var(--accent);
}

.mission-context {
  max-width: 920px;
  margin: 0 0 16px 56px;
  padding: 12px 14px;
  border-left: 3px solid rgba(95, 224, 162, 0.72);
  background: linear-gradient(90deg, rgba(95, 224, 162, 0.1), rgba(127, 199, 255, 0.04));
}

.wallet-compatibility {
  margin: -6px 0 14px 56px;
  padding: 10px 12px;
  border: 1px solid rgba(240, 189, 98, 0.42);
  background: rgba(240, 189, 98, 0.08);
  color: #f5d39a;
  font-size: 14px;
  line-height: 1.4;
}

.activity-panel {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.guide-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 18px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  background: #111515;
  padding: 18px;
}

.guide-panel.two-column {
  margin-bottom: 14px;
}

.steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.45;
}

.steps strong,
.mini-guide strong {
  color: var(--text);
}

.mini-guide {
  display: grid;
  gap: 10px;
}

.mini-guide p {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  font-size: 14px;
}

.admin-tools {
  padding: 12px;
  border: 1px solid rgba(240, 189, 98, 0.42);
  background: rgba(240, 189, 98, 0.08);
}

.admin-tools summary {
  cursor: pointer;
  color: #f7d796;
  font-weight: 800;
}

.admin-tools p {
  margin: 10px 0 12px;
  color: var(--muted);
  line-height: 1.4;
}

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

.nft-contract-status,
.admin-address {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.nft-contract-status span,
.admin-address span {
  color: #87918b;
  font-size: 12px;
  text-transform: uppercase;
}

.nft-contract-status strong,
.admin-address strong {
  color: var(--accent);
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  word-break: break-all;
}

.admin-address {
  margin: 12px 0;
}

.notice {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(240, 189, 98, 0.45);
  background: rgba(240, 189, 98, 0.09);
  color: #ffe0a3;
}

.toolbar,
.result-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar.spaced {
  margin-top: 14px;
}

.toolbar.tight {
  gap: 8px;
}

.grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

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

.grid > div,
.inline-result,
.proof-results > div {
  min-width: 0;
  padding: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

code {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  color: var(--accent);
}

code.positive,
#secretAccessResult.positive {
  color: var(--accent);
}

.test-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

.sub-mission {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.tool {
  display: grid;
  align-content: start;
  gap: 13px;
}

.deploy-card,
.subhead {
  margin-bottom: 14px;
}

.help-text {
  font-size: 14px;
}

.warning-text {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(240, 189, 98, 0.4);
  background: rgba(240, 189, 98, 0.08);
  color: #f5d39a;
  font-size: 14px;
  line-height: 1.45;
}

.compact-warning {
  margin-top: 0;
  padding: 10px;
  font-size: 12px;
}

.cleanup-panel {
  border-color: rgba(240, 189, 98, 0.35);
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

label span {
  color: #87918b;
  font-size: 12px;
  line-height: 1.35;
  text-transform: none;
}

input,
textarea,
select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #080a0a;
  color: var(--text);
  font: inherit;
}

textarea {
  min-height: 92px;
  resize: vertical;
  text-transform: none;
}

select {
  appearance: none;
}

button,
a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  background: #e7eadf;
  color: #101313;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

button.secondary {
  background: transparent;
  color: var(--text);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

.form-grid.compact {
  grid-template-columns: minmax(0, 1fr) 220px;
}

.inline-result {
  margin-top: 14px;
}

.proof-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.claim-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  margin-top: 16px;
}

.claim-form {
  display: grid;
  gap: 12px;
}

.nft-preview {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

#nftCanvas {
  width: 100%;
  max-width: 320px;
  height: auto;
  aspect-ratio: 626 / 1024;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(145deg, rgba(95, 224, 162, 0.12), transparent 38%),
    linear-gradient(315deg, rgba(127, 199, 255, 0.14), transparent 42%),
    #0a0d0d;
}

.nft-card {
  width: 100%;
  min-height: 320px;
  display: grid;
  align-content: end;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(145deg, rgba(95, 224, 162, 0.12), transparent 38%),
    linear-gradient(315deg, rgba(127, 199, 255, 0.14), transparent 42%),
    #0a0d0d;
}

.pfp-preview {
  width: 94px;
  height: 94px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--muted);
  overflow: hidden;
}

.pfp-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nft-card h3 {
  font-size: 24px;
}

.nft-card span {
  display: inline-flex;
  width: fit-content;
  padding: 8px 10px;
  border: 1px solid var(--line);
  color: var(--accent);
  background: var(--panel-2);
  font-weight: 700;
}

.result-head {
  justify-content: space-between;
}

.tx-history {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.activity-help {
  font-size: 14px;
}

.tx-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(110px, 0.8fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
}

.tx-row code {
  margin: 0;
}

.tx-row small,
.empty {
  color: var(--muted);
}

pre {
  min-height: 260px;
  max-height: 420px;
  overflow: auto;
  margin: 14px 0 0;
  padding: 14px;
  background: #080a0a;
  border: 1px solid var(--line);
  color: #dce3dd;
  white-space: pre-wrap;
}

@media (prefers-reduced-motion: reduce) {
  .cosmic-bg::after,
  .starfield,
  .meteor {
    animation: none;
  }

  .meteor {
    display: none;
  }
}

@media (max-width: 980px) {
  .campaign-layout {
    grid-template-columns: 1fr;
  }

  .activity-panel {
    position: static;
    order: -1;
    max-height: none;
  }

  .status-grid,
  .test-grid,
  .sub-missions,
  .proof-results {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .header {
    display: block;
  }

  .title-row {
    align-items: flex-start;
  }

  .header-side {
    justify-items: start;
    margin-top: 18px;
  }

  .top-controls {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .network {
    margin-top: 0;
  }

  .mission-context {
    margin-left: 0;
  }

  .wallet-compatibility {
    margin-left: 0;
  }

  .status-grid,
  .test-grid,
  .sub-missions,
  .guide-panel,
  .form-grid,
  .form-grid.compact,
  .proof-results,
  .claim-grid,
  .tx-row {
    grid-template-columns: 1fr;
  }
}
