:root {
  color-scheme:dark;
  --bg:#0c0c0e;
  --line:#303035;
  --text:#f7f5f2;
  --muted:#a5a2a7;
  --red:#ff4d40;
  --mono:"SFMono-Regular",Consolas,"Liberation Mono",monospace;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
}

button,input,select {
  font:inherit;
  color:inherit;
}

button,a,select,label.file-input {
  touch-action:manipulation;
}

button,select {
  cursor:pointer;
}

button {
  background:none;
  border:0;
}

a {
  color:inherit;
  text-decoration:none;
}

i {
  display:inline-flex;
  align-items:center;
  font-style:normal;
}

i svg {
  width:1.1em;
  height:1.1em;
  fill:currentColor;
}

.bar,main,footer {
  width:min(1176px,calc(100% - 88px));
  margin:auto;
}

header {
  border-bottom:1px solid #28282c;
  background:#101012;
}

.bar {
  height:70px;
  display:flex;
  align-items:center;
  gap:58px;
}

.brand {
  display:inline-flex;
  align-items:center;
  color:#fff;
  font-size:24px;
  font-weight:800;
  letter-spacing:-1.4px;
}

.brand img {
  width:32px;
  margin-right:10px;
}

.brand span {
  color:var(--red);
}

nav {
  display:flex;
  align-self:stretch;
  gap:26px;
}

nav a {
  position:relative;
  display:grid;
  align-items:center;
  font-size:14px;
  color:var(--muted);
  font-weight:550;
}

nav a.active {
  color:#fff;
}

nav a.active:after {
  content:"";
  position:absolute;
  bottom:0;
  left:0;
  right:0;
  height:2px;
  background:var(--red);
}

.account,.quiet,.secondary {
  border:1px solid var(--line);
  border-radius:6px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  padding:9px 14px;
  background:#1a1a1d;
  font-weight:550;
  font-size:14px;
}

.account {
  margin-left:auto;
}

.account:hover,.secondary:hover,.quiet:hover {
  background:#29292e;
}

main {
  padding:28px 0 52px;
}

[hidden] {
  display:none!important;
}

.hero {
  isolation:isolate;
  position:relative;
  overflow:hidden;
  background:linear-gradient(104deg,#181719 15%,#1a1618 54%,#231719);
  border:1px solid #33292b;
  border-radius:9px;
  display:grid;
  grid-template-columns:1.23fr 1fr;
  min-height:294px;
}

.hero-copy {
  position:relative;
  z-index:2;
  align-self:center;
  padding:30px 0 32px 40px;
}

.platforms {
  display:flex;
  gap:11px;
  align-items:center;
  font:600 13px var(--mono);
  color:#d7d1d2;
}

.platforms span {
  display:flex;
  gap:7px;
  align-items:center;
}

.platforms i {
  color:var(--red);
  font-size:18px;
}

.platforms em {
  font-style:normal;
  color:#66595b;
}

.hero h1 {
  font-size:clamp(42px,4.55vw,70px);
  letter-spacing:-.065em;
  line-height:.99;
  margin:18px 0 15px;
  font-weight:780;
}

.hero strong {
  color:var(--red);
  font-weight:inherit;
}

.hero p {
  font-size:16px;
  line-height:1.48;
  color:#bbb5b8;
  max-width:485px;
  margin:0;
}

.art {
  position:relative;
  display:grid;
  place-items:center;
  background:radial-gradient(ellipse at 55% 56%,#69282470,transparent 70%);
}

.art img {
  position:relative;
  width:min(95%,435px);
  height:270px;
  object-fit:contain;
  image-rendering:pixelated;
  z-index:1;
}

.grid {
  position:absolute;
  inset:0 -1px;
  background-image:linear-gradient(#b6524426 1px,transparent 1px),linear-gradient(90deg,#b6524426 1px,transparent 1px);
  background-size:27px 27px;
  mask-image:linear-gradient(to right,transparent,#000 32%);
}

.spark {
  position:absolute;
  color:#9b4a41;
  font:20px var(--mono);
}

.s1 {
  left:14%;
  top:20%;
}

.s2 {
  right:10%;
  top:32%;
}

.s3 {
  left:23%;
  bottom:12%;
}

.reticle {
  width:10px;
  height:10px;
  position:absolute;
  z-index:2;
  border-color:#a8665c;
}

.tl {
  left:12px;
  top:12px;
  border-left:1px solid;
  border-top:1px solid;
  color:#89574f;
}

.br {
  right:12px;
  bottom:12px;
  border-right:1px solid;
  border-bottom:1px solid;
  color:#89574f;
}

.panel,.empty,.project {
  background:#161618;
  border:1px solid var(--line);
  border-radius:9px;
}

.panel {
  margin:20px 0 31px;
  padding:23px 28px 18px;
}

.panel-head,.section-head,.form-meta {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}

h2 {
  font-size:24px;
  line-height:1.2;
  letter-spacing:-.045em;
  margin:0;
}

h2 i {
  color:var(--red);
  font-size:21px;
  margin-right:10px;
  vertical-align:-2px;
}

.test,.format,.category,.duration {
  font:12px var(--mono);
}

.test {
  color:#c0b9b4;
  background:#252323;
  border:1px solid #403937;
  padding:5px 8px;
  border-radius:4px;
}

.tabs {
  display:flex;
  gap:6px;
  margin:20px 0 12px;
}

.tabs button {
  display:flex;
  align-items:center;
  gap:7px;
  color:#a9a5ab;
  border:1px solid transparent;
  padding:7px 11px;
  border-radius:5px;
  font-size:14px;
}

.tabs button.selected {
  background:#2a2424;
  color:#ffaca3;
  border-color:#5e3632;
}

.input-row {
  display:flex;
  gap:10px;
}

.url-input,.file-input,.auth input {
  border:1px solid #3b393e;
  background:#101012;
  border-radius:6px;
}

.url-input,.file-input {
  display:flex;
  align-items:center;
  gap:11px;
  flex:1;
  min-width:0;
  padding:0 15px;
  color:#928d94;
  position:relative;
}

.url-input input {
  background:transparent;
  border:0;
  outline:0;
  width:100%;
  padding:15px 0;
  color:#fff;
  font-size:15px;
}

.url-input:focus-within,.file-input:focus-within {
  outline:2px solid var(--red);
}

.file-input input {
  position:absolute;
  inset:0;
  opacity:0;
  width:100%;
  cursor:pointer;
}

.file-input span {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.primary {
  display:inline-flex;
  justify-content:center;
  align-items:center;
  gap:9px;
  color:white;
  background:#d63a30;
  border:1px solid #ff6559;
  border-radius:6px;
  font-weight:650;
  padding:13px 23px;
  font-size:15px;
}

.primary:hover {
  background:#e7493d;
}

.primary:disabled {
  opacity:.7;
}

.form-meta {
  margin-top:10px;
  color:#a49fa4;
  font-size:13px;
}
.section-head {
  margin-bottom:16px;
}

.format {
  display:flex;
  align-items:center;
  gap:8px;
  color:#aaa6ab;
}

.format b {
  color:#645b60;
}

.cards {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}

.card {
  background:#18181b;
  border:1px solid var(--line);
  border-radius:7px;
  overflow:hidden;
  text-align:left;
  padding:0;
}

.card:hover {
  border-color:#8c514c;
  transform:translateY(-2px);
}

.thumb {
  position:relative;
  aspect-ratio:2.45;
  overflow:hidden;
  background:#25212e;
}

.thumb img {
  width:100%;
  height:100%;
  object-fit:cover;
  image-rendering:pixelated;
}

.thumb:after {
  content:"";
  position:absolute;
  inset:40% 0 0;
  background:linear-gradient(transparent,#10101566);
}

.category,.duration {
  position:absolute;
  z-index:1;
  border-radius:3px;
  background:#141317df;
  color:#eee;
  padding:4px 7px;
}

.category {
  left:10px;
  top:10px;
}

.duration {
  bottom:9px;
  right:9px;
}

.card-info {
  padding:13px 15px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:16px;
  font-weight:600;
}

.card-info i {
  color:#bab3b4;
}

footer {
  border-top:1px solid #28282c;
  display:flex;
  justify-content:space-between;
  padding:18px 0 28px;
  color:#aaa5a9;
  font:12px var(--mono);
}

:focus-visible {
  outline:2px solid #ff8f85;
  outline-offset:3px;
}

.error {
  color:#ff9d92;
  font-size:14px;
}

.error:empty {
  display:none;
}

dialog {
  background:#19191c;
  color:white;
  border:1px solid #494145;
  border-radius:12px;
  padding:32px;
  width:min(440px,calc(100% - 28px));
  max-height:90dvh;
  overflow:auto;
}

dialog::backdrop {
  background:#08080bd9;
}

.close {
  position:absolute;
  right:9px;
  top:7px;
  color:#bbb;
  font-size:27px;
}

.auth,.stack {
  display:grid;
  gap:16px;
}

.auth label {
  display:grid;
  gap:6px;
  font-size:14px;
}

.auth input {
  padding:12px;
}

.auth p,.stack p,.empty p,.project p {
  color:var(--muted);
  margin:0;
  line-height:1.5;
}

.text-button {
  color:#ff9287;
  text-decoration:underline;
  font-size:14px;
}

.empty,.project {
  padding:24px;
  margin:12px 0;
}

.project h2 {
  font-size:18px;
  overflow-wrap:anywhere;
}

.project button {
  margin:12px 5px 0 0;
}

.empty p {
  margin-bottom:16px;
}

.console {
  background:#ad483e;
  border:3px solid #ed7464;
  border-radius:12px 12px 29px 12px;
  padding:15px;
  box-shadow:inset -6px -5px #79352e;
}

.pad {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-top:12px;
  color:#261918;
  font:bold 30px var(--mono);
}

.pad button {
  min-height:44px;
  padding:0 17px;
  border-radius:16px;
  background:#292022;
  color:white;
  box-shadow:0 4px #702e29;
  font:bold 13px var(--mono);
}

progress {
  accent-color:var(--red);
  width:100%;
}

.player {
  width:auto;
  max-width:100%;
  height:min(56dvh,540px);
  display:block;
  margin:auto;
  border-radius:6px;
  background:#000;
}

.stack h2,.auth h2 {
  padding-right:18px;
}

#library {
  min-height:72vh;
}

#library h1 {
  letter-spacing:-.055em;
}

.project small {
  color:var(--muted);
}

@media(max-width:820px) {
  .bar,main,footer {
    width:calc(100% - 36px);
  }
  .hero-copy {
    padding-left:24px;
  }
  .hero h1 {
    font-size:clamp(38px,5.6vw,48px);
  }
  .art img {
    height:240px;
  }
  .hero {
    min-height:260px;
  }
  .bar {
    gap:30px;
  }
  .cards {
    gap:10px;
  }
  .panel {
    padding:20px;
  }
}

@media(max-width:620px) {
  .bar {
    gap:15px;
    height:60px;
  }
  .brand {
    font-size:19px;
  }
  .brand img {
    width:25px;
    margin-right:5px;
  }
  nav {
    gap:12px;
  }
  nav a {
    font-size:13px;
  }
  .account {
    font-size:0;
    padding:8px;
    gap:0;
  }
  .account i {
    font-size:17px;
  }
  main {
    padding-top:16px;
  }
  .hero {
    display:flex;
    flex-direction:column;
  }
  .hero-copy {
    padding:26px 21px 0;
  }
  .hero h1 {
    font-size:clamp(38px,9vw,53px);
  }
  .hero p {
    font-size:15px;
  }
  .art {
    height:168px;
  }
  .art img {
    height:169px;
  }
  .hero .grid {
    mask-image:linear-gradient(transparent,#000 45%);
  }
  .panel {
    padding:17px;
    margin:14px 0 25px;
  }
  .input-row {
    flex-direction:column;
  }
  .file-input {
    min-height:48px;
  }
  .form-meta {
    align-items:flex-start;
    flex-wrap:wrap;
  }
  .cards {
    grid-template-columns:1fr;
  }
  .thumb {
    aspect-ratio:2.65;
  }
  h2 {
    font-size:21px;
  }
  .test {
    font-size:11px;
  }
  .tabs {
    margin:15px 0 10px;
  }
  .section-head {
    margin-bottom:12px;
  }
  footer {
    gap:10px;
    font-size:11px;
  }
  .bar,main,footer {
    width:calc(100% - 24px);
  }
}

/* Public introduction */
#home .hero {min-height:380px}
#home .hero-copy {padding-block:40px}
#home .art img {height:320px}
.hero-actions {display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-top:24px}
.watch {display:inline-flex;align-items:center;gap:8px;color:#ddd;font-size:14px;padding:10px 5px}
.watch:hover {color:white}
.watch i {color:var(--red)}
#home .examples,.how,.pricing {margin-top:42px}
.steps,.plans {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:18px}
.steps {border-block:1px solid var(--line);padding:24px 0}
.steps article,.plans article {min-width:0}
.steps article {padding:0 12px}
.steps i {font-size:24px;color:var(--red)}
.steps h3,.plans h2 {margin:12px 0 7px;font-size:19px}
.steps p,.pricing p,.plans li {color:var(--muted);line-height:1.5;font-size:15px}
.steps p,.plans p {margin:0}
.pricing {scroll-margin:24px}
.plans article {border:1px solid var(--line);border-radius:8px;background:#171719;padding:22px;display:flex;align-items:flex-start;flex-direction:column}
.plans article:first-child {border-color:#75403b;background:linear-gradient(150deg,#302020,#171719 70%)}
.plans h2 {margin-top:0;color:#d7ced0}
.plans strong {font-size:32px;letter-spacing:-.04em;margin:10px 0 4px}
.plans small {font-size:14px;font-weight:400;letter-spacing:0;color:var(--muted)}
.plans ul {padding-left:17px;margin:18px 0 22px}
.plans li::marker {color:#f07869}
.plans article>span {font:13px var(--mono);color:#c0a49f;margin-top:auto}
#studio {min-height:72vh}
#studio h1 {letter-spacing:-.055em}
@media(max-width:720px){
  .steps,.plans {grid-template-columns:1fr}
  .steps article {padding-left:40px;position:relative}
  .steps i {position:absolute;left:0;top:10px}
}
@media(max-width:620px){
  #home .hero {min-height:0}
  #home .hero-copy {padding-block:22px 0}
  #home .art img {height:160px}
  .hero-actions {gap:6px;margin-top:14px}
  .hero-actions .primary {padding:11px}
  .bar {column-gap:10px;row-gap:0;height:auto;flex-wrap:wrap;padding-top:10px}
  .bar nav {order:3;width:100%;gap:24px;min-height:40px}
  #home .examples,.how,.pricing {margin-top:28px}
}
.arcade-screen {border:6px solid #272026;background:#17141c;padding:5px;color:#f4d9cd;font:12px var(--mono)}
.arcade-screen canvas {width:100%;display:block;image-rendering:pixelated}
.hud {display:flex;justify-content:space-between;gap:6px;padding:4px 1px 8px}
.game-status {padding:6px 0 2px}
.game-help {display:block;margin-top:8px;line-height:1.4;color:var(--muted)}
#demo {padding:0;margin-top:12px}

.monitor-preview {position:relative;display:grid;place-items:center;width:100%;padding:0}
.monitor-preview:hover img {filter:brightness(1.12)}

/* Editing desk */
.studio-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(250px, 1fr);
  gap: 20px;
  align-items: start;
}
.studio-workspace .panel {margin:0}
.studio-workspace .input-row {flex-wrap:wrap}
.studio-workspace .url-input,.studio-workspace .file-input {flex:1 1 240px;min-height:48px}
#upload-state {margin-top:12px;color:var(--muted);font-size:14px}
#upload-state progress {display:block;margin-top:6px}
.output-preview {
  border:1px solid var(--line);
  background:#171719;
  overflow:hidden;
  border-radius:9px;
}
.preview-screen {
  position:relative;
  display:grid;
  place-items:center;
  min-height:200px;
  padding:16px;
  background-color:#171519;
  background-image: radial-gradient(#40343e 1px,transparent 1px);
  background-size:12px 12px;
}
.preview-screen img,.preview-screen video {
  width:104px;
  aspect-ratio:9/16;
  border:2px solid #9e828b;
  border-radius:8px;
  object-fit:cover;
  background:black;
}
.preview-screen video {object-fit:contain;width:152px}
.preview-ratio {position:absolute;right:14px;bottom:12px;font:13px var(--mono);color:#d8b7b2}
.preview-info {padding:18px}
.preview-info h2 {font-size:19px;overflow-wrap:anywhere}
.preview-info p {font:13px var(--mono);color:#ffb0a9}
.preview-info small {color:var(--muted);line-height:1.45}
#library-tools {display:flex;gap:10px;margin-bottom:20px}
#library-tools input,#library-tools select {border:1px solid var(--line);border-radius:5px;background:#18181b;padding:11px;font-size:14px}
#library-tools input {flex:1;min-width:0}
.library-project {display:flex;gap:16px;align-items:center}
.project-icon {padding:13px;background:#342524;color:#ff988d;border-radius:6px}
.project-info {flex:1;min-width:0}
.project-info h2 {margin:5px 0}
.project-info span {font-size:13px}
.status-ready {color:#a7d8ab}
.status-processing {color:#ffce92}
.status-failed {color:#ffa699}
.library-project button {margin:0}
.clip-switch {display:flex;gap:8px;flex-wrap:wrap}
.clip-switch button[aria-pressed="true"] {background:#3d2625;border-color:#a15950;color:#ffb9ae}
.result-source {font-size:14px;overflow-wrap:anywhere}
@media(max-width:760px) {
  .studio-workspace {grid-template-columns:minmax(0,1fr)}
  .output-preview {display:flex;align-items:center}
  .preview-screen {width:32%;flex:none;min-height:120px;padding:10px}
  .preview-screen img,.preview-screen video {width:58px}
  .preview-ratio {display:none}
  .library-project {flex-wrap:wrap;gap:12px;padding:16px}
  .library-project button {margin-left:auto}
}

@media(max-width:620px) {
  .studio-workspace .url-input,.studio-workspace .file-input {flex:0 0 auto}
  .output-preview:has(video:not([hidden])) .preview-screen {width:45%}
  .preview-screen video {width:min(100%,140px)}
}
.footer-links {display:flex;flex-wrap:wrap;align-items:center;gap:12px 20px}
.footer-links button {padding:0;font:inherit;color:inherit;text-align:left}
.footer-links a:hover,.footer-links button:hover,.legal a,.cookie-box a,.terms-choice a {color:#ffb0a8;text-decoration:underline}
.legal {max-width:800px;line-height:1.65}
.legal h1,#pricing h1 {font-size:clamp(28px,4vw,48px);line-height:1.1;letter-spacing:-.045em;overflow-wrap:anywhere}
.legal h2 {margin:32px 0 10px}
.legal p,.legal li {color:#cbc7cb}
.legal .revision {font:13px var(--mono);color:var(--muted)}
.cookie-box {position:fixed;z-index:9;bottom:16px;right:16px;width:min(420px,calc(100% - 32px));padding:18px;border:1px solid #594641;border-radius:8px;background:#201f21;box-shadow:0 12px 40px #0008;max-height:60dvh;overflow:auto}
.cookie-box h2 {font-size:19px}
.cookie-box p,.cookie-box a {font-size:14px;line-height:1.45}
.cookie-box>div {display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.cookie-box button {min-height:40px}
.auth .terms-choice {font-size:13px;line-height:1.45}
@media(max-width:620px){footer {flex-direction:column}.cookie-box{right:10px;bottom:10px;width:calc(100% - 20px)}}

.skip-link {
  position:fixed;
  top:8px;
  left:8px;
  z-index:20;
  padding:11px 16px;
  background:#19191b;
  color:white;
  border-radius:5px;
  transform:translateY(-150%);
}
.skip-link:focus {transform:none}
.file-input.dragging {border-color:var(--red);background:#342423}
button:disabled {cursor:wait}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after {animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}
@media (max-width:620px) {
  .cookie-box {padding:12px}
  .cookie-box p {margin:7px 0}
  .cookie-box>div {margin-top:8px}
  .cookie-box button {padding-inline:9px;font-size:13px}
}
