:root {
  --bg: #050705;
  --panel: #0c0f0c;
  --panel-2: #111611;
  --text: #f5f7f2;
  --muted: #8c948d;
  --line: rgba(80, 245, 150, 0.16);
  --green: #50f59a;
  --green-2: #9cffc8;
  --white: #ffffff;
  --ink: #020302;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(rgba(80, 245, 150, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 245, 150, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 82% 10%, rgba(80, 245, 150, 0.18), transparent 26rem),
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.08), transparent 22rem),
    linear-gradient(135deg, #050705 0%, #0a0d0a 50%, #030403 100%);
  background-size: 72px 72px, 72px 72px, auto, auto, auto;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 48px;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 18px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 7, 5, 0.84);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(80, 245, 150, 0.45);
  border-radius: 6px;
  color: var(--green);
  background: rgba(80, 245, 150, 0.06);
  font-weight: 900;
  box-shadow: 0 0 28px rgba(80, 245, 150, 0.12);
}

.brand-mark svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.brand strong span {
  color: var(--green);
}

.nav {
  display: flex;
  gap: 6px;
}

.nav a,
.wallet-button,
.primary-link,
.secondary-link,
.primary-button,
.secondary-button,
.ghost-button,
.link-button {
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
}

.nav a {
  padding: 10px 12px;
  color: var(--muted);
}

.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.wallet-button,
.primary-button,
.secondary-button,
.ghost-button {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--panel-2);
}

.wallet-button,
.primary-button,
.secondary-button,
.ghost-button,
.primary-link,
.secondary-link {
  min-height: 42px;
  padding: 0 15px;
  font-weight: 760;
}

.wallet-button {
  color: var(--ink);
  background: var(--green);
  box-shadow: 0 0 28px rgba(80, 245, 150, 0.16);
}

.hero {
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 32px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 860;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.94;
  letter-spacing: 0;
  text-shadow: 0 0 32px rgba(80, 245, 150, 0.08);
}

h2 {
  margin-bottom: 10px;
  font-size: 28px;
  line-height: 1.05;
}

.hero-text {
  max-width: 610px;
  color: #d7d0df;
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.source-links a {
  padding: 8px 10px;
  border: 1px solid rgba(80, 245, 150, 0.18);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(80, 245, 150, 0.035);
  font-size: 12px;
  font-weight: 780;
  text-decoration: none;
}

.source-links a:hover {
  color: var(--green);
  border-color: rgba(80, 245, 150, 0.36);
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
}

.primary-link,
.primary-button {
  border: 0;
  color: var(--ink);
  background: var(--green);
  box-shadow: 0 0 32px rgba(80, 245, 150, 0.18);
}

.secondary-link,
.secondary-button {
  border: 1px solid rgba(80, 245, 150, 0.34);
  color: var(--green);
  background: rgba(80, 245, 150, 0.08);
}

.altar {
  position: relative;
  display: grid;
  min-height: 460px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(80, 245, 150, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 245, 150, 0.055) 1px, transparent 1px),
    #070a07;
  background-size: 34px 34px;
  box-shadow: var(--shadow);
}

.altar::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    linear-gradient(135deg, transparent 40%, rgba(80, 245, 150, 0.11), transparent 60%),
    repeating-linear-gradient(135deg, transparent 0 52px, rgba(80, 245, 150, 0.07) 52px 54px);
  mask-image: radial-gradient(circle at 74% 18%, black, transparent 56%);
}

.altar-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  display: inline-flex;
  gap: 9px;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid rgba(80, 245, 150, 0.22);
  border-radius: 6px;
  color: var(--green);
  background: rgba(0, 0, 0, 0.36);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.altar-badge svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.rings {
  position: absolute;
  inset: 34px;
  display: grid;
  place-items: center;
}

.rings span {
  position: absolute;
  width: min(80%, 360px);
  aspect-ratio: 1;
  border: 1px solid rgba(80, 245, 150, 0.52);
  border-radius: 50%;
  animation: spin 14s linear infinite;
  box-shadow: 0 0 30px rgba(80, 245, 150, 0.08);
}

.rings span:nth-child(2) {
  width: min(62%, 280px);
  border-color: rgba(255, 255, 255, 0.2);
  animation-duration: 9s;
  animation-direction: reverse;
}

.rings span:nth-child(3) {
  width: min(44%, 190px);
  border-color: rgba(156, 255, 200, 0.78);
  animation-duration: 6s;
}

.rings span::before,
.rings span::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.rings span::before {
  top: -4px;
  left: 50%;
}

.rings span::after {
  right: 8%;
  bottom: 12%;
}

.sigil {
  z-index: 1;
  display: grid;
  width: 154px;
  height: 154px;
  place-items: center;
  border: 1px solid rgba(80, 245, 150, 0.42);
  border-radius: 8px;
  color: var(--green);
  background:
    radial-gradient(circle at 50% 44%, rgba(80, 245, 150, 0.18), transparent 5rem),
    rgba(1, 3, 1, 0.78);
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 0 70px rgba(80, 245, 150, 0.25);
}

.sigil svg {
  width: 62px;
  height: 62px;
  fill: currentColor;
}

.sigil span {
  margin-top: -20px;
  color: var(--white);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.status-grid article,
.panel,
.token-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 11, 8, 0.88);
  box-shadow: var(--shadow);
}

.status-grid article {
  padding: 16px;
}

.status-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.status-grid strong {
  overflow-wrap: anywhere;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 18px;
  margin-bottom: 46px;
}

.panel {
  padding: 24px;
}

.launch-form {
  display: grid;
  grid-template-columns: 1fr 0.45fr;
  gap: 14px;
}

.launch-form label:nth-child(3),
.launch-form label:nth-child(4),
.upload-box,
.launch-form button,
.form-note {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 7px;
  color: #d8d2df;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.28);
  outline: 0;
}

input {
  min-height: 46px;
  padding: 0 13px;
}

input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

textarea {
  min-height: 116px;
  padding: 13px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: rgba(80, 245, 150, 0.78);
  box-shadow: 0 0 0 3px rgba(80, 245, 150, 0.12);
}

.primary-button {
  min-height: 48px;
}

.form-note,
.setup-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.upload-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(80, 245, 150, 0.035);
}

.upload-box strong,
.upload-box span {
  display: block;
}

.upload-box span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.file-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(80, 245, 150, 0.34);
  border-radius: 6px;
  color: var(--green);
  background: rgba(80, 245, 150, 0.08);
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.image-preview {
  grid-column: 1 / -1;
  display: grid;
  min-height: 118px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(80, 245, 150, 0.24);
  border-radius: 6px;
  color: var(--muted);
  background:
    linear-gradient(rgba(80, 245, 150, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 245, 150, 0.045) 1px, transparent 1px),
    rgba(0, 0, 0, 0.18);
  background-size: 20px 20px;
  text-align: center;
}

.image-preview img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.clear-image-button {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 0;
}

.oracle-card {
  display: grid;
  gap: 16px;
  min-height: 330px;
  align-content: center;
}

.orb {
  width: 118px;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid rgba(80, 245, 150, 0.36);
  background:
    radial-gradient(circle at 30% 25%, var(--white), var(--green) 12%, transparent 18%),
    linear-gradient(135deg, rgba(80, 245, 150, 0.08), rgba(80, 245, 150, 0.34)),
    #050705;
  box-shadow: 0 0 74px rgba(80, 245, 150, 0.24);
}

.oracle-card strong {
  font-size: 24px;
}

.oracle-card p {
  color: #d4ccdc;
  line-height: 1.55;
}

.meter {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
}

.meter span {
  color: var(--green);
  font-size: 28px;
  font-weight: 900;
}

.meter div {
  height: 12px;
  overflow: hidden;
  border-radius: 20px;
  background: #182018;
}

.meter i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1d7f48, var(--green), var(--white));
  transition: width 180ms ease;
}

.market-section {
  margin-bottom: 46px;
}

.inline-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.035);
}

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

.token-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    transform 160ms ease;
}

.token-card:hover {
  border-color: rgba(80, 245, 150, 0.42);
  transform: translateY(-2px);
}

.token-art {
  display: grid;
  height: 154px;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background:
    linear-gradient(rgba(80, 245, 150, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 245, 150, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 28% 25%, rgba(80, 245, 150, 0.35), transparent 8rem),
    linear-gradient(135deg, rgba(80, 245, 150, 0.22), rgba(255, 255, 255, 0.07));
  background-size: 24px 24px, 24px 24px, auto, auto;
}

.token-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.token-art span {
  font-size: 30px;
  font-weight: 950;
}

.token-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.token-title h3 {
  margin: 0;
  font-size: 22px;
  overflow-wrap: anywhere;
}

.token-title small,
.token-card p,
.token-meta {
  color: var(--muted);
}

.token-card p {
  margin-bottom: 0;
  line-height: 1.5;
}

.token-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  font-size: 13px;
}

.token-meta strong {
  display: block;
  color: var(--text);
  font-size: 16px;
}

.trade-box {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
}

.trade-box input {
  min-width: 0;
}

.trade-box button {
  min-width: 68px;
}

.token-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.modal-panel {
  position: relative;
  width: min(1040px, 100%);
  max-height: min(860px, calc(100vh - 32px));
  overflow: auto;
  border: 1px solid rgba(80, 245, 150, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(rgba(80, 245, 150, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 245, 150, 0.045) 1px, transparent 1px),
    rgba(5, 7, 5, 0.98);
  background-size: 28px 28px;
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.65);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  min-height: 38px;
  border: 1px solid rgba(80, 245, 150, 0.28);
  border-radius: 6px;
  color: var(--green);
  background: rgba(0, 0, 0, 0.48);
  cursor: pointer;
}

.modal-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 20px;
  padding: 24px;
}

.modal-art {
  display: grid;
  min-height: 280px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(80, 245, 150, 0.05);
}

.modal-art img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.modal-art span {
  font-size: 44px;
  font-weight: 950;
}

.chart-controls {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.chart-controls button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.24);
  cursor: pointer;
  font-weight: 850;
}

.chart-controls button.is-active {
  color: var(--ink);
  background: var(--green);
}

.modal-chart {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}

.modal-chart svg {
  display: block;
  width: 100%;
}

.modal-chart text {
  fill: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.chart-grid {
  fill: none;
  stroke: rgba(255, 255, 255, 0.18);
}

.chart-line {
  fill: none;
  stroke: var(--green);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
  filter: drop-shadow(0 0 10px rgba(80, 245, 150, 0.48));
}

.chart-marker {
  stroke: var(--white);
  stroke-dasharray: 5 7;
  stroke-width: 2;
}

.candle-wick {
  stroke-width: 2;
}

.candle-body {
  rx: 2;
}

.candle-wick.up,
.candle-body.up {
  fill: var(--green);
  stroke: var(--green);
}

.candle-wick.down,
.candle-body.down {
  fill: #ff6b6b;
  stroke: #ff6b6b;
}

.chart-empty {
  fill: var(--muted);
}

.modal-content {
  display: grid;
  align-content: start;
  gap: 16px;
}

.modal-content h2 {
  margin-bottom: 0;
  overflow-wrap: anywhere;
}

.modal-content p {
  color: #d4dcd3;
  line-height: 1.55;
}

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

.detail-stats span {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.22);
  font-size: 13px;
}

.detail-stats strong {
  display: block;
  color: var(--text);
  font-size: 17px;
  overflow-wrap: anywhere;
}

.trade-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(80, 245, 150, 0.04);
}

.trade-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.trade-tabs button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.22);
  cursor: pointer;
  font-weight: 850;
}

.trade-tabs button.is-active {
  color: var(--ink);
  background: var(--green);
}

#modalTradeQuote {
  min-height: 24px;
  margin-bottom: 0;
  color: var(--muted);
}

.setup-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.setup-section {
  display: none;
}

body.show-founder-setup .setup-section {
  display: block;
}

.link-button {
  margin-top: 12px;
  border: 0;
  color: var(--muted);
  background: transparent;
  text-decoration: underline;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  max-width: min(420px, calc(100% - 44px));
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--text);
  background: rgba(9, 8, 13, 0.92);
  box-shadow: var(--shadow);
  transform: translateY(120%);
  transition: transform 180ms ease;
}

.toast.is-visible {
  transform: translateY(0);
}

code {
  color: var(--green);
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

@media (max-width: 900px) {
  .topbar,
  .hero,
  .workbench,
  .status-grid,
  .token-grid,
  .modal-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: static;
  }

  .nav {
    order: 3;
    justify-content: space-between;
  }

  .hero {
    min-height: auto;
    padding: 48px 0 26px;
  }

  .altar {
    min-height: 360px;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 20px, 1180px);
  }

  .launch-form,
  .setup-row,
  .trade-box,
  .upload-box {
    grid-template-columns: 1fr;
  }

  .inline-heading {
    align-items: stretch;
    flex-direction: column;
  }

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

  .detail-stats {
    grid-template-columns: 1fr;
  }

  .token-modal {
    padding: 10px;
  }
}
