:root {
  --bg: #0a0705;
  --bg2: #150d05;
  --amber: #ffb43c;
  --gold: #ffd54a;
  --gold-hi: #fff3b0;
  --gold-lo: #a8670c;
  --ink: #2a1a05;
  --line: rgba(255, 180, 60, 0.18);
  --tap: 52px; /* min tap target */
}

/* ---------- vendored type (shipped in /fonts) ---------- */
@font-face {
  font-family: "Oswald";
  src: url("fonts/Oswald.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Anton";
  src: url("fonts/Anton.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100dvh;
  color: #f6e7cf;
  font-family: "Oswald", "Trebuchet MS", "Segoe UI", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(120% 70% at 50% 0%, #2a1a08 0%, var(--bg2) 42%, var(--bg) 78%),
    var(--bg);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

/* subtle holy dust */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1px 1px at 20% 30%, rgba(255, 220, 140, 0.5), transparent),
    radial-gradient(1px 1px at 70% 60%, rgba(255, 220, 140, 0.35), transparent),
    radial-gradient(1px 1px at 85% 20%, rgba(255, 220, 140, 0.4), transparent),
    radial-gradient(1px 1px at 40% 80%, rgba(255, 220, 140, 0.3), transparent);
  opacity: 0.5;
}

.shrine {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 14px
    calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---------- header / 3D bubble logo ---------- */
.hdr {
  text-align: center;
  padding: 2px 0;
}
/* hero banner */
.hero {
  margin: 0;
  line-height: 0;
}
.hero img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.5),
    0 0 0 1px var(--line);
}
.logo {
  margin: 0;
  font-family: "Anton", "Arial Black", "Impact", system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(38px, 13vw, 66px);
  line-height: 0.9;
  letter-spacing: 0.005em;
  background: linear-gradient(180deg, #fff6cf 0%, var(--gold) 38%, #e6a100 66%, #8a5a00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 1px rgba(90, 55, 0, 0.55);
  filter: drop-shadow(0 2px 0 #5a3700) drop-shadow(0 4px 1px rgba(0, 0, 0, 0.6))
    drop-shadow(0 0 22px rgba(255, 170, 50, 0.5));
}
.logo__ify {
  font-size: 0.62em;
  vertical-align: 6%;
}
.tagline {
  margin: 8px 0 0;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #d9b579;
}
.sol {
  color: var(--gold);
  font-weight: 800;
  text-shadow: 0 0 10px rgba(255, 190, 60, 0.7);
}

/* ---------- stage / canvas ---------- */
.stage {
  position: relative;
  border-radius: 18px;
  padding: 10px;
  background: linear-gradient(160deg, rgba(255, 190, 70, 0.12), rgba(0, 0, 0, 0.35));
  border: 1px solid var(--line);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5) inset,
    0 18px 50px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(255, 150, 40, 0.12);
}
.stage__glowframe {
  position: absolute;
  inset: 6px;
  border-radius: 14px;
  pointer-events: none;
  box-shadow: 0 0 40px rgba(255, 170, 50, 0.25) inset;
}
.board {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  max-height: 68dvh;
  margin: 0 auto;
  border-radius: 12px;
  background: #0a0705;
  touch-action: none; /* we own the gestures */
  cursor: grab;
}
.board:active {
  cursor: grabbing;
}
.stage__hint {
  margin: 8px 2px 2px;
  text-align: center;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: #b89968;
  text-transform: uppercase;
}

/* ---------- panels ---------- */
.panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.panel--row {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.panel--wrap {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}

/* drop zone */
.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 18px;
  min-height: 92px;
  justify-content: center;
  border-radius: 16px;
  border: 2px dashed rgba(255, 190, 70, 0.4);
  background: rgba(255, 180, 60, 0.05);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.drop.drag {
  border-color: var(--gold);
  background: rgba(255, 190, 60, 0.14);
  transform: scale(1.01);
}
.drop__icon {
  font-size: 26px;
}
.drop__t {
  font-weight: 800;
  font-size: 17px;
  color: var(--gold-hi);
  letter-spacing: 0.02em;
}
.drop__s {
  font-size: 12px;
  color: #b89968;
}

/* buttons */
.btn {
  min-height: var(--tap);
  border: none;
  border-radius: 14px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.03em;
  cursor: pointer;
  color: var(--ink);
  padding: 14px 16px;
  transition: transform 0.08s, filter 0.15s;
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}
.btn--preset {
  background: linear-gradient(180deg, #3a2a12, #241706);
  color: var(--gold-hi);
  border: 1px solid var(--line);
}
.btn--dl {
  font-size: 19px;
  letter-spacing: 0.06em;
  background: linear-gradient(180deg, #fff3b0 0%, var(--gold) 40%, #e6a100 72%, #b06f00 100%);
  box-shadow:
    0 2px 0 #7a4d00,
    0 10px 26px rgba(255, 160, 40, 0.4),
    0 0 30px rgba(255, 170, 50, 0.35);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* gospel switch */
.lbl {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #b89968;
  flex: 0 0 auto;
}
.switch {
  flex: 1 1 auto;
  min-height: var(--tap);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid rgba(120, 70, 0, 0.6);
  background: linear-gradient(180deg, #f4d38a, #c9860f);
  color: #3a2200;
  font-weight: 800;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 240, 190, 0.3) inset;
}
.switch__txt {
  font-size: 15px;
}
.switch__flip {
  font-size: 20px;
  opacity: 0.7;
}

/* relic chips */
.chip {
  flex: 1 1 auto;
  min-height: 46px;
  min-width: 84px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 180, 60, 0.07);
  color: var(--gold-hi);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.08s, background 0.15s;
}
.chip:active {
  transform: translateY(1px);
  background: rgba(255, 190, 60, 0.16);
}
.chip:disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* segmented toggles (crop shape / export size) */
.panel--segs {
  flex-direction: row;
  gap: 10px;
}
.seg {
  flex: 1 1 auto;
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(10, 7, 5, 0.6);
}
.segbtn {
  flex: 1 1 auto;
  min-height: 40px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #c9a95f;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
}
.segbtn.seg--on {
  background: linear-gradient(180deg, #ffd54a, #e6a100);
  color: var(--ink);
}

/* share row */
.share {
  display: flex;
  gap: 8px;
}
.btn--share {
  flex: 1 1 0;
  min-height: 48px;
  font-size: 15px;
  color: var(--gold-hi);
  background: linear-gradient(180deg, #3a2a12, #241706);
  border: 1px solid var(--line);
}

/* ---------- contract address bar ---------- */
.cabar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 190, 70, 0.1), rgba(0, 0, 0, 0.4));
  border: 1px solid var(--line);
  box-shadow: 0 0 18px rgba(255, 150, 40, 0.12) inset;
}
.cabar__lbl {
  flex: 0 0 auto;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink);
  background: linear-gradient(180deg, #ffd54a, #e6a100);
  padding: 5px 8px;
  border-radius: 7px;
}
.cabar__addr {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 190, 70, 0.28);
  border-radius: 9px;
  background: rgba(10, 7, 5, 0.85);
  cursor: pointer;
}
.cabar__addr:active {
  background: rgba(255, 190, 60, 0.14);
}
.cabar__mono {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  letter-spacing: 0.01em;
  color: var(--gold);
}
.cabar__copy {
  flex: 0 0 auto;
  color: var(--gold-hi);
  font-size: 16px;
}
.cabar__pump {
  flex: 0 0 auto;
  text-decoration: none;
  font-weight: 800;
  font-size: 12px;
  color: var(--ink);
  background: linear-gradient(180deg, #7cff9b, #12a150);
  padding: 8px 10px;
  border-radius: 9px;
  white-space: nowrap;
}

/* ---------- buy / trade bar (official links) ---------- */
.buybar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.buybar__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.buybtn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 12px 16px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 17px;
  line-height: 1.06;
  letter-spacing: 0.01em;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.06s ease, filter 0.15s ease;
}
.buybtn:hover {
  filter: brightness(1.04);
}
.buybtn:active {
  transform: translateY(1px);
}
.buybtn__logo {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.35);
}
.buybtn__txt {
  flex: 1 1 auto;
}
.buybtn__arr {
  position: absolute;
  top: 10px;
  right: 13px;
  font-size: 18px;
  font-weight: 700;
  opacity: 0.66;
}
/* wide (Jupiter) — center the group, arrow inline after the label */
.buybtn--wide {
  justify-content: center;
  font-size: 19px;
}
.buybtn--wide .buybtn__txt {
  flex: 0 0 auto;
}
.buybtn--wide .buybtn__arr {
  position: static;
  margin-left: 4px;
  align-self: center;
}
/* brand-tinted palettes */
.buybtn--pump {
  background: linear-gradient(160deg, #93e9a6 0%, #39b866 100%);
}
.buybtn--gmgn {
  background: linear-gradient(160deg, #ffe39a 0%, #f0a92e 100%);
}
.buybtn--jup {
  background: linear-gradient(160deg, #a9e7d6 0%, #63c6e2 100%);
}

/* ---------- live chart (very bottom) ---------- */
.market {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.market__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}
.market__t {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--gold);
}
.market__full {
  font-size: 12px;
  color: #c9a95f;
  text-decoration: none;
}
.market__chart {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 62dvh;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0a0705;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
@media (min-width: 560px) {
  .market__chart {
    aspect-ratio: 16 / 10;
  }
}
.market__chart iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- sticker tray ---------- */
.tray {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tray__tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.tray__tabs::-webkit-scrollbar,
.tray__strip::-webkit-scrollbar {
  display: none;
}
.tab {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 180, 60, 0.06);
  color: #d9b579;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.06em;
  cursor: pointer;
  white-space: nowrap;
}
.tab--on {
  background: linear-gradient(180deg, #ffd54a, #e6a100);
  color: var(--ink);
  border-color: transparent;
}
.tray__strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scrollbar-width: none;
  padding: 2px 2px 8px;
}
.scChip {
  flex: 0 0 auto;
  width: 76px;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 7px 5px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(20, 12, 4, 0.6);
  cursor: pointer;
}
.scChip:active {
  transform: translateY(1px);
  background: rgba(255, 190, 60, 0.12);
}
.scChip canvas {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 38%, #241708, #0a0705);
}
.scLbl {
  font-size: 10px;
  line-height: 1.1;
  text-align: center;
  color: #c9a95f;
  letter-spacing: 0.01em;
}
.scChip.bg--on {
  outline: 2px solid var(--gold);
  outline-offset: -1px;
}

.ftr {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #6f5a3a;
  padding: 6px 0 2px;
}

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  background: rgba(20, 12, 4, 0.96);
  color: var(--gold-hi);
  border: 1px solid var(--line);
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  max-width: 90vw;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 50;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (min-width: 560px) {
  .board {
    max-height: 62dvh;
  }
}
