:root {
  color-scheme: dark;
  --bg: #020203;
  --panel: rgba(11, 10, 16, 0.82);
  --panel-strong: rgba(18, 15, 28, 0.94);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(136, 64, 255, 0.64);
  --text: #f7f5ff;
  --muted: rgba(247, 245, 255, 0.64);
  --soft: rgba(247, 245, 255, 0.1);
  --accent: #8840ff;
  --accent-2: #36f2c4;
  --danger: #ff4d8f;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
  --radius: 8px;
  --cursor-x: 50vw;
  --cursor-y: 50vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.86)),
    url("media/Back.svg") center / cover fixed,
    #000;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
}

body::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 82%, transparent 100%);
}

body::after {
  z-index: 20;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.035) 0,
    rgba(255, 255, 255, 0.035) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.18;
  mix-blend-mode: screen;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

#ambientCanvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.cursor-light {
  position: fixed;
  left: var(--cursor-x);
  top: var(--cursor-y);
  z-index: 3;
  width: 520px;
  height: 520px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(136, 64, 255, 0.18), rgba(54, 242, 196, 0.06) 42%, transparent 68%);
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  opacity: 0.82;
}

.view {
  display: none;
  min-height: 100vh;
  position: relative;
  isolation: isolate;
}

.view.is-active {
  display: block;
  animation: viewIn 520ms ease both;
}

.topbar,
.appbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 84px;
  padding: 22px clamp(18px, 4vw, 56px);
}

.topbar {
  justify-content: space-between;
}

.brand-full {
  width: clamp(150px, 18vw, 220px);
  height: auto;
}

.brand-mark {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.text-link,
.ghost-button,
.icon-button,
.secondary-action,
.primary-action,
.badge-toggle,
.upload-drop {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(16px);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.text-link {
  padding: 10px 14px;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 800;
}

.text-link:hover,
.ghost-button:hover,
.icon-button:hover,
.secondary-action:hover,
.badge-toggle:hover,
.upload-drop:hover {
  border-color: rgba(136, 64, 255, 0.58);
  background: rgba(136, 64, 255, 0.12);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.85fr);
  align-items: center;
  gap: clamp(32px, 5vw, 76px);
  min-height: calc(100vh - 84px);
  padding: 0 clamp(18px, 5vw, 72px) 7vh;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 900px;
  font-size: clamp(56px, 8.2vw, 128px);
  line-height: 0.86;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow:
    0 0 20px rgba(136, 64, 255, 0.32),
    0 0 46px rgba(136, 64, 255, 0.2);
}

h2 {
  font-size: clamp(34px, 5vw, 70px);
  line-height: 0.96;
  word-break: break-word;
}

.hero-line {
  max-width: 520px;
  margin: 24px 0 34px;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.45;
}

.primary-action,
.secondary-action,
.ghost-button,
.icon-button,
.badge-toggle {
  cursor: pointer;
}

.primary-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 58px;
  padding: 0 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(136, 64, 255, 1), rgba(106, 35, 240, 0.86)),
    #8840ff;
  box-shadow:
    0 18px 46px rgba(136, 64, 255, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  color: white;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.primary-action::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(110deg, transparent 0 34%, rgba(255, 255, 255, 0.28) 45%, transparent 58% 100%);
  transform: translateX(-120%);
  transition: transform 560ms ease;
}

.primary-action:hover {
  transform: translateY(-2px);
  box-shadow:
    0 24px 60px rgba(136, 64, 255, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.primary-action:hover::before {
  transform: translateX(120%);
}

.primary-action > span {
  position: relative;
  z-index: 1;
}

.button-glyph {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.wide {
  width: 100%;
}

.hero-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  margin-left: 10px;
  vertical-align: top;
}

.hero-card-stage,
.preview-stage,
.final-card-stage {
  display: grid;
  place-items: center;
  min-width: 0;
  perspective: 1300px;
}

.community-card {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(78vw, 430px);
  aspect-ratio: 5 / 7;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(150deg, rgba(136, 64, 255, 0.34), transparent 28%),
    linear-gradient(330deg, rgba(54, 242, 196, 0.12), transparent 30%),
    #050407;
  box-shadow:
    0 0 0 1px rgba(136, 64, 255, 0.18),
    0 30px 90px rgba(0, 0, 0, 0.62),
    0 0 90px rgba(136, 64, 255, 0.24);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 160ms ease, box-shadow 260ms ease;
}

.community-card::before {
  position: absolute;
  inset: 1px;
  z-index: 0;
  border-radius: calc(var(--radius) - 2px);
  content: "";
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.16) 0 1px, transparent 1.8px),
    repeating-linear-gradient(120deg, transparent 0 13px, rgba(255, 255, 255, 0.05) 14px 15px),
    repeating-linear-gradient(60deg, transparent 0 21px, rgba(136, 64, 255, 0.1) 22px 23px);
  background-size: 22px 22px, 100% 100%, 100% 100%;
  opacity: 0.62;
  mask-image: linear-gradient(180deg, #000, transparent 88%);
}

.community-card::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  background:
    radial-gradient(ellipse at 18% 22%, rgba(136, 64, 255, 0.62), transparent 28%),
    radial-gradient(ellipse at 82% 28%, rgba(54, 242, 196, 0.32), transparent 30%),
    radial-gradient(ellipse at 42% 82%, rgba(255, 77, 143, 0.24), transparent 28%),
    repeating-linear-gradient(135deg, transparent 0 16px, rgba(255, 255, 255, 0.055) 17px 18px),
    linear-gradient(115deg, rgba(136, 64, 255, 0.22), transparent 36%, rgba(54, 242, 196, 0.12) 74%, rgba(136, 64, 255, 0.18));
  background-size: 120% 120%, 120% 120%, 120% 120%, 48px 48px, 180% 180%;
  opacity: 0.72;
  mix-blend-mode: screen;
  animation: holoFlow 9s ease-in-out infinite;
}

.card-noise {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.16;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.2) 0 1px, transparent 1px),
    radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px);
  background-size: 19px 19px, 31px 31px, 43px 43px;
}

.card-header,
.card-id,
.pfp-frame,
.card-identity,
.card-badges,
.signature-slot,
.card-footer,
.ghost-avatar,
.ghost-title,
.ghost-badges,
.ghost-signature {
  position: relative;
  z-index: 2;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 22px 24px 12px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.18em;
}

.card-header img {
  width: 38px;
  height: 38px;
}

.card-id {
  align-self: flex-end;
  margin: 0 24px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.62);
  background: rgba(0, 0, 0, 0.26);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.pfp-frame {
  display: grid;
  place-items: center;
  width: min(58%, 240px);
  aspect-ratio: 1;
  margin: 20px auto 0;
  padding: 9px;
  border: 1px solid rgba(136, 64, 255, 0.52);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(136, 64, 255, 0.48), transparent),
    rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 44px rgba(136, 64, 255, 0.24);
}

.pfp-image {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px);
  background:
    linear-gradient(135deg, rgba(136, 64, 255, 0.9), rgba(12, 9, 18, 0.92)),
    #0d0815;
  background-position: center;
  background-size: cover;
}

.pfp-image span {
  color: white;
  font-size: clamp(58px, 7vw, 88px);
  font-weight: 950;
  text-shadow: 0 0 28px rgba(255, 255, 255, 0.32);
}

.card-identity {
  padding: 22px 26px 0;
}

.identity-label {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-2);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.16em;
}

.card-identity strong {
  display: block;
  min-height: 58px;
  font-size: clamp(30px, 5vw, 45px);
  line-height: 1.18;
  white-space: nowrap;
  overflow-x: hidden;
  overflow-y: visible;
  padding-bottom: 8px;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 26px 0;
}

.card-badges span,
.ghost-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(136, 64, 255, 0.48);
  border-radius: 999px;
  background: rgba(136, 64, 255, 0.16);
  color: rgba(255, 255, 255, 0.86);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.signature-slot {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 92px;
  margin: auto 26px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.26);
}

.signature-slot span {
  color: rgba(255, 255, 255, 0.44);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.signature-slot img {
  display: block;
  width: 100%;
  height: 72px;
  object-fit: contain;
  object-position: left bottom;
  opacity: 0;
}

.signature-slot img.has-signature {
  opacity: 1;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0 26px 24px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.ghost-card {
  width: min(72vw, 410px);
  animation: floatCard 5.4s ease-in-out infinite;
}

.ghost-avatar {
  width: 54%;
  aspect-ratio: 1;
  margin: 36px auto 0;
  border: 1px solid rgba(136, 64, 255, 0.52);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(136, 64, 255, 0.88), rgba(54, 242, 196, 0.08)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0 2px, transparent 2px 14px);
}

.ghost-title {
  width: 70%;
  height: 54px;
  margin: 28px auto 0;
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), rgba(136, 64, 255, 0.44), rgba(255, 255, 255, 0.08));
}

.ghost-badges {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 22px auto 0;
}

.ghost-badges span {
  width: 78px;
}

.ghost-signature {
  width: 68%;
  height: 48px;
  margin: auto auto 34px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.appbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(22px);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
}

.appbar-title {
  display: grid;
  gap: 2px;
  font-weight: 950;
}

.appbar-title span {
  font-size: 15px;
}

.appbar-title small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.studio-shell,
.final-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 54px);
  min-height: calc(100vh - 84px);
  padding: clamp(18px, 3.6vw, 46px);
}

.editor-panel,
.mint-panel {
  align-self: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.editor-panel {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.panel-section {
  display: grid;
  gap: 10px;
}

.field-label {
  color: rgba(255, 255, 255, 0.66);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.text-input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 17px;
  font-weight: 750;
}

.text-input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(136, 64, 255, 0.18);
}

.upload-drop {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 86px;
  padding: 12px;
  cursor: pointer;
}

.upload-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-drop.is-dragging {
  border-color: var(--accent);
  background: rgba(136, 64, 255, 0.18);
}

.upload-preview {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(136, 64, 255, 0.5), rgba(54, 242, 196, 0.08)),
    rgba(0, 0, 0, 0.34);
  background-size: cover;
  background-position: center;
}

.upload-copy {
  display: grid;
  gap: 4px;
}

.upload-copy strong {
  font-size: 15px;
}

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

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

.badge-toggle {
  min-height: 42px;
  padding: 0 10px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.badge-toggle.is-selected {
  border-color: rgba(136, 64, 255, 0.82);
  background: rgba(136, 64, 255, 0.25);
  box-shadow: inset 0 0 24px rgba(136, 64, 255, 0.2);
  color: white;
}

.badge-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.section-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ghost-button {
  min-height: 40px;
  padding: 0 14px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 850;
}

.ghost-button.compact {
  min-height: 32px;
  padding: 0 10px;
}

.signature-pad-wrap {
  height: 150px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    rgba(255, 255, 255, 0.04);
  background-size: 24px 24px;
}

#signaturePad {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.preview-stage {
  min-height: 640px;
}

.preview-orbit {
  position: absolute;
  width: min(68vw, 740px);
  aspect-ratio: 1;
  border: 1px solid rgba(136, 64, 255, 0.24);
  border-radius: 50%;
  transform: rotateX(64deg);
  animation: orbitSpin 18s linear infinite;
}

.preview-orbit::before,
.preview-orbit::after {
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(54, 242, 196, 0.12);
  border-radius: inherit;
  content: "";
}

.preview-orbit::after {
  inset: 27%;
  border-color: rgba(255, 255, 255, 0.1);
}

.live-card,
.final-card {
  width: min(78vw, 470px);
}

.final-view {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.76)),
    url("media/Back.svg") center / cover fixed;
}

.gallery-view {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.78)),
    url("media/Back.svg") center / cover fixed;
}

.gallery-refresh {
  margin-left: auto;
  min-height: 44px;
}

.gallery-shell {
  position: relative;
  z-index: 2;
  width: min(1400px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 54px);
}

.gallery-head {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}

.gallery-head h2 {
  max-width: 720px;
}

.gallery-status {
  max-width: 720px;
  min-height: 52px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.28);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.gallery-status.is-good {
  border-color: rgba(54, 242, 196, 0.35);
  color: rgba(210, 255, 243, 0.9);
}

.gallery-status.is-bad {
  border-color: rgba(255, 77, 143, 0.45);
  color: rgba(255, 214, 229, 0.9);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  align-items: start;
}

.minted-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(8, 7, 12, 0.76);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
}

.minted-card img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 7;
  object-fit: cover;
  border: 1px solid rgba(136, 64, 255, 0.36);
  border-radius: calc(var(--radius) - 2px);
  background: rgba(136, 64, 255, 0.12);
}

.minted-card strong,
.minted-card span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.minted-card strong {
  color: white;
  font-size: 15px;
}

.minted-card span {
  color: var(--muted);
  font-size: 12px;
}

.final-shell {
  grid-template-columns: minmax(310px, 0.78fr) minmax(320px, 470px);
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
}

.final-card-stage {
  min-height: 620px;
}

.mint-panel {
  display: grid;
  gap: 22px;
  padding: clamp(20px, 3vw, 30px);
}

.mint-panel h2 {
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1.16;
  white-space: nowrap;
  overflow-x: hidden;
  overflow-y: visible;
  padding-bottom: 8px;
}

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

.mint-grid div {
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.052);
}

.mint-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.mint-grid strong {
  display: block;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.mint-actions {
  display: grid;
  gap: 10px;
}

.wallet-panel {
  display: grid;
  gap: 10px;
}

.wallet-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.wallet-select {
  min-width: 0;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 850;
}

.wallet-select:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(136, 64, 255, 0.18);
}

.wallet-action {
  min-width: 118px;
}

.wallet-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.22);
  color: var(--muted);
  font-size: 13px;
}

.wallet-state span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.secondary-action {
  min-height: 52px;
  padding: 0 16px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mint-status {
  min-height: 58px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.25);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.mint-status.is-good {
  border-color: rgba(54, 242, 196, 0.4);
  color: rgba(210, 255, 243, 0.88);
}

.mint-status.is-bad {
  border-color: rgba(255, 77, 143, 0.48);
  color: rgba(255, 214, 229, 0.9);
}

.loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.94)),
    url("media/Back.svg") center / cover;
  backdrop-filter: blur(16px);
}

.loader-overlay.is-active {
  display: grid;
}

.loader-core {
  position: relative;
  display: grid;
  place-items: center;
  width: min(82vw, 320px);
  aspect-ratio: 1;
  border: 1px solid rgba(136, 64, 255, 0.42);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.38);
  box-shadow: 0 0 90px rgba(136, 64, 255, 0.26);
}

.loader-core img {
  width: 80px;
  height: 80px;
  animation: pulseLogo 1.4s ease-in-out infinite;
}

.loader-core span,
.loader-core strong {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
}

.loader-core span {
  bottom: 78px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.loader-core strong {
  bottom: 50px;
  color: white;
  font-size: 22px;
}

.loader-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, transparent, rgba(136, 64, 255, 0.92), rgba(54, 242, 196, 0.7), transparent 72%),
    transparent;
  animation: loaderSpin 1.2s linear infinite;
  mask: radial-gradient(circle, transparent 66%, #000 67%);
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatCard {
  0%,
  100% {
    transform: translateY(0) rotateX(9deg) rotateY(-12deg);
  }
  50% {
    transform: translateY(-18px) rotateX(5deg) rotateY(10deg);
  }
}

@keyframes holoFlow {
  0%,
  100% {
    background-position: 0% 20%, 100% 10%, 30% 100%, 0 0, 0% 50%;
    filter: hue-rotate(0deg);
  }
  50% {
    background-position: 100% 40%, 0% 70%, 80% 0%, 48px 48px, 100% 50%;
    filter: hue-rotate(22deg);
  }
}

@keyframes orbitSpin {
  to {
    transform: rotateX(64deg) rotateZ(1turn);
  }
}

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

@keyframes pulseLogo {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 10px rgba(136, 64, 255, 0.3));
  }
  50% {
    transform: scale(1.08);
    filter: drop-shadow(0 0 26px rgba(136, 64, 255, 0.78));
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .studio-shell,
  .final-shell {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    align-items: start;
    padding-top: 24px;
  }

  .hero-card-stage {
    min-height: 460px;
  }

  .editor-panel {
    order: 1;
  }

  .preview-stage {
    order: 2;
    min-height: 560px;
  }

  .final-shell {
    padding-bottom: 54px;
  }

  .final-card-stage {
    min-height: 560px;
  }
}

@media (max-width: 620px) {
  .topbar,
  .appbar {
    min-height: 72px;
    padding: 14px 16px;
  }

  .brand-full {
    width: 148px;
  }

  .hero-grid {
    min-height: calc(100vh - 72px);
    gap: 18px;
    padding: 18px 16px 48px;
  }

  h1 {
    font-size: clamp(46px, 15vw, 74px);
  }

  .hero-line {
    margin: 18px 0 24px;
  }

  .hero-secondary {
    width: 100%;
    margin: 10px 0 0;
  }

  .studio-shell,
  .final-shell {
    padding: 14px;
  }

  .badge-grid,
  .mint-grid,
  .wallet-row {
    grid-template-columns: 1fr;
  }

  .live-card,
  .final-card,
  .ghost-card {
    width: min(92vw, 390px);
  }

  .card-header {
    padding: 18px 18px 8px;
  }

  .card-id {
    margin: 0 18px;
  }

  .card-identity,
  .card-badges {
    padding-left: 20px;
    padding-right: 20px;
  }

  .signature-slot {
    margin-left: 20px;
    margin-right: 20px;
  }

  .card-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .cursor-light {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
