:root {
  --bg: #0b0d0c;
  --panel: #151917;
  --panel-2: #1d231f;
  --paper: #f4f6ef;
  --dim: #939d97;
  --line: #303a34;
  --mint: #7cf7c7;
  --coral: #ff6d5f;
  --blue: #668cff;
  --black: #070908;
  --on-dark: #f4f6ef;
  --topbar-bg: rgba(11, 13, 12, .82);
  --topbar-line: rgba(124, 247, 199, .14);
  --grid-line: rgba(124, 247, 199, .045);
  --grid-cell-rgb: 124, 247, 199;
  --grid-node-rgb: 255, 109, 95;
  --party-surface: #f4f6ef;
  --party-ink: #070908;
  --input-bg: #070908;
  --input-ink: #f4f6ef;
  --button-hover-bg: #f4f6ef;
  --button-hover-ink: #070908;
  --display: 'Archivo Black', Impact, sans-serif;
  --body: 'Space Grotesk', sans-serif;
  --mono: 'Pixelify Sans', monospace;
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f2f7f4;
  --panel: #ffffff;
  --panel-2: #e8efeb;
  --paper: #101410;
  --dim: #5d6962;
  --line: #a9bbb0;
  --mint: #16b97f;
  --coral: #e95045;
  --blue: #365fe2;
  --topbar-bg: rgba(242, 247, 244, .86);
  --topbar-line: rgba(16, 20, 16, .16);
  --grid-line: rgba(16, 40, 28, .08);
  --grid-cell-rgb: 22, 185, 127;
  --grid-node-rgb: 233, 80, 69;
  --party-surface: #ffffff;
  --party-ink: #070908;
  --input-bg: #ffffff;
  --input-ink: #101410;
  --button-hover-bg: #101410;
  --button-hover-ink: #f4f6ef;
}

:root[data-palette='webgl'] {
  --mint: #c8ff3d;
  --coral: #34d7ff;
  --blue: #ff3d9d;
  --grid-cell-rgb: 200, 255, 61;
  --grid-node-rgb: 255, 61, 157;
}

:root[data-palette='anime'] {
  --mint: #57e8ff;
  --coral: #ff5b93;
  --blue: #ffd63d;
  --grid-cell-rgb: 87, 232, 255;
  --grid-node-rgb: 255, 91, 147;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--paper);
  font-family: var(--body);
  letter-spacing: 0;
}
body.modal-open { overflow: hidden; }
button, input { font: inherit; }
button, a { color: inherit; }
a { text-decoration: none; }
[hidden] { display: none !important; }
::selection { background: var(--mint); color: var(--black); }

.shell { width: min(1160px, calc(100% - 48px)); margin: 0 auto; }

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

.topbar, main, footer { position: relative; z-index: 1; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--topbar-line);
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
}
.topbar-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  color: var(--paper);
  font: 400 25px/1 var(--display);
}
.brand span { color: var(--mint); }
.header-tools { display: flex; align-items: center; gap: 14px; }
.colorways {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}
.colorways button {
  width: 30px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
}
.colorways button:hover, .colorways button:focus-visible {
  outline: 1.5px solid var(--paper);
  outline-offset: -2px;
}
.colorways button i {
  width: 5px;
  height: 16px;
  display: block;
  border-radius: 1px;
  transform: skewY(-12deg);
}
.colorways [data-palette='arcade'] i:nth-child(1) { background: #7cf7c7; }
.colorways [data-palette='arcade'] i:nth-child(2) { background: #ff6d5f; }
.colorways [data-palette='arcade'] i:nth-child(3) { background: #668cff; }
.colorways [data-palette='webgl'] i:nth-child(1) { background: #c8ff3d; }
.colorways [data-palette='webgl'] i:nth-child(2) { background: #34d7ff; }
.colorways [data-palette='webgl'] i:nth-child(3) { background: #ff3d9d; }
.colorways [data-palette='anime'] i:nth-child(1) { background: #57e8ff; }
.colorways [data-palette='anime'] i:nth-child(2) { background: #ff5b93; }
.colorways [data-palette='anime'] i:nth-child(3) { background: #ffd63d; }
:root[data-palette='arcade'] .colorways [data-palette='arcade'],
:root[data-palette='webgl'] .colorways [data-palette='webgl'],
:root[data-palette='anime'] .colorways [data-palette='anime'] {
  background: color-mix(in srgb, var(--paper) 14%, transparent);
  box-shadow: inset 0 0 0 1px var(--paper);
}
.server-state {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--dim);
  font: 700 12px/1 var(--mono);
}
.theme-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--mint);
  cursor: pointer;
  font-size: 21px;
  line-height: 1;
  box-shadow: 3px 3px 0 var(--blue);
  transition: transform .12s ease, background .12s ease, color .12s ease;
}
.theme-toggle:hover, .theme-toggle:focus-visible {
  outline: 0;
  transform: translate(-2px, -2px);
  background: var(--mint);
  color: var(--black);
}
.account-button {
  min-width: 84px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  overflow: hidden;
  border: 1.5px solid var(--line);
  border-radius: 5px;
  padding: 0 11px;
  background: var(--panel);
  color: var(--paper);
  cursor: pointer;
  font: 700 10px/1 var(--mono);
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.account-button:hover, .account-button:focus-visible {
  outline: 0;
  border-color: var(--mint);
  background: var(--panel-2);
  transform: translateY(-2px);
}
.account-button img {
  width: 23px;
  height: 23px;
  border: 1px solid var(--mint);
  border-radius: 50%;
  object-fit: cover;
}
.server-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #536057;
}
.server-state.online { color: var(--paper); }
.server-state.online .server-dot {
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(124, 247, 199, .5);
  animation: signal 1.8s ease-out infinite;
}
.server-state.offline .server-dot { background: var(--coral); }
@keyframes signal {
  70%, 100% { box-shadow: 0 0 0 8px rgba(124, 247, 199, 0); }
}

.hero {
  min-height: min(700px, calc(100svh - 96px));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 0 42px;
  text-align: center;
}
.eyebrow {
  margin: 0 0 18px;
  color: var(--mint);
  font: 700 13px/1 var(--mono);
}
.hero h1 {
  margin: 0;
  color: var(--paper);
  font: 400 168px/.78 var(--display);
  text-transform: uppercase;
  text-shadow: 0 8px 0 var(--black), 0 13px 0 rgba(102, 140, 255, .24);
  transform: rotate(-1deg);
}
.hero h1 > span:last-child {
  color: var(--mint);
  font-size: 54px;
  vertical-align: top;
  text-shadow: 0 5px 0 var(--black);
}
.splash {
  display: inline-block;
  color: var(--coral);
  animation: boing 2.8s cubic-bezier(.2, .8, .2, 1) infinite;
}
@keyframes boing {
  0%, 72%, 100% { transform: translateY(0) rotate(0); }
  80% { transform: translateY(-15px) rotate(5deg); }
  88% { transform: translateY(5px) rotate(-3deg); }
  94% { transform: translateY(-2px); }
}

.pipeline {
  width: min(900px, 100%);
  display: grid;
  grid-template-columns: 220px minmax(35px, 1fr) 106px minmax(35px, 1fr) 280px;
  align-items: center;
  gap: 14px;
  margin: 48px auto 38px;
}
.dist-folder, .live-output {
  position: relative;
  min-width: 0;
  min-height: 136px;
  border: 2px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  text-align: left;
}
.dist-folder {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 33px 17px 14px;
  box-shadow: 5px 6px 0 var(--black);
  border-radius: 4px 8px 3px 7px;
  transform: rotate(-1.6deg);
}
.folder-tab {
  position: absolute;
  top: -2px;
  left: -2px;
  min-width: 82px;
  border: 2px solid var(--black);
  border-radius: 5px 5px 5px 0;
  padding: 7px 10px 6px;
  background: var(--coral);
  color: var(--black);
  font: 400 12px/1 var(--display);
}
.dist-folder code {
  overflow: hidden;
  color: var(--dim);
  font: 700 10px/1 var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.folder-purpose {
  margin-bottom: 2px;
  color: var(--paper);
  font: 400 10px/1.15 var(--display);
}
.dist-folder code:first-of-type { color: var(--paper); }
.drop-box {
  position: relative;
  width: 106px;
  height: 106px;
  display: grid;
  align-content: center;
  justify-items: center;
  border: 2px solid var(--black);
  border-radius: 7px;
  background: var(--blue);
  color: var(--on-dark);
  box-shadow: 6px 6px 0 var(--coral);
  transform: rotate(2deg);
}
.drop-box::before {
  content: '';
  position: absolute;
  inset: -13px;
  border: 2px dashed var(--mint);
  border-radius: 10px 5px 9px 6px;
  pointer-events: none;
  animation: drop-outline 1.3s steps(2, end) infinite;
}
.drop-box small { font: 400 15px/1 var(--display); }
.drop-box strong { color: var(--mint); font: 400 34px/1 var(--display); }
.live-output {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 16px 18px;
  border-color: var(--mint);
  border-radius: 8px 3px 7px 4px;
  box-shadow: 5px 6px 0 var(--blue);
  transform: rotate(1.2deg);
}
.live-output span {
  width: fit-content;
  border: 1.5px solid var(--black);
  border-radius: 4px;
  padding: 5px 7px;
  background: var(--mint);
  color: var(--black);
  font: 700 9px/1 var(--mono);
  box-shadow: 0 0 16px color-mix(in srgb, var(--mint) 70%, transparent);
  animation: live-glow 1.8s ease-in-out infinite;
}
.live-output strong {
  overflow-wrap: anywhere;
  color: var(--paper);
  font: 400 18px/1.05 var(--display);
  text-shadow: 0 0 18px color-mix(in srgb, var(--blue) 48%, transparent);
}
.benefit-flip {
  position: relative;
  height: 11px;
  overflow: hidden;
}
.benefit-flip small {
  position: absolute;
  inset: 0;
  color: var(--coral);
  font: 700 9px/1 var(--mono);
  opacity: 0;
  text-shadow: 0 0 10px color-mix(in srgb, var(--coral) 72%, transparent);
  animation: benefit-flip 6s cubic-bezier(.2, .8, .2, 1) infinite;
}
.benefit-flip small:nth-child(2) { animation-delay: 2s; }
.benefit-flip small:nth-child(3) { animation-delay: 4s; }
.flow-line {
  height: 22px;
  background: var(--coral);
  clip-path: polygon(0 37%, 70% 37%, 70% 0, 100% 50%, 70% 100%, 70% 63%, 0 63%);
  animation: arrow-nudge 1.1s ease-in-out infinite;
}
.flow-line:nth-child(4) { background: var(--mint); animation-delay: .18s; }

.drop-well {
  width: min(430px, 100%);
  min-height: 105px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 2px dashed var(--mint);
  border-radius: 7px 3px 8px 4px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  color: var(--paper);
  box-shadow: 7px 7px 0 var(--blue), inset 0 0 28px color-mix(in srgb, var(--mint) 5%, transparent);
  cursor: pointer;
  padding: 20px 28px;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.drop-well:hover, .drop-well:focus-visible {
  outline: 0;
  transform: translate(-3px, -3px);
  border-color: var(--coral);
  box-shadow: 10px 10px 0 var(--coral), inset 0 0 34px color-mix(in srgb, var(--mint) 11%, transparent);
  background: var(--panel-2);
}
.drop-well > span:last-child {
  display: grid;
  gap: 8px;
  text-align: left;
}
.drop-well strong { color: var(--paper); font: 400 18px/1 var(--display); }
.drop-well small { color: var(--mint); font: 700 11px/1 var(--mono); }
.drop-well .choose-icon {
  width: 45px;
  height: 45px;
  border-color: var(--coral);
  color: var(--coral);
  font-size: 25px;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--coral) 40%, transparent);
  animation: upload-arrow 1.15s ease-in-out infinite;
}
.choose-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
}
@keyframes arrow-nudge { 50% { transform: translateX(5px); filter: brightness(1.25); } }
@keyframes drop-outline { 50% { border-color: var(--coral); transform: rotate(-1deg); } }
@keyframes live-glow { 50% { box-shadow: 0 0 24px color-mix(in srgb, var(--mint) 92%, transparent); filter: brightness(1.12); } }
@keyframes upload-arrow {
  50% { transform: translateY(-7px); box-shadow: 0 8px 0 -4px color-mix(in srgb, var(--coral) 54%, transparent); }
}
@keyframes benefit-flip {
  0% { opacity: 0; transform: translateY(110%); }
  8%, 27% { opacity: 1; transform: translateY(0); }
  35%, 100% { opacity: 0; transform: translateY(-110%); }
}
.library { padding: 48px 0 96px; }
.library-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.library-head h2 {
  margin: 0;
  color: var(--paper);
  font: 400 38px/1 var(--display);
}
.library-head p {
  margin: 0;
  color: var(--mint);
  font: 700 13px/1 var(--mono);
}
.site-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
}
.site-card {
  min-width: 0;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 7px 8px 0 var(--black);
  transform: rotate(var(--tilt, 0deg));
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.site-card:hover, .site-card:focus-within {
  border-color: var(--mint);
  box-shadow: 9px 11px 0 var(--blue), 0 20px 50px rgba(0, 0, 0, .35);
  transform: translateY(-5px) rotate(0deg);
}
.site-preview {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 2px solid var(--line);
  background: var(--black);
}
.site-preview canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}
.site-preview iframe {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 400%;
  height: 400%;
  border: 0;
  background: #fff;
  opacity: 0;
  filter: blur(12px) saturate(1.45) brightness(.55);
  transform: scale(.25);
  transform-origin: 0 0;
  pointer-events: none;
  transition: opacity .28s ease, filter .24s ease;
}
.site-card.preview-ready iframe { opacity: .72; }
.site-card:hover iframe, .site-card:focus-within iframe {
  opacity: 1;
  filter: none;
}
.preview-hit {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
}
.preview-label {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  pointer-events: none;
  background: rgba(7, 9, 8, .18);
  transition: opacity .2s ease, transform .2s ease, backdrop-filter .2s ease;
}
.site-card:hover .preview-label, .site-card:focus-within .preview-label {
  opacity: 0;
  transform: translateY(14px);
  backdrop-filter: blur(0);
}
.preview-label span {
  width: fit-content;
  color: var(--black);
  background: var(--mint);
  padding: 6px 8px;
  font: 700 10px/1 var(--mono);
}
.preview-label strong {
  max-width: 90%;
  overflow-wrap: anywhere;
  color: var(--on-dark);
  font: 400 34px/.95 var(--display);
  text-shadow: 3px 3px 0 var(--black);
}
.site-info {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 16px;
}
.site-copy { min-width: 0; }
.site-copy strong {
  display: block;
  overflow: hidden;
  color: var(--paper);
  font: 400 17px/1 var(--display);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-copy span {
  display: block;
  margin-top: 7px;
  color: var(--dim);
  font: 700 11px/1 var(--mono);
}
.site-actions { display: flex; flex: 0 0 auto; gap: 7px; }
.site-actions a, .site-actions button {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line);
  border-radius: 5px;
  background: var(--panel-2);
  color: var(--paper);
  cursor: pointer;
  font: 700 18px/1 var(--mono);
  transition: transform .12s ease, background .12s ease, color .12s ease, border-color .12s ease;
}
.site-actions a:hover, .site-actions a:focus-visible,
.site-actions button:hover, .site-actions button:focus-visible {
  outline: 0;
  border-color: var(--black);
  background: var(--mint);
  color: var(--black);
  transform: translateY(-2px);
}
.site-actions .delete:hover, .site-actions .delete:focus-visible { background: var(--coral); }
.empty {
  grid-column: 1 / -1;
  min-height: 220px;
  display: grid;
  place-items: center;
  border: 2px dashed var(--line);
  color: var(--dim);
  font: 700 13px/1 var(--mono);
}
.empty-button { width: 100%; background: transparent; cursor: pointer; }
.empty-button:hover, .empty-button:focus-visible { outline: 0; border-color: var(--mint); color: var(--mint); }

footer {
  padding: 22px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font: 700 11px/1 var(--mono);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
footer nav { display: flex; gap: 16px; }
footer a { color: var(--paper); }
footer a:hover, footer a:focus-visible { color: var(--mint); outline: 0; }

.drag-curtain {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-content: center;
  border: 12px solid var(--mint);
  background: rgba(7, 9, 8, .92);
  text-align: center;
  backdrop-filter: blur(10px);
}
.drag-curtain.show { display: grid; }
.drag-curtain h2 {
  margin: 16px 0 4px;
  color: var(--mint);
  font: 400 64px/.9 var(--display);
}
.drag-curtain p { margin: 9px 0 0; color: var(--on-dark); font: 700 14px/1 var(--mono); }
.drop-signal {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  margin: auto;
  border: 3px solid var(--on-dark);
  border-radius: 50%;
  color: var(--coral);
  font: 400 76px/1 var(--display);
  animation: dropBounce .68s cubic-bezier(.5, 0, .5, 1.5) infinite alternate;
}
@keyframes dropBounce {
  from { transform: translateY(-16px) scaleY(1.04); }
  to { transform: translateY(14px) scaleY(.9) scaleX(1.08); }
}

.stage-layer, .party, .account-layer, .terms-layer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 9, 8, .88);
  backdrop-filter: blur(12px);
}
.account-layer, .terms-layer { z-index: 80; }
.account-card, .terms-card {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100svh - 40px);
  overflow-y: auto;
  border: 2px solid var(--coral);
  border-radius: 7px 3px 8px 4px;
  padding: 32px;
  background: var(--panel);
  box-shadow: 10px 10px 0 var(--blue);
  animation: modalIn .3s cubic-bezier(.2, 1.2, .4, 1) both;
}
.account-card h2, .terms-card h2 {
  max-width: calc(100% - 46px);
  margin: 0;
  color: var(--paper);
  font: 400 38px/.95 var(--display);
}
.account-note, .account-email, .terms-card > p {
  margin: 16px 0 22px;
  color: var(--dim);
  font: 700 11px/1.5 var(--mono);
}
.google-signin { min-height: 44px; display: flex; align-items: center; }
.auth-status {
  min-height: 14px;
  margin: 14px 0 0;
  color: var(--mint);
  font: 700 10px/1.4 var(--mono);
}
.account-legal {
  margin: 22px 0 0;
  color: var(--dim);
  font: 500 11px/1.5 var(--body);
}
.account-legal a, .terms-card a { color: var(--mint); text-decoration: underline; text-underline-offset: 3px; }
.account-usage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 24px 0;
}
.account-usage span {
  min-width: 0;
  border: 1.5px solid var(--line);
  padding: 12px 10px;
  color: var(--dim);
  font: 700 9px/1 var(--mono);
}
.account-usage b {
  display: block;
  margin-bottom: 8px;
  overflow: hidden;
  color: var(--paper);
  font: 400 17px/1 var(--display);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.username-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 9px; }
.username-form label { min-width: 0; }
.username-form label span {
  display: block;
  margin-bottom: 7px;
  color: var(--mint);
  font: 700 9px/1 var(--mono);
}
.username-form input {
  width: 100%;
  height: 44px;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  padding: 0 12px;
  background: var(--input-bg);
  color: var(--input-ink);
  font: 700 13px/1 var(--mono);
}
.username-form input:focus { outline: 2px solid var(--mint); outline-offset: 1px; }
.username-form button, .account-actions a, .account-actions button, .accept-terms {
  height: 44px;
  border: 1.5px solid var(--black);
  border-radius: 4px;
  padding: 0 16px;
  background: var(--mint);
  color: var(--black);
  cursor: pointer;
  font: 400 11px/1 var(--display);
}
.account-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}
.account-actions a { display: inline-grid; place-items: center; }
.account-actions button { background: var(--panel-2); color: var(--paper); border-color: var(--line); }
.terms-card { border-color: var(--mint); box-shadow: 10px 10px 0 var(--coral); }
.terms-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px;
  align-items: start;
  border: 1.5px dashed var(--line);
  padding: 15px;
  color: var(--paper);
  font: 600 13px/1.45 var(--body);
}
.terms-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--mint); }
.accept-terms { width: 100%; margin-top: 14px; background: var(--coral); }
.accept-terms:disabled { cursor: not-allowed; filter: grayscale(1); opacity: .45; }
.stage-card {
  position: relative;
  width: min(650px, 100%);
  max-height: calc(100svh - 40px);
  overflow-y: auto;
  border: 2px solid var(--mint);
  border-radius: 8px;
  padding: 32px;
  background: var(--panel);
  box-shadow: 10px 10px 0 var(--blue);
  animation: modalIn .3s cubic-bezier(.2, 1.2, .4, 1) both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(25px) rotate(-1deg); } }
.close-button {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--line);
  border-radius: 5px;
  background: var(--panel-2);
  color: var(--paper);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}
.close-button:hover, .close-button:focus-visible { outline: 0; background: var(--coral); color: var(--black); }
.stage-kicker { margin: 0 0 8px; color: var(--mint); font: 700 12px/1 var(--mono); }
.stage-card h2 {
  max-width: calc(100% - 48px);
  margin: 0;
  overflow: hidden;
  color: var(--paper);
  font: 400 44px/1 var(--display);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stage-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 26px 0;
  color: var(--dim);
  font: 700 12px/1 var(--mono);
}
.stage-stats b { color: var(--paper); font: inherit; }
.stage-stats .bad b { color: var(--coral); }
.launch-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.url-field > span {
  display: block;
  margin-bottom: 8px;
  color: var(--dim);
  font: 700 11px/1 var(--mono);
}
.url-field input {
  width: 100%;
  height: 54px;
  border: 2px solid var(--line);
  border-radius: 5px;
  background: var(--input-bg);
  color: var(--input-ink);
  padding: 0 14px;
  font: 700 16px/1 var(--mono);
}
.url-field input:focus { outline: 3px solid var(--blue); border-color: var(--mint); }
.launch-button {
  align-self: end;
  height: 54px;
  border: 2px solid var(--black);
  border-radius: 5px;
  padding: 0 22px;
  background: var(--mint);
  color: var(--black);
  cursor: pointer;
  font: 400 14px/1 var(--display);
  box-shadow: 5px 5px 0 var(--blue);
}
.launch-button:hover, .launch-button:focus-visible { outline: 0; background: var(--paper); transform: translate(-2px, -2px); }
.launch-button:disabled { cursor: wait; opacity: .5; transform: none; }
.replace {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  color: var(--dim);
  cursor: pointer;
  font: 700 11px/1 var(--mono);
}
.replace input { width: 17px; height: 17px; accent-color: var(--mint); }
.upload-progress { margin-top: 24px; }
.progress-track { height: 10px; overflow: hidden; border: 1.5px solid var(--paper); background: var(--black); }
.progress-track i { display: block; width: 0; height: 100%; background: var(--coral); transition: width .12s ease; }
.upload-progress p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 9px 0 0;
  color: var(--dim);
  font: 700 11px/1 var(--mono);
}
.upload-progress p span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-progress p b { color: var(--mint); }
.form-error { margin: 18px 0 0; color: var(--coral); font: 700 12px/1.35 var(--mono); }

.party { z-index: 80; }
.party canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.party-card {
  position: relative;
  width: min(720px, 100%);
  max-height: calc(100svh - 32px);
  overflow-y: auto;
  border: 3px solid var(--black);
  border-radius: 8px;
  padding: 28px;
  background: var(--party-surface);
  color: var(--party-ink);
  box-shadow: 12px 12px 0 var(--coral);
  text-align: center;
  animation: partyIn .42s cubic-bezier(.2, 1.5, .4, 1) both;
}
@keyframes partyIn { from { opacity: 0; transform: scale(.65) rotate(-3deg); } }
.party-card > p { margin: 0; font: 700 11px/1 var(--mono); }
.party-card h2 { margin: 4px 0 18px; color: var(--blue); font: 400 58px/.9 var(--display); }
.party-preview {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 3px solid var(--black);
  border-radius: 6px;
  background: var(--black);
}
.party-preview iframe { width: 200%; height: 200%; border: 0; transform: scale(.5); transform-origin: 0 0; pointer-events: none; }
.party-card > a {
  display: block;
  margin: 15px auto 0;
  overflow: hidden;
  color: var(--party-ink);
  font: 700 15px/1.2 var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.party-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 18px; }
.party-actions button {
  height: 47px;
  border: 2px solid var(--black);
  border-radius: 5px;
  background: var(--mint);
  color: var(--black);
  cursor: pointer;
  font: 400 13px/1 var(--display);
}
.party-actions button:nth-child(2) { background: var(--blue); color: var(--on-dark); }
.party-actions button:nth-child(3) { background: var(--party-surface); color: var(--party-ink); }
.party-actions button:hover, .party-actions button:focus-visible { outline: 0; transform: translateY(-2px); box-shadow: 4px 4px 0 var(--black); }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  max-width: calc(100vw - 44px);
  border: 2px solid var(--black);
  border-radius: 5px;
  padding: 13px 16px;
  background: var(--mint);
  color: var(--black);
  box-shadow: 5px 5px 0 var(--blue);
  font: 700 12px/1 var(--mono);
}

@media (max-width: 900px) {
  .hero h1 { font-size: 124px; }
  .hero h1 > span:last-child { font-size: 42px; }
  .pipeline { grid-template-columns: 180px minmax(24px, 1fr) 90px minmax(24px, 1fr) 230px; gap: 10px; }
  .dist-folder, .live-output { min-height: 124px; }
  .drop-box { width: 90px; height: 90px; }
  .site-grid { grid-template-columns: 1fr; max-width: 680px; margin: 0 auto; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 28px, 1160px); }
  .topbar-inner { min-height: 60px; }
  .brand { font-size: 22px; }
  .header-tools { gap: 7px; }
  .colorways { gap: 2px; padding: 2px; }
  .colorways button { width: 26px; height: 26px; }
  .colorways button i { width: 4px; height: 14px; }
  .server-state span:last-child { display: none; }
  .account-button { min-width: 66px; max-width: 104px; height: 36px; padding-inline: 8px; }
  .hero { min-height: min(650px, calc(100svh - 78px)); padding: 38px 0 34px; }
  .eyebrow { font-size: 11px; }
  .hero h1 { font-size: 78px; text-shadow: 0 5px 0 var(--black), 0 8px 0 rgba(102, 140, 255, .24); }
  .hero h1 > span:last-child { font-size: 27px; }
  .pipeline {
    grid-template-columns: 96px 14px 62px 14px minmax(126px, 1fr);
    gap: 5px;
    margin: 38px 0 34px;
  }
  .dist-folder, .live-output { min-height: 106px; border-width: 1.5px; }
  .dist-folder { gap: 5px; padding: 27px 8px 8px; box-shadow: 3px 4px 0 var(--black); }
  .folder-tab { min-width: 55px; padding: 5px 6px 4px; font-size: 8px; }
  .folder-purpose { font-size: 6.5px; }
  .dist-folder code { font-size: 7px; }
  .drop-box { width: 62px; height: 62px; box-shadow: 4px 4px 0 var(--coral); }
  .drop-box small { font-size: 9px; }
  .drop-box strong { font-size: 21px; }
  .live-output { gap: 7px; padding: 8px; box-shadow: 3px 4px 0 var(--blue); }
  .live-output span { padding: 4px 5px; font-size: 7px; }
  .live-output strong { font-size: 11px; }
  .benefit-flip { height: 8px; }
  .benefit-flip small { font-size: 6px; }
  .flow-line { height: 15px; }
  .drop-well { width: min(330px, 100%); min-height: 92px; padding: 17px 20px; }
  .drop-well strong { font-size: 15px; }
  .drop-well small { font-size: 9px; }
  .drop-well .choose-icon { width: 39px; height: 39px; font-size: 21px; }
  .library { padding-top: 38px; padding-bottom: 70px; }
  .library-head h2 { font-size: 28px; }
  .site-grid { gap: 24px; }
  .preview-label strong { font-size: 26px; }
  .site-info { gap: 10px; padding-inline: 13px; }
  .site-actions { gap: 5px; }
  .site-actions a, .site-actions button { width: 36px; height: 36px; }
  .drag-curtain { border-width: 7px; }
  .drag-curtain h2 { font-size: 42px; }
  .drop-signal { width: 86px; height: 86px; font-size: 58px; }
  .stage-layer, .party { padding: 12px; }
  .account-layer, .terms-layer { padding: 12px; }
  .stage-card { padding: 26px 20px; box-shadow: 7px 7px 0 var(--blue); }
  .stage-card h2 { font-size: 34px; }
  .launch-row { grid-template-columns: 1fr; }
  .launch-button { width: 100%; }
  .party-card { padding: 20px 16px; box-shadow: 7px 7px 0 var(--coral); }
  .party-card h2 { font-size: 44px; }
  .party-actions { grid-template-columns: 1fr; }
  .party-actions button { height: 43px; }
  .account-card, .terms-card { padding: 26px 20px; box-shadow: 7px 7px 0 var(--blue); }
  .account-card h2, .terms-card h2 { font-size: 31px; }
  .account-usage { grid-template-columns: 1fr; }
  .account-usage span { display: flex; align-items: center; gap: 9px; }
  .account-usage b { display: inline; margin: 0; }
  .username-form { grid-template-columns: 1fr; }
  .username-form button { width: 100%; }
  footer { align-items: flex-start; flex-direction: column; line-height: 1.4; }
  footer nav { flex-wrap: wrap; gap: 10px 14px; }
  footer { padding-bottom: 25px; }
}

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