.shadow-launch-form,
.shadow-launch-review {
  display: grid;
  gap: 22px;
  padding: clamp(16px, 3vw, 36px);
  border: 1px solid var(--line);
  font: 11px/1.7 var(--pixel);
}

.shadow-launch-form fieldset:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
}

.shadow-launch-form legend { padding-inline: 6px; }
.shadow-launch-form .launch-radio-group {
  align-items: center;
  column-gap: clamp(12px, 4vw, 24px);
}

.launch-radio-group > label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  cursor: pointer;
  white-space: nowrap;
}

.launch-shell .launch-radio-group input[type="radio"] {
  appearance: none;
  box-sizing: border-box;
  flex: none;
  width: 8px;
  height: 8px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--muted);
  border-radius: 0;
  background: var(--ink);
  cursor: pointer;
}

.launch-shell .launch-radio-group input[type="radio"]:checked {
  border-color: var(--paper);
  background: var(--paper);
}

.launch-shell .launch-radio-group input[type="radio"]:focus-visible {
  outline: 1px solid var(--paper);
  outline-offset: 3px;
}

.shadow-launch-fields:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.shadow-launch-fields label:not([hidden]),
#launch-shadow-field:not([hidden]) {
  display: grid;
  gap: 8px;
}

.shadow-launch-fields :is(input, select),
#launch-shadow-field input {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
}

.shadow-launch-form > button { justify-self: start; }
.shadow-launch-form p { margin: 0; color: var(--muted); }
#launch-status:empty { display: none; }
.shadow-launch-review img { object-fit: contain; }
.shadow-launch-review dl { display: grid; gap: 12px; margin: 0; }
.shadow-launch-review dl > div { display: grid; gap: 4px; }
.shadow-launch-review dt { color: var(--muted); }
.shadow-launch-review dd { margin: 0; overflow-wrap: anywhere; }
#launch-migration-preview:not([hidden]) {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
}
#launch-migration-status { margin: 0; }
#launch-migration-action { white-space: normal; }
#launch-review { width: min(560px, calc(100vw - 24px)); }
.shadow-launch-review [hidden] { display: none; }

@media (max-width: 600px) {
  .shadow-launch-fields { grid-template-columns: 1fr; }
}

#launch-market { margin-top: clamp(40px, 6vw, 84px); scroll-margin-top: 110px; }
#launch-market h2 { margin: 0 0 20px; font: clamp(20px, 3vw, 32px)/1.25 var(--pixel); }
#launch-market-review { margin-top: 16px; }
#launch-market-review[hidden] { display: none; }
#launch-market-review dl { grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }
#launch-market-review p { margin: 0; color: var(--muted); }
#launch-market :is(p, [role="status"]):empty { display: none; }
.launch-market-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.shadow-launchpad .launch-intro h1 em {
  display: inline-block;
  padding-inline: .12em;
  background: var(--paper);
  color: var(--ink);
}

.shadow-launchpad .launch-intro > p { font-size: clamp(14px, 2vw, 22px); }

.launch-field {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.launch-file {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
}

.shadow-launch-fields .launch-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  clip-path: inset(50%);
}

.launch-file label.wallet-connect {
  display: inline-flex;
  flex: none;
  cursor: pointer;
  border-width: 0 1px 0 0;
}

.launch-file-input:focus-visible + label {
  outline: 2px solid var(--paper);
  outline-offset: -3px;
}

#launch-artwork-filename {
  min-width: 0;
  padding-inline-end: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.launch-select > .wallet-connect {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

.launch-select > .wallet-connect > span:first-of-type {
  min-width: 0;
  overflow-wrap: anywhere;
}

.launch-select > .wallet-connect > span:last-child {
  margin-inline-start: auto;
}

.launch-select .collection-sort-menu {
  inset-inline: 0;
  min-width: 0;
  max-height: min(320px, 40dvh);
  overflow: auto;
  overscroll-behavior: contain;
}

.launch-select .collection-sort-menu button {
  white-space: normal;
  overflow-wrap: anywhere;
}

.launch-select .collection-sort-menu button:focus-visible {
  outline-offset: -3px;
}

.launch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.launch-actions .hero-primary { background: var(--paper); color: var(--ink); }
.launch-actions .hero-primary:hover { background: var(--ink); color: var(--paper); }

.launch-shell.shadow-launchpad { padding-bottom: 0; }

/* Keep the feed heading in place when the token grid loads below it. */
body[data-page="launchpad"]:has(#live-feed:target) { overflow-anchor: none; }

.launch-token-gallery {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  margin-inline: calc(50% - 50vw);
  padding-top: clamp(40px, 7vw, 100px);
  padding-bottom: clamp(160px, 18vw, 280px);
}

#launch-realm-pause[hidden] { display: none; }

.launch-token-content {
  position: relative;
  max-width: 1600px;
  margin-inline: auto;
  padding-inline: clamp(18px, 5vw, 80px);
}

.launch-token-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  scroll-margin-top: 86px;
}

@media (max-width: 820px) {
  .launch-token-header { scroll-margin-top: 72px; }
}

@media (1000px <= width <= 1279px) {
  .launch-token-header { scroll-margin-top: 112px; }
}

.launch-token-header h2 {
  margin: 0;
  font: clamp(21px, 3vw, 36px)/1.4 var(--pixel);
}

.launch-token-heading { padding: 12px 16px; background: var(--ink); }

.launch-token-header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.launch-token-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.launch-token-controls .launch-select { min-width: 155px; }

.launch-token-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  scroll-margin-top: 105px;
}

.launch-token-pages { gap: clamp(8px, 2vw, 22px); margin-bottom: 0; }
.launch-token-pages span { padding: 4px 8px; background: var(--ink); }
.launch-token-pages button:disabled { opacity: 1; color: var(--muted); }
.launch-token-pages button:disabled .button-pixel { background: currentColor; }

.launch-token-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--ink);
}

.launch-token-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--ink);
  cursor: pointer;
}

.launch-token-thumb:hover, .launch-token-thumb:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: -2px;
}

.launch-token-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  image-rendering: pixelated;
}

.launch-token-thumb-ticker {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 12px;
  background: #000;
  color: #fff;
  font: clamp(16px, 2.5vw, 28px)/1.2 var(--pixel);
  text-align: center;
  overflow-wrap: anywhere;
}

.launch-token-details { padding: 12px; }
.launch-token-details h3 { margin: 0; font: 14px/1.5 var(--pixel); overflow-wrap: anywhere; }
.launch-token-heading-row { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.launch-token-heading-row .launch-token-status { flex-shrink: 0; }
.launch-token-live-badge {
  display: inline-block;
  width: 15.2px;
  height: 15.2px;
  vertical-align: middle;
  background: currentColor;
  mask: url('/assets/verified-badge-fill.svg') center / contain no-repeat;
}
.launch-token-symbol { color: var(--muted); font-size: 10px; }
.launch-token-status { border: 1px solid var(--line); padding: 2px 4px; font-size: 9px; }
.launch-token-demo-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--ink);
  pointer-events: none;
}
.launch-token-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: auto;
  padding: 0 12px 12px;
}
.launch-token-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 9px/1.4 var(--pixel);
}
button.launch-token-copy:is(:hover, :focus-visible) { color: var(--paper); }
.launch-token-copy i { position: relative; width: 10px; height: 10px; }
.launch-token-copy i::before, .launch-token-copy i::after {
  content: '';
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
}
.launch-token-copy i::before { top: 0; left: 0; }
.launch-token-copy i::after { bottom: 0; right: 0; background: var(--ink); }
@media (max-width: 440px), (1100px < width < 1280px) {
  .launch-token-footer { gap: 4px; padding-inline: 8px; }
  .launch-token-footer :is(.launch-token-status, .launch-token-copy) { font-size: 8px; }
  .launch-token-copy { gap: 3px; }
}
.launch-token-details dl { margin: 12px 0 0; font-size: 10px; }
.launch-token-details dl div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0 8px; }
.launch-token-details dt { color: var(--muted); }
.launch-token-details dd { margin: 0; }

@media (max-width: 1100px) {
  .launch-token-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .launch-token-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

#launch-create { width: min(640px, calc(100% - 32px)); }
#launch-create > .dialog-head { gap: 12px; }
.launch-create-actions { display: flex; align-items: center; gap: 8px; }
#launch-connect[hidden] { display: none; }
#launch-token-swap { width: min(490px, calc(100% - 32px)); }
#launch-token-swap-note { color: var(--muted); }
#launch-token-swap .shadow-launch-form,
#launch-create .shadow-launch-form,
#launch-review .shadow-launch-review { border: 0; }
.launch-price-field {
  display: flex;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
}

.launch-price-field input {
  flex: 1;
  border: 0;
}

.launch-price-unit {
  flex: none;
  padding-inline: 12px;
}

#launch-graduation-help, #launch-first-swap-help { color: var(--muted); }

#launch-create .launch-select .collection-sort-menu {
  position: relative;
  top: auto;
}

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

.launch-pair-types .wallet-connect[aria-pressed="true"] {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

#launch-draft > button[hidden] { display: none; }
.shadow-launch-fields > label:has(.launch-price-field) { align-content: start; }


#launch-shadow-picker > summary {
  display: flex;
  width: fit-content;
  cursor: pointer;
  list-style: none;
}
#launch-shadow-picker > summary::-webkit-details-marker { display: none; }
#launch-shadow-thumb { image-rendering: pixelated; }

.launch-shadow-menu {
  display: grid;
  gap: 12px;
  max-height: min(360px, 42dvh);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
}

#launch-shadow-status:empty { display: none; }
.launch-shadow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 8px;
}
.launch-shadow-grid .collection-card[aria-pressed="true"] { border-color: var(--paper); }

.launch-shadow-pages:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#launch-shadow-retry { justify-self: start; }

#launch-first-swap:not([hidden]) { grid-template-columns: minmax(0, 1fr); }
#launch-first-swap-approve:not([hidden]) { justify-self: start; }

#launch-live-swap:not([hidden]) { min-width: 0; }
#launch-token-swap [hidden], #swap-curve[hidden], #swap-migrate[hidden] { display: none; }
#launch-live-swap #launch-market { margin: 0; }
#launch-live-swap :is(.shadow-launch-form, .shadow-launch-review) { border: 0; }
#launch-live-swap #swap-curve:not([hidden]) { border-bottom: 1px solid var(--line); }
#swap-curve-status:empty, #launch-market-status:empty { display: none; }
.curve-progress { display: grid; gap: 6px; min-width: 0; }
.launch-token-details .curve-progress { margin-top: 12px; font-size: 9px; }
.curve-reserves { color: var(--muted); overflow-wrap: anywhere; }
.curve-progress progress {
  --prism-fill: repeating-linear-gradient(to right, #ff0000 0% 6.25%, #ff8000 6.25% 12.5%,
    #ffff00 12.5% 18.75%, #00ff00 18.75% 25%, #00ffff 25% 31.25%, #0000ff 31.25% 37.5%,
    #8000ff 37.5% 43.75%, #ff00ff 43.75% 50%);
  appearance: none;
  width: 100%;
  height: 8px;
  border: 1px solid var(--line);
  border-radius: 0;
  accent-color: var(--paper);
  background: var(--ink);
}
.curve-progress progress::-webkit-progress-bar { background: var(--ink); }
.curve-progress progress::-webkit-progress-value {
  background: var(--prism-fill) 0 0 / 200% 100%;
  animation: prism-progress 1.2s steps(16) infinite;
}
.curve-progress progress::-moz-progress-bar {
  background: var(--prism-fill) 0 0 / 200% 100%;
  animation: prism-progress 1.2s steps(16) infinite;
}
@keyframes prism-progress {
  from { background-position-x: 100%; }
  to { background-position-x: 0%; }
}
@media (prefers-reduced-motion: reduce) {
  .curve-progress progress::-webkit-progress-value { animation: none; }
  .curve-progress progress::-moz-progress-bar { animation: none; }
}
