/* ==========================================================================
   SUMMON — one stylesheet. Arcane brutalism: flat violet-black, chunky 2px
   borders, hard offset shadows, pixel headings (Silkscreen), Space Grotesk body.
   No sidebar: a floating top bar and one centred column.
   ========================================================================== */

:root {
  --bg: #0d0a16;
  --bg-2: #120d20;
  --panel: #17112b;
  --panel-2: #1f1738;
  --line: #34295a;
  --line-2: #4a3b80;
  --ink: #f3f0ff;
  --ink-2: #d6ceff;
  --muted: #9d95b8;
  --faint: #6f6790;
  --violet: #8b5cf6;
  --violet-d: #4c1d95;
  --violet-l: #c4b5fd;
  --sun: #ffd23f;
  --sun-d: #b88a0b;
  --mint: #3dffa8;
  --mint-d: #0f8f55;
  --red: #ff5a6e;
  --shadow: #07040f;
  --r: 18px;
  --px: "Silkscreen", ui-monospace, monospace;
  --sans: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font: 500 16px/1.5 var(--sans);
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Crect x='17' y='17' width='2' height='2' fill='%23221a3d'/%3E%3C/svg%3E");
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
img, svg { display: block; }
.coin-svg, .portal-svg { image-rendering: pixelated; }
.pupils { transition: transform .25s cubic-bezier(.3, 1.5, .5, 1); }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.px { font-family: var(--px); font-weight: 400; letter-spacing: -0.01em; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }

/* ---------------- top bar ---------------- */
.bar-wrap { position: sticky; top: 0; z-index: 30; padding: 14px 16px 0; }
.bar {
  max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 14px;
  padding: 10px 10px 10px 16px; border-radius: 999px; background: var(--panel);
  border: 2px solid var(--line); box-shadow: 0 6px 0 var(--shadow);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-word { font: 400 26px/1 var(--px); }
.nav { display: flex; gap: 4px; }
.nav a { padding: 9px 16px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 700; font-size: 15px; }
.nav a:hover { color: var(--ink); background: var(--panel-2); }
.nav a.on { color: var(--bg); background: var(--violet-l); }
.bar-links { display: flex; align-items: center; gap: 6px; }
.bar-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--panel-2); border: 2px solid var(--line-2); color: var(--ink); text-decoration: none; box-shadow: 0 3px 0 var(--shadow); transition: transform .08s, border-color .15s; }
.bar-ic svg { fill: currentColor; }
.bar-ic:hover { border-color: var(--violet-l); }
.bar-ic:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--shadow); }
.bar-ic.is-off { opacity: .45; cursor: default; }
.bar-ca { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 12px; border-radius: 12px; border: 2px dashed var(--sun-d); background: var(--bg-2); font-size: 13px; font-weight: 700; }
.bar-ca-k { font: 400 12px/1 var(--px); color: var(--sun); }
.bar-ca .mono { font-size: 13px; color: var(--ink); }
.bar-ca-soon { color: var(--muted); padding-right: 6px; }
.bar-copy { cursor: pointer; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; border: 0; background: var(--sun); color: var(--bg); }
.bar-copy svg { fill: currentColor; }
.bar-copy:hover { filter: brightness(1.08); }
@media (max-width: 760px) {
  .bar { flex-wrap: wrap; border-radius: 26px; }
  .nav { order: 3; width: 100%; justify-content: space-between; }
  .bar-links { order: 4; width: 100%; justify-content: center; }
  .nav a { padding: 8px 10px; font-size: 14px; }
  .brand-word { font-size: 22px; }
}

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  padding: 12px 20px; border-radius: 14px; border: 2px solid var(--line-2); background: var(--panel-2);
  color: var(--ink); font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap;
  box-shadow: 0 4px 0 var(--shadow); transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--shadow); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-violet { background: var(--violet); border-color: var(--violet-l); color: #fff; box-shadow: 0 4px 0 var(--violet-d); }
.btn-violet:active:not(:disabled) { box-shadow: 0 1px 0 var(--violet-d); }
.btn-sun { background: var(--sun); border-color: #fff0a8; color: var(--bg); box-shadow: 0 4px 0 var(--sun-d); }
.btn-sun:active:not(:disabled) { box-shadow: 0 1px 0 var(--sun-d); }
.btn-lg { padding: 16px 28px; font-size: 18px; border-radius: 16px; }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn.is-busy { pointer-events: none; }
.btn.is-busy::before { content: ""; width: 14px; height: 14px; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-wallet.on { background: var(--mint); border-color: #b8ffdd; color: var(--bg); box-shadow: 0 4px 0 var(--mint-d); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- layout ---------------- */
main { max-width: 1180px; margin: 0 auto; padding: 26px 16px 60px; }
.box { background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); box-shadow: 0 6px 0 var(--shadow); }
.box-pad { padding: 22px; }
.sec { margin-top: 56px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.sec-title { font: 400 30px/1.05 var(--px); margin: 0; }
.kicker { font: 400 13px/1 var(--px); letter-spacing: .08em; color: var(--sun); text-transform: uppercase; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--panel-2); border: 2px solid var(--line); font-size: 13px; font-weight: 700; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.notice { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--panel-2); font-size: 14px; }
.notice-err { border-color: #7a2336; background: #2a0f1a; color: #ffc4cd; }

/* ---------------- the altar (home) ---------------- */
.altar { position: relative; text-align: center; padding: 30px 0 10px; overflow-x: clip; overflow-y: visible; }
.portal-stage { position: relative; width: 250px; height: 250px; margin: 0 auto; }
.portal-stage .aura { position: absolute; inset: -30px; border-radius: 50%; border: 3px dashed var(--line-2); animation: spin 26s linear infinite; }
.portal-stage .aura.a2 { inset: -58px; border: 2px dotted var(--line); animation-duration: 40s; animation-direction: reverse; }
.portal-stage .portal-svg { width: 100%; height: 100%; filter: drop-shadow(0 10px 0 var(--shadow)); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.portal-stage.is-summoning .portal-svg { animation: pulse .5s ease-in-out infinite alternate; }
.portal-stage.is-summoning .aura { animation-duration: 3s; border-color: var(--sun); }
@keyframes pulse { to { transform: scale(1.08) rotate(3deg); } }
.orbit { position: absolute; left: 50%; top: 50%; pointer-events: none; }
.orbit span { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; padding: 6px 12px; border-radius: 999px; background: var(--panel); border: 2px solid var(--line); font-size: 13px; font-weight: 700; color: var(--muted); }
.altar-title { font: 400 clamp(40px, 7.2vw, 84px)/.95 var(--px); margin: 44px 0 0; letter-spacing: -0.02em; }
.altar-title em { font-style: normal; color: var(--violet-l); }
.altar-sub { color: var(--muted); font-size: 19px; max-width: 620px; margin: 16px auto 0; }

.spell { max-width: 760px; margin: 30px auto 0; display: flex; gap: 10px; padding: 10px; border-radius: 22px; background: var(--panel); border: 2px solid var(--line-2); box-shadow: 0 8px 0 var(--shadow); }
.spell:focus-within { border-color: var(--violet-l); }
.spell-in { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 700 22px var(--sans); padding: 8px 12px; }
.spell-in::placeholder { color: var(--faint); font-weight: 500; }
.spell .btn { flex: none; }
@media (max-width: 560px) { .spell { flex-direction: column; } .spell-in { font-size: 19px; text-align: center; } }
.trend { max-width: 760px; margin: 16px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.trend button { cursor: pointer; padding: 7px 13px; border-radius: 999px; border: 2px dashed var(--line-2); background: transparent; color: var(--ink-2); font-weight: 700; font-size: 14px; }
.trend button:hover { border-style: solid; border-color: var(--violet-l); color: var(--ink); }

/* ---------------- the three cards ---------------- */
.draw { margin-top: 46px; }
.draw-head { text-align: center; margin-bottom: 22px; }
.draw-head h2 { font: 400 28px/1.1 var(--px); margin: 8px 0 0; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; perspective: 1600px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; } }
.tarot { position: relative; transform-style: preserve-3d; animation: flipin .7s cubic-bezier(.2, 1.2, .4, 1) both; }
.tarot:nth-child(2) { animation-delay: .12s; }
.tarot:nth-child(3) { animation-delay: .24s; }
@keyframes flipin { from { transform: rotateY(180deg) translateY(40px); opacity: 0; } 55% { opacity: 1; } to { transform: none; opacity: 1; } }
.tarot-face {
  position: relative; display: flex; flex-direction: column; height: 100%; padding: 14px; border-radius: 22px;
  background: var(--panel); border: 3px solid var(--line-2); box-shadow: 0 8px 0 var(--shadow);
  transition: transform .2s cubic-bezier(.3, 1.5, .5, 1), border-color .2s;
}
.tarot:hover .tarot-face { transform: translateY(-6px); border-color: var(--violet-l); }
.tarot.on .tarot-face { border-color: var(--sun); box-shadow: 0 8px 0 var(--sun-d); }
.tarot-inner { flex: 1; display: flex; flex-direction: column; border: 2px dashed var(--line); border-radius: 14px; padding: 16px; }
.tarot-top { display: flex; justify-content: space-between; align-items: center; }
.tarot-num { font: 400 20px/1 var(--px); color: var(--sun); }
.tarot-art { margin: 14px auto 6px; width: 72%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 3px solid var(--line-2); }
.tarot-art .coin-svg { width: 100%; height: 100%; }
.tarot-name { font: 400 26px/1.05 var(--px); text-align: center; margin-top: 12px; overflow-wrap: anywhere; }
.tarot-ticker { text-align: center; font: 700 15px var(--mono); color: var(--violet-l); margin-top: 4px; }
.tarot-line { text-align: center; color: var(--ink-2); font-size: 16px; margin: 12px 0 0; min-height: 48px; }
.tarot .chips { justify-content: center; margin-top: 12px; }
.tarot .btn { margin-top: 16px; }
.draw-foot { display: flex; justify-content: center; gap: 10px; margin-top: 24px; flex-wrap: wrap; }

/* ---------------- the launch rite ---------------- */
.rite { margin-top: 50px; display: grid; grid-template-columns: 1fr 380px; gap: 22px; align-items: start; }
@media (max-width: 960px) { .rite { grid-template-columns: 1fr; } }
.rite-side { position: sticky; top: 100px; display: grid; gap: 14px; }
.step-tag { display: inline-flex; align-items: center; gap: 10px; font: 400 18px/1 var(--px); margin-bottom: 16px; }
.step-tag b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--sun); color: var(--bg); font-weight: 400; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; margin-top: 12px; }
.flabel { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.input, .textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg-2);
  color: var(--ink); font: 600 16px var(--sans); outline: 0;
}
.input:focus, .textarea:focus { border-color: var(--violet-l); }
.textarea { resize: vertical; min-height: 110px; line-height: 1.45; }
.input.mono { font-family: var(--mono); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { cursor: pointer; padding: 9px 14px; border-radius: 10px; border: 2px solid var(--line); background: var(--bg-2); font-weight: 700; font-size: 14px; color: var(--ink-2); }
.seg button.on { background: var(--violet); border-color: var(--violet-l); color: #fff; }
.devbuy { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.devbuy .input { width: 130px; }
.cost { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 2px dashed var(--line); font-size: 14px; display: grid; gap: 2px; }
.cost.is-warn { border-color: var(--red); }
.cost-warn { color: #ffc4cd; font-weight: 700; }
.facts { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; display: grid; gap: 6px; }
.status { padding: 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--panel-2); font-size: 14px; display: flex; gap: 12px; align-items: flex-start; }
.status.is-err { border-color: #7a2336; background: #2a0f1a; color: #ffd6dc; }
.status.is-ok { border-color: var(--mint-d); background: #0c2a1d; color: #c8ffe6; }
.status .btn { margin-top: 10px; }
.status .mini { width: 40px; height: 40px; flex: none; border-radius: 10px; overflow: hidden; }

/* ---------------- coin tiles and lists ---------------- */
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.tile { display: flex; flex-direction: column; gap: 10px; padding: 12px; text-decoration: none; background: var(--panel); border: 2px solid var(--line); border-radius: 18px; box-shadow: 0 5px 0 var(--shadow); transition: transform .15s, border-color .15s; }
.tile:hover { transform: translateY(-4px); border-color: var(--violet-l); }
.tile-art { border-radius: 12px; overflow: hidden; aspect-ratio: 1; }
.tile-art .coin-svg { width: 100%; height: 100%; }
.tile-name { font: 400 19px/1.1 var(--px); overflow-wrap: anywhere; }
.tile-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.tile-from { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); display: grid; justify-items: center; gap: 12px; }
.empty .portal-svg { width: 90px; height: 90px; }
.skel { background: var(--panel-2); border-radius: 12px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .55; } }

/* ---------------- coin page ---------------- */
.coin-hero { display: grid; grid-template-columns: 360px 1fr; gap: 26px; align-items: start; }
@media (max-width: 860px) { .coin-hero { grid-template-columns: 1fr; } }
.coin-hero .tarot { animation: none; }
.coin-title { font: 400 clamp(34px, 5vw, 58px)/1 var(--px); margin: 10px 0 0; overflow-wrap: anywhere; }
.from-chip { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 12px; background: var(--panel-2); border: 2px dashed var(--violet); font-weight: 700; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 2px dashed var(--line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv-k { color: var(--muted); }
.kv-v { display: flex; align-items: center; gap: 8px; min-width: 0; text-align: right; overflow-wrap: anywhere; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } }
.stat { padding: 16px; }
.stat-v { font: 400 26px/1 var(--px); margin-top: 6px; }
.icon-btn { cursor: pointer; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; border: 2px solid var(--line); background: var(--bg-2); }
.icon-btn:hover { border-color: var(--violet-l); }

/* ---------------- how + footer ---------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { padding: 22px; }
.step-n { font: 400 44px/1 var(--px); color: var(--sun); }
.step h3 { font: 400 22px/1.1 var(--px); margin: 14px 0 8px; }
.step p { margin: 0; color: var(--muted); }
.foot { max-width: 1180px; margin: 0 auto; padding: 26px 16px 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--faint); font-size: 13px; border-top: 2px dashed var(--line); }
.ca-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; max-width: 760px; margin: 22px auto 0; padding: 10px 10px 10px 16px; border-radius: 16px; background: var(--panel); border: 2px solid var(--sun); }
.ca-strip .mono { font-size: 13px; overflow-wrap: anywhere; min-width: 0; }

/* ---------------- toasts ---------------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: grid; gap: 8px; }
.toast { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 14px; background: var(--panel-2); border: 2px solid var(--line-2); box-shadow: 0 5px 0 var(--shadow); font-weight: 700; font-size: 14px; max-width: 360px; }
.toast-err { border-color: var(--red); }
.toast-ok { border-color: var(--mint); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
