:root {
  color-scheme: dark;
  --black: #08090a;
  --ink: #0d0d10;
  --panel: #151418;
  --panel-raised: #1d1b20;
  --bone: #eee9df;
  --bone-soft: #c1b9b0;
  --muted: #7e7880;
  --line: rgba(238, 233, 223, 0.14);
  --acid: #c6ff2e;
  --cyan: #32e5df;
  --pink: #ff3d9f;
  --danger: #ff695f;
  --display: Impact, Haettenschweiler, "Arial Narrow Bold", "Arial Black", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--bone);
  background:
    radial-gradient(circle at 82% 12%, rgba(255, 61, 159, 0.11), transparent 23rem),
    radial-gradient(circle at 16% 75%, rgba(50, 229, 223, 0.06), transparent 25rem),
    linear-gradient(145deg, #121115 0%, #08090a 58%, #10120e 100%);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  mask-image: linear-gradient(to bottom, #000 20%, transparent 88%);
}

.page-grain {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.15;
  background-image:
    repeating-radial-gradient(circle at 17% 38%, transparent 0, rgba(255, 255, 255, 0.07) 0.55px, transparent 1px, transparent 4px),
    repeating-linear-gradient(93deg, transparent 0, transparent 7px, rgba(255, 255, 255, 0.018) 8px, transparent 9px);
  mix-blend-mode: soft-light;
}

[hidden] {
  display: none !important;
}

button,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.site-header,
.generator-shell,
.site-footer {
  width: min(100% - 40px, 1480px);
  margin-right: auto;
  margin-left: auto;
}

.site-header {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--bone);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 48px;
  height: 52px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(198, 255, 46, 0.38);
  background: #050607;
  clip-path: polygon(13% 0, 100% 0, 100% 83%, 83% 100%, 0 100%, 0 17%);
}

.brand-mark::after {
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  content: "";
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.35) contrast(1.08);
}

.brand-name {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: -0.035em;
  line-height: 1;
  text-transform: uppercase;
  transform: scaleX(0.92);
  transform-origin: left center;
}

.header-note {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.13em;
}

.wallet-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.wallet-summary {
  display: grid;
  gap: 3px;
  text-align: right;
}

.wallet-summary span,
.wallet-summary strong {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.09em;
  line-height: 1.25;
}

.wallet-summary span {
  color: var(--muted);
}

.wallet-summary strong {
  color: var(--acid);
  font-weight: 600;
}

.wallet-button {
  display: inline-flex;
  min-height: 38px;
  padding: 0 13px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(198, 255, 46, 0.3);
  color: var(--bone);
  background: rgba(198, 255, 46, 0.045);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}

.wallet-button:hover {
  border-color: var(--acid);
  color: var(--acid);
  background: rgba(198, 255, 46, 0.08);
}

.wallet-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.signal-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 12px rgba(198, 255, 46, 0.68);
  animation: pulse 2.1s ease-in-out infinite;
}

.generator-shell {
  display: grid;
  min-height: 750px;
  margin-top: 20px;
  grid-template-columns: minmax(360px, 0.78fr) minmax(520px, 1.22fr);
  gap: 18px;
}

.creator-card,
.artifact-card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  background: rgba(20, 19, 23, 0.92);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

.creator-card {
  display: flex;
  padding: clamp(28px, 4vw, 52px);
  flex-direction: column;
  overflow: hidden;
}

.creator-card::before {
  position: absolute;
  top: -130px;
  right: -130px;
  width: 340px;
  height: 340px;
  border-radius: 46% 54% 59% 41%;
  background: radial-gradient(circle at 43% 52%, rgba(255, 61, 159, 0.16), rgba(92, 34, 82, 0.05) 56%, transparent 70%);
  content: "";
  transform: rotate(20deg);
}

.creator-card::after {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 44px;
  height: 44px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--black);
  content: "";
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.creator-copy,
.access-gate,
.generator-form,
.status-row,
.guardrails {
  position: relative;
  z-index: 1;
}

.access-gate {
  display: grid;
  margin-top: 30px;
  padding: 19px;
  gap: 9px;
  border: 1px solid rgba(198, 255, 46, 0.3);
  background:
    linear-gradient(135deg, rgba(198, 255, 46, 0.085), transparent 54%),
    rgba(5, 7, 7, 0.72);
  box-shadow: inset 3px 0 0 rgba(198, 255, 46, 0.65);
}

.access-gate p {
  margin: 0;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.15em;
}

.access-gate h2 {
  margin: 0;
  color: var(--bone);
  font-size: clamp(24px, 2.4vw, 36px);
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.access-gate > span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.access-gate button {
  display: inline-flex;
  min-height: 43px;
  margin-top: 4px;
  padding: 0 13px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--acid);
  color: #0a0b08;
  background: var(--acid);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.access-gate button:hover {
  background: var(--bone);
}

.access-gate button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.access-gate a {
  width: fit-content;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.1em;
  text-decoration: none;
}

.access-gate a:hover {
  color: var(--bone);
}

.generator-form.is-locked {
  opacity: 0.24;
  filter: grayscale(0.35);
  pointer-events: none;
  user-select: none;
}

.eyebrow {
  display: flex;
  margin: 0 0 16px;
  align-items: center;
  gap: 9px;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.17em;
}

.eyebrow::before {
  width: 24px;
  height: 2px;
  background: var(--acid);
  box-shadow: 0 0 10px rgba(198, 255, 46, 0.43);
  content: "";
}

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

h1,
h2 {
  font-family: var(--display);
  text-transform: uppercase;
}

h1 {
  max-width: 540px;
  margin-bottom: 22px;
  font-size: clamp(67px, 6.2vw, 98px);
  letter-spacing: -0.062em;
  line-height: 0.75;
  text-shadow: 3px 3px 0 rgba(255, 61, 159, 0.2);
  transform: scaleX(0.92);
  transform-origin: left center;
}

h1 span {
  color: var(--acid);
}

.intro {
  max-width: 500px;
  margin-bottom: 0;
  color: var(--bone-soft);
  font-size: 13px;
  line-height: 1.65;
}

.generator-form {
  display: grid;
  margin-top: 38px;
  gap: 17px;
}

.prompt-field {
  display: grid;
  gap: 8px;
}

.prompt-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--bone);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.prompt-label small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 400;
}

.textarea-shell {
  position: relative;
  display: block;
}

textarea {
  display: block;
  width: 100%;
  min-height: 126px;
  padding: 17px 17px 34px;
  resize: vertical;
  border: 1px solid rgba(238, 233, 223, 0.18);
  border-radius: 0;
  color: var(--bone);
  background:
    linear-gradient(135deg, rgba(50, 229, 223, 0.035), transparent 46%),
    rgba(6, 7, 8, 0.74);
  font-size: 13px;
  line-height: 1.55;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

textarea::placeholder {
  color: #615c62;
}

textarea:hover {
  border-color: rgba(238, 233, 223, 0.3);
}

textarea:focus {
  border-color: rgba(50, 229, 223, 0.66);
  outline: none;
  background-color: rgba(5, 8, 9, 0.88);
  box-shadow: inset 3px 0 0 var(--cyan), 0 0 30px rgba(50, 229, 223, 0.04);
}

.character-count {
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.prompt-starters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.prompt-starters > span {
  margin-right: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.13em;
}

.prompt-starters button {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(238, 233, 223, 0.13);
  border-radius: 999px;
  color: var(--bone-soft);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  font-size: 8px;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.prompt-starters button:hover {
  border-color: rgba(255, 61, 159, 0.55);
  color: var(--bone);
  background: rgba(255, 61, 159, 0.07);
  transform: translateY(-1px);
}

.reference-control {
  position: relative;
  display: flex;
  min-width: 0;
  gap: 8px;
}

.reference-upload {
  display: grid;
  min-width: 0;
  min-height: 64px;
  flex: 1;
  padding: 9px 12px 9px 9px;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px dashed rgba(50, 229, 223, 0.32);
  background: linear-gradient(120deg, rgba(50, 229, 223, 0.05), transparent 58%), rgba(5, 8, 9, 0.48);
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.reference-upload:hover,
.reference-upload.is-dragging {
  border-color: var(--cyan);
  background-color: rgba(50, 229, 223, 0.045);
}

.reference-upload.has-reference {
  border-style: solid;
  border-color: rgba(198, 255, 46, 0.48);
  background: linear-gradient(120deg, rgba(198, 255, 46, 0.055), transparent 58%), rgba(5, 8, 9, 0.55);
}

.reference-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.reference-thumb {
  display: grid;
  width: 44px;
  height: 44px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(50, 229, 223, 0.32);
  color: var(--cyan);
  background: rgba(0, 0, 0, 0.3);
  font-family: var(--mono);
  font-size: 20px;
}

.reference-upload.has-reference .reference-thumb {
  border-color: rgba(198, 255, 46, 0.45);
}

.reference-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reference-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.reference-copy strong {
  color: var(--bone-soft);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.reference-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-action {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.reference-upload.has-reference .reference-action {
  color: var(--acid);
}

.remove-reference {
  width: 36px;
  flex: 0 0 auto;
  border: 1px solid rgba(238, 233, 223, 0.14);
  border-radius: 0;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  font-size: 18px;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.remove-reference:hover {
  border-color: var(--pink);
  color: var(--bone);
  background: rgba(255, 61, 159, 0.07);
}

.action-row {
  display: grid;
  margin-top: 5px;
  grid-template-columns: 1.38fr 0.82fr;
  gap: 9px;
}

.generate-button,
.surprise-button {
  display: flex;
  min-height: 56px;
  padding: 0 17px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 0;
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.11em;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background 150ms ease;
}

.generate-button {
  position: relative;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid var(--acid);
  color: var(--black);
  background: var(--acid);
  box-shadow: 6px 6px 0 rgba(198, 255, 46, 0.12);
}

.generate-button::after {
  position: absolute;
  top: 0;
  left: -28%;
  width: 23%;
  height: 100%;
  background: rgba(255, 255, 255, 0.32);
  content: "";
  transform: skewX(-22deg);
  transition: left 280ms ease;
}

.generate-button:hover::after {
  left: 112%;
}

.surprise-button {
  border: 1px solid rgba(238, 233, 223, 0.2);
  color: var(--bone);
  background: rgba(255, 255, 255, 0.025);
}

.generate-button:hover,
.surprise-button:hover {
  transform: translateY(-2px);
}

.surprise-button:hover {
  border-color: var(--pink);
  background: rgba(255, 61, 159, 0.07);
  box-shadow: 5px 5px 0 rgba(255, 61, 159, 0.1);
}

.generate-button:disabled,
.surprise-button:disabled,
.prompt-starters button:disabled {
  cursor: wait;
  opacity: 0.52;
  transform: none;
}

.button-icon {
  font-size: 18px;
}

.button-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.status-row {
  display: flex;
  min-height: 39px;
  margin-top: 14px;
  padding: 8px 10px;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(238, 233, 223, 0.07);
  background: rgba(0, 0, 0, 0.18);
}

.status-light {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 8px rgba(198, 255, 46, 0.55);
}

.status-row p {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.status-row a {
  margin-left: auto;
  flex: 0 0 auto;
  border-bottom: 1px solid rgba(50, 229, 223, 0.45);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-decoration: none;
}

.status-row a:hover {
  border-color: var(--bone);
  color: var(--bone);
}

.status-row.is-error .status-light {
  background: var(--danger);
  box-shadow: 0 0 8px rgba(255, 105, 95, 0.55);
}

.status-row.is-error p {
  color: var(--danger);
}

body.is-busy .status-light {
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(50, 229, 223, 0.7);
  animation: pulse 0.8s ease-in-out infinite;
}

.guardrails {
  display: flex;
  margin: auto 0 0;
  padding: 36px 0 0;
  flex-wrap: wrap;
  gap: 7px;
  list-style: none;
}

.guardrails li {
  padding: 5px 7px;
  border: 1px solid rgba(238, 233, 223, 0.1);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.09em;
}

.artifact-card {
  display: flex;
  min-height: 750px;
  padding: 22px;
  flex-direction: column;
  background:
    linear-gradient(140deg, rgba(255, 61, 159, 0.035), transparent 32%),
    rgba(9, 9, 11, 0.92);
}

.artifact-header {
  display: flex;
  min-height: 59px;
  padding: 0 2px 14px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.artifact-header p {
  margin-bottom: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.15em;
}

.artifact-header h2 {
  margin: 0;
  font-size: clamp(24px, 2vw, 34px);
  letter-spacing: -0.04em;
  line-height: 0.9;
}

.render-state {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.render-state > span:first-child {
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  transform: rotate(45deg);
}

.render-state.is-ready {
  color: var(--acid);
}

.render-state.is-ready > span:first-child {
  background: var(--acid);
  box-shadow: 0 0 9px rgba(198, 255, 46, 0.6);
}

.render-state.is-busy {
  color: var(--cyan);
}

.preview-frame {
  position: relative;
  display: grid;
  min-height: 0;
  flex: 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(238, 233, 223, 0.17);
  background:
    linear-gradient(45deg, transparent 49.7%, rgba(238, 233, 223, 0.035) 50%, transparent 50.3%),
    linear-gradient(-45deg, transparent 49.7%, rgba(238, 233, 223, 0.035) 50%, transparent 50.3%),
    radial-gradient(circle at center, #201d23 0%, #111014 57%, #08090a 100%);
  box-shadow: inset 0 0 0 9px rgba(0, 0, 0, 0.2), inset 0 0 100px rgba(0, 0, 0, 0.63);
}

.preview-frame::before,
.preview-frame::after {
  position: absolute;
  width: 46%;
  height: 2px;
  content: "";
  opacity: 0.3;
  pointer-events: none;
}

.preview-frame::before {
  top: 16%;
  left: -14%;
  background: linear-gradient(90deg, transparent, var(--pink), transparent);
  transform: rotate(35deg);
}

.preview-frame::after {
  right: -12%;
  bottom: 17%;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  transform: rotate(-37deg);
}

.empty-preview,
#resultImage,
#resultVideo {
  width: min(100%, 680px);
  max-height: calc(100vh - 244px);
  aspect-ratio: 1;
}

.empty-preview {
  position: relative;
  display: grid;
  place-items: center;
}

#resultImage,
#resultVideo {
  position: relative;
  z-index: 2;
  display: block;
  object-fit: contain;
  background: #060607;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5);
}

#resultVideo {
  object-fit: contain;
}

.signal-face {
  position: relative;
  width: min(42%, 255px);
  aspect-ratio: 0.84;
  opacity: 0.72;
  filter: drop-shadow(0 0 28px rgba(255, 61, 159, 0.12));
}

.face-form {
  position: absolute;
  inset: 5% 8% 0;
  border: 2px solid rgba(238, 233, 223, 0.15);
  border-radius: 45% 55% 48% 52% / 35% 39% 61% 65%;
  background:
    radial-gradient(circle at 31% 76%, rgba(255, 61, 159, 0.15) 0 3%, transparent 4%),
    radial-gradient(circle at 70% 23%, rgba(50, 229, 223, 0.09), transparent 32%),
    linear-gradient(140deg, #2b272d, #151418 72%);
  box-shadow: inset 16px 4px 28px rgba(0, 0, 0, 0.42), inset -5px -7px 14px rgba(255, 255, 255, 0.03);
  transform: rotate(2deg);
}

.face-form::before,
.face-form::after {
  position: absolute;
  border: 1px solid rgba(198, 255, 46, 0.17);
  background: #17151a;
  content: "";
}

.face-form::before {
  top: 13%;
  left: -11%;
  width: 26%;
  height: 55%;
  transform: rotate(-17deg);
}

.face-form::after {
  top: 12%;
  right: -9%;
  width: 24%;
  height: 58%;
  transform: rotate(14deg);
}

.visor-form {
  position: absolute;
  z-index: 2;
  top: 33%;
  left: -5%;
  width: 110%;
  height: 24%;
  overflow: hidden;
  border: 3px solid #0b0b0c;
  border-radius: 44% 56% 42% 58%;
  background:
    repeating-linear-gradient(0deg, transparent 0 4px, rgba(0, 0, 0, 0.4) 5px 6px),
    linear-gradient(90deg, var(--pink), #773de2 43%, var(--cyan));
  box-shadow: 0 0 0 1px rgba(238, 233, 223, 0.16), 0 0 28px rgba(50, 229, 223, 0.24), inset 0 0 20px rgba(255, 255, 255, 0.17);
  transform: rotate(-2deg);
}

.visor-form::before,
.visor-form::after {
  position: absolute;
  top: 0;
  width: 13%;
  height: 100%;
  background: rgba(255, 255, 255, 0.24);
  content: "";
  animation: visor-glitch 3.4s steps(1) infinite;
}

.visor-form::before {
  left: 24%;
}

.visor-form::after {
  right: 21%;
  width: 4%;
}

.visor-scan {
  position: absolute;
  z-index: 3;
  top: 34%;
  left: -8%;
  width: 116%;
  height: 2px;
  background: var(--bone);
  box-shadow: 0 0 12px var(--cyan);
  opacity: 0.7;
  animation: scan 3.2s ease-in-out infinite;
}

.empty-label {
  position: absolute;
  bottom: 7%;
  left: 50%;
  display: grid;
  gap: 5px;
  color: var(--bone-soft);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-align: center;
  transform: translateX(-50%);
}

.empty-label span {
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.frame-corner {
  position: absolute;
  z-index: 5;
  width: 28px;
  height: 28px;
  color: rgba(198, 255, 46, 0.62);
  pointer-events: none;
}

.corner-a {
  top: 8px;
  left: 8px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.corner-b {
  top: 8px;
  right: 8px;
  border-top: 2px solid;
  border-right: 2px solid;
}

.corner-c {
  right: 8px;
  bottom: 8px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

.corner-d {
  bottom: 8px;
  left: 8px;
  border-bottom: 2px solid;
  border-left: 2px solid;
}

.frame-data {
  position: absolute;
  z-index: 5;
  color: rgba(238, 233, 223, 0.34);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.12em;
  line-height: 1.5;
  pointer-events: none;
}

.frame-data-top {
  top: 21px;
  right: 21px;
  text-align: right;
}

.frame-data-bottom {
  bottom: 21px;
  left: 21px;
}

.generation-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-content: center;
  gap: 8px;
  background: rgba(7, 7, 9, 0.87);
  text-align: center;
  backdrop-filter: blur(8px);
}

.generation-overlay strong {
  color: var(--bone);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.19em;
}

.generation-overlay > span:last-child {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.07em;
}

.clay-loader {
  display: flex;
  height: 50px;
  margin-bottom: 8px;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
}

.clay-loader span {
  width: 13px;
  border-radius: 12px 12px 4px 4px;
  background: var(--acid);
  box-shadow: 0 0 15px rgba(198, 255, 46, 0.27);
  animation: melt 1.05s ease-in-out infinite alternate;
}

.clay-loader span:nth-child(1) {
  height: 27px;
}

.clay-loader span:nth-child(2) {
  height: 45px;
  background: var(--pink);
  animation-delay: -0.35s;
}

.clay-loader span:nth-child(3) {
  height: 33px;
  background: var(--cyan);
  animation-delay: -0.7s;
}

.artifact-footer {
  display: flex;
  min-height: 57px;
  padding: 14px 2px 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.artifact-footer > p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.result-actions a,
.result-actions button {
  display: inline-flex;
  min-height: 31px;
  padding: 0;
  align-items: center;
  gap: 7px;
  border: 0;
  border-bottom: 1px solid rgba(50, 229, 223, 0.32);
  color: var(--cyan);
  background: transparent;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-decoration: none;
}

#loopButton {
  border-color: rgba(255, 61, 159, 0.42);
  color: var(--pink);
}

#loopButton:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.result-actions button {
  border-color: rgba(238, 233, 223, 0.2);
  color: var(--bone-soft);
}

.result-actions a:hover,
.result-actions button:hover {
  border-color: var(--bone);
  color: var(--bone);
}

.site-footer {
  display: flex;
  min-height: 90px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.13em;
}

.site-footer p {
  margin: 0;
}

.site-footer p:first-child {
  color: var(--bone-soft);
}

.site-footer span {
  color: var(--pink);
}

@keyframes pulse {
  0%, 100% { opacity: 0.43; transform: scale(0.86); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes melt {
  from { transform: scaleY(0.58) translateY(7px); border-radius: 12px; }
  to { transform: scaleY(1) translateY(0); border-radius: 8px 8px 14px 14px; }
}

@keyframes visor-glitch {
  0%, 17%, 100% { transform: translateX(0); opacity: 0.22; }
  18% { transform: translateX(31px); opacity: 0.62; }
  20% { transform: translateX(-8px); opacity: 0.14; }
  57% { transform: translateX(0); opacity: 0.25; }
  58% { transform: translateX(-22px); opacity: 0.7; }
  60% { transform: translateX(5px); opacity: 0.2; }
}

@keyframes scan {
  0%, 100% { transform: translateY(0); opacity: 0; }
  15% { opacity: 0.7; }
  50% { transform: translateY(55px); opacity: 0.42; }
  85% { opacity: 0.7; }
}

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

@media (max-width: 1080px) {
  .generator-shell {
    grid-template-columns: minmax(330px, 0.85fr) minmax(460px, 1.15fr);
  }

  .creator-card {
    padding: 34px;
  }

  h1 {
    font-size: clamp(65px, 8vw, 86px);
  }

  .action-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .site-header,
  .generator-shell,
  .site-footer {
    width: min(100% - 24px, 690px);
  }

  .site-header {
    min-height: 79px;
  }

  .generator-shell {
    min-height: 0;
    margin-top: 12px;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .creator-card,
  .artifact-card {
    min-height: 0;
  }

  .guardrails {
    margin-top: 0;
  }

  .artifact-card {
    min-height: auto;
  }

  .preview-frame {
    aspect-ratio: 1;
  }

  .empty-preview,
  #resultImage,
  #resultVideo {
    width: 100%;
    max-height: none;
  }
}

@media (max-width: 540px) {
  .site-header,
  .generator-shell,
  .site-footer {
    width: min(100% - 16px, 500px);
  }

  .site-header {
    min-height: 72px;
    padding: 12px 0;
    flex-wrap: wrap;
  }

  .brand-mark {
    width: 42px;
    height: 46px;
  }

  .brand-name {
    font-size: 19px;
  }

  .wallet-controls {
    width: 100%;
    justify-content: space-between;
  }

  .wallet-summary {
    text-align: left;
  }

  .wallet-button {
    min-height: 34px;
    font-size: 7px;
  }

  .creator-card {
    padding: 26px 18px;
  }

  h1 {
    font-size: clamp(61px, 20vw, 80px);
  }

  .intro {
    font-size: 12px;
  }

  .generator-form {
    margin-top: 30px;
  }

  .prompt-starters > span {
    width: 100%;
  }

  .prompt-starters button {
    font-size: 7px;
  }

  .reference-upload {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .reference-thumb {
    width: 40px;
    height: 40px;
  }

  .reference-action {
    display: none;
  }

  .artifact-card {
    padding: 12px;
  }

  .artifact-header {
    min-height: 56px;
  }

  .render-state {
    max-width: 90px;
    justify-content: flex-end;
    text-align: right;
  }

  .signal-face {
    width: 49%;
  }

  .frame-data {
    display: none;
  }

  .artifact-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .site-footer {
    min-height: 82px;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
  }
}
