:root {
  color-scheme: dark;
  --bg: #0e0e10;
  --surface: #18181b;
  --surface2: #202023;
  --line: #303034;
  --text: #f5f5f4;
  --muted: #a6a6ad;
  --accent: #d9ff4e;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  letter-spacing: -.005em;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { touch-action: manipulation; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.app { display: block; min-height: 100vh; }
aside {
  position: sticky;
  top: 0;
  z-index: 10;
  height: auto;
  min-height: 69px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(30px, 5vw, 82px);
  padding: 0 clamp(20px, 4vw, 60px);
  background: #101012f5;
  border-bottom: 1px solid #29292c;
  border-right: 0;
  backdrop-filter: blur(16px);
}
.brand {
  display: block;
  padding: 0;
  margin: 0;
  flex: 0 0 auto;
  white-space: nowrap;
}
.brand strong {
  font-size: 18px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: -.065em;
  color: #fff;
}
.brand small, .symbol, .aside-note { display: none; }
nav {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: clamp(18px, 2.8vw, 42px);
  min-width: 0;
}
nav button {
  display: block;
  width: auto;
  padding: 25px 0 22px;
  color: #a9a9b0;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
}
nav button:hover { background: transparent; color: #fff; }
nav button[aria-current="page"] {
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--accent);
  color: #f7f7f4;
}
nav button[aria-current="page"]:hover { background: transparent; }

main {
  max-width: 1370px;
  margin: 0 auto;
  padding: 69px clamp(24px, 5vw, 72px) 110px;
}
.top { display: none; }
.panel { display: none; }
.panel.active { display: block; }
.page-title {
  margin: 0 0 43px;
  max-width: 900px;
}
.page-title p { display: none; }
h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 4.5vw, 58px);
  line-height: 1.05;
  font-weight: 720;
  letter-spacing: -.067em;
  text-wrap: balance;
}
.page-title span {
  display: block;
  max-width: 720px;
  color: #a5a4ab;
  font-size: 15px;
  line-height: 1.65;
}

.card {
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 8px 0;
  margin: 0;
  min-width: 0;
}
.card h2 {
  font-size: 19px;
  font-weight: 660;
  letter-spacing: -.045em;
  margin: 0 0 29px;
}
#dataset.panel.active {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(290px, .68fr);
  gap: clamp(30px, 4vw, 64px);
  align-items: start;
}
#dataset .page-title {
  grid-column: 1 / -1;
  margin-bottom: 1px;
}
#dataset > .card:nth-of-type(2) {
  background: #1a1a1d;
  border: 1px solid #29292d;
  border-radius: 28px;
  padding: clamp(26px, 3vw, 43px);
}
#dataset > .card:last-of-type {
  padding: 13px 0 12px clamp(18px, 2.5vw, 38px);
  border-left: 1px solid #303034;
}
#identity .split {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
  align-items: start;
  gap: clamp(32px, 5vw, 78px);
}
#identity .split > .card:first-child { padding-top: 12px; }
#identity .split > .card:last-child {
  background: #1a1a1d;
  border: 1px solid #29292d;
  border-radius: 28px;
  padding: clamp(26px, 3vw, 43px);
}
#runpod.panel.active {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(34px, 5vw, 75px);
  align-items: start;
}
#runpod .page-title {
  grid-column: 1 / -1;
  margin-bottom: 1px;
}
#runpod > .card:nth-of-type(2) { padding-top: 14px; }
#runpod .card:last-of-type {
  border: 1px solid #29292d;
  background: #1a1a1d;
  border-radius: 28px;
  padding: clamp(26px, 3vw, 40px);
}

.field { margin: 0 0 22px; }
.field label {
  display: block;
  color: #ebebee;
  font-size: 12px;
  font-weight: 660;
  margin-bottom: 10px;
}
input:not([type=file]), select, textarea {
  background: #121214;
  border: 1px solid #3c3c40;
  color: #f7f7f7;
  border-radius: 14px;
  font-size: 13px;
  padding: 15px 17px;
}
input:not([type=file]):hover, select:hover, textarea:hover { border-color: #727277; }
input::placeholder, textarea::placeholder { color: #818186; }
select { appearance: auto; }
textarea { min-height: 173px; line-height: 1.65; border-radius: 18px; }
input[type=file] {
  display: block;
  width: 100%;
  padding: 25px 20px;
  border: 1px dashed #58585e;
  border-radius: 19px;
  background: #222226;
  color: #b3b3b9;
  font-size: 12px;
}
input[type=file]:hover {
  border-color: var(--accent);
  background: #242528;
}
input[type=file]::file-selector-button {
  background: #38383f;
  color: #f4f4f6;
  border: 1px solid #626268;
  border-radius: 100px;
  margin-right: 13px;
  padding: 10px 16px;
  font-weight: 600;
}

.btn {
  padding: 13px 20px;
  font-size: 12px;
  font-weight: 750;
  border-radius: 100px;
  background: var(--accent);
  color: #151515;
  border: 1px solid var(--accent);
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: #eaff91; border-color: #eaff91; filter: none; }
.btn.secondary {
  background: #242427;
  color: #e3e3e7;
  border-color: #4b4b50;
}
.btn.secondary:hover { background: #36363b; border-color: #77777b; color: white; }
.btn.danger {
  background: transparent;
  color: #d1adb0;
  border-color: #4b3b3d;
}
.btn.danger:hover { background: #39272a; border-color: #9d6b71; }
.form-actions { margin-top: 27px; gap: 11px; }
.help {
  color: #8f8f96;
  font-size: 11px;
  line-height: 1.65;
  margin-top: 18px;
}
.notice {
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  border-radius: 0;
  padding: 18px 0 0;
  margin-top: 26px;
  font-size: 12px;
  color: #a4a3a9;
}
.preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.preview-item {
  border-radius: 14px;
  background: #262629;
  border: 1px solid #3b3b40;
}
.preview-item button {
  padding: 1px 8px;
  background: #141417d9;
  border: 1px solid #5d5d62;
  border-radius: 100px;
  top: 6px;
  right: 6px;
}
.models { display: block; }
.model {
  border: 0;
  border-top: 1px solid #38383c;
  border-radius: 0;
  background: none;
  padding: 15px 0;
  gap: 15px;
}
.model strong { font-size: 13px; color: #f4f4f4; }
.model small { display: block; margin-top: 2px; color: #8f8f96; }
.model .buttons { gap: 7px; }
.model .btn { padding: 8px 11px; font-size: 11px; }
.empty {
  border: 0;
  border-top: 1px solid #38383d;
  border-radius: 0;
  padding: 45px 15px;
  background: transparent;
  color: #9e9ea4;
}
.image-preview {
  max-height: 520px;
  width: 100%;
  max-width: 100%;
  margin: 18px auto 0;
  background: #111113;
  border: 1px solid #343438;
  border-radius: 20px;
}
.workflow-item { border-color: #343438; gap: 20px; flex-wrap: wrap; }
.workflow-item strong { min-width: 0; overflow-wrap: anywhere; }
.toast {
  background: #292a27;
  border: 1px solid #829a36;
  border-radius: 15px;
  color: white;
}

@media (max-width: 1000px) {
  #dataset.panel.active, #runpod.panel.active, #identity .split {
    grid-template-columns: 1fr;
  }
  #dataset .page-title, #runpod .page-title { grid-column: 1; }
  #dataset > .card:last-of-type { border-left: 0; padding: 22px 4px; }
}
@media (max-width: 700px) {
  aside {
    display: block;
    padding: 17px 19px 0;
  }
  .brand { margin-bottom: 13px; }
  nav { display: flex; flex-wrap: nowrap; gap: 22px; overflow-x: auto; }
  nav button { padding: 9px 0 13px; font-size: 12px; }
  main { padding: 37px 18px 75px; }
  .page-title { margin-bottom: 28px; }
  #dataset > .card:nth-of-type(2),
  #identity .split > .card:last-child,
  #runpod .card:last-of-type { padding: 23px; border-radius: 22px; }
  h1 { font-size: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .toast { transition: none; }
}

/* A clear, creator-facing workflow with the navigation back on the left. */
[hidden] { display: none !important; }
.app {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  align-items: start;
}
aside {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 260px;
  height: 100vh;
  min-height: 610px;
  gap: 55px;
  padding: 33px 18px 29px;
  background: #151517;
  border-right: 1px solid #2a2a2e;
  border-bottom: 0;
  overflow-y: auto;
}
.brand { padding: 0 15px; }
.brand strong { font-size: 20px; letter-spacing: -.065em; }
nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  gap: 9px;
}
nav button {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 16px 13px;
  font-size: 13px;
  font-weight: 590;
  line-height: 1.25;
  text-align: left;
  white-space: normal;
  border: 1px solid transparent;
  border-radius: 15px;
  transition: background .15s ease, color .15s ease;
}
nav button:hover { background: #252529; color: #fff; }
nav button[aria-current="page"] {
  border: 1px solid #414735;
  background: #2b3027;
  color: #e7ff9d;
}
nav button[aria-current="page"]:hover { background: #33392d; }
.nav-index {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  color: #777780;
  letter-spacing: .02em;
}
nav button[aria-current="page"] .nav-index { color: var(--accent); }
.sidebar-note {
  margin-top: auto;
  padding: 22px 13px 0;
  border-top: 1px solid #333338;
  color: #8d8d93;
  font-size: 12px;
  line-height: 1.65;
}
main {
  width: 100%;
  max-width: 1350px;
  padding: 67px clamp(30px, 5vw, 76px) 110px;
}
.page-title { margin: 0 0 43px; }
.page-title p {
  display: block;
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .125em;
  text-transform: uppercase;
}
.page-title span { max-width: 760px; }
.field-caption {
  color: #9a9aa2;
  font-size: 12px;
  line-height: 1.55;
  margin: 11px 0 0;
}
.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  filter: none;
}
#identity .notice { max-width: 860px; }
.gate {
  max-width: 660px;
  padding: clamp(30px, 5vw, 54px);
  background: #1b1b1f;
  border: 1px solid #2f3033;
  border-radius: 28px;
}
.gate-step {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.gate h2 {
  margin: 19px 0 14px;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.18;
  letter-spacing: -.05em;
  font-weight: 660;
}
.gate p {
  color: #a3a3aa;
  font-size: 14px;
  line-height: 1.65;
  max-width: 440px;
  margin: 0 0 28px;
}
.cleaner-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.07fr) minmax(260px, .93fr);
  gap: clamp(36px, 5vw, 74px);
  align-items: start;
}
.cleaner-tool {
  background: #1b1b1e;
  border: 1px solid #2e2e33;
  border-radius: 28px;
  padding: clamp(26px, 3vw, 42px);
}
.cleaner-tool h2 { margin-bottom: 28px; }
.cleaner-transfer { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 12px 16px; margin: -5px 0 28px; padding: 20px 22px; border: 1px solid #a8d743; border-radius: 16px; background: linear-gradient(125deg,#26351d,#1b261b 70%); box-shadow: 0 10px 32px #0005; }
.cleaner-transfer[hidden] { display: none; }
.cleaner-transfer-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #c9f84c; color: #1a260d; font-size: 24px; font-weight: 800; }
.cleaner-transfer[data-state="loading"] .cleaner-transfer-mark { background: #3b5325; color: #d7ff7b; }
.cleaner-transfer[data-state="loading"] .cleaner-transfer-mark::before { content: "…"; }
.cleaner-transfer[data-state="ready"] .cleaner-transfer-mark::before { content: "✓"; }
.cleaner-transfer[data-state="partial"] .cleaner-transfer-mark,
.cleaner-transfer[data-state="error"] .cleaner-transfer-mark { background: #503127; color: #ffc9b3; }
.cleaner-transfer[data-state="partial"] .cleaner-transfer-mark::before,
.cleaner-transfer[data-state="error"] .cleaner-transfer-mark::before { content: "!"; }
.cleaner-transfer[data-state="partial"],
.cleaner-transfer[data-state="error"] { border-color: #9a6959; background: #2a221e; }
.cleaner-transfer-label { display: block; color: #c9f84c; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.cleaner-transfer-copy strong { display: block; margin: 3px 0; color: #f7ffe9; font-size: clamp(19px,2.3vw,25px); line-height: 1.15; }
.cleaner-transfer-copy p { margin: 0; color: #d4dfca; font-size: 14px; }
.cleaner-transfer-count { color: #e8ffc1; font-size: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cleaner-transfer progress { grid-column: 1 / -1; width: 100%; height: 12px; accent-color: #c9f84c; }
@media(max-width:520px){.cleaner-transfer{padding:16px;grid-template-columns:38px minmax(0,1fr)}.cleaner-transfer-mark{width:38px;height:38px}.cleaner-transfer-count{grid-column:2;justify-self:start;font-size:16px}.cleaner-transfer progress{grid-column:1 / -1}}
.cleaner-tool .image-preview {
  max-height: 280px;
  margin: 4px 0 25px;
  object-fit: contain;
}
.cleaner-tool .btn { margin-top: 6px; }
.cleaner-mode-field { margin: 0 0 18px; }
.cleaner-mode-field label, .cleaner-phone-options label:not(.cleaner-check) { display: block; margin: 0 0 7px; color: #e7e9e2; font-size: 14px; font-weight: 650; }
.cleaner-mode-field select, .cleaner-phone-options select { width: 100%; }
.cleaner-mode-field p { margin: 8px 0 0; color: #afb4ad; font-size: 13px; line-height: 1.5; }
.cleaner-phone-options { margin: 0 0 16px; padding: 18px; border: 1px solid #3b4436; border-radius: 10px; background: #141a14; }
.cleaner-phone-options[hidden], #cleaner-gps-row[hidden] { display: none; }
.cleaner-option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
#cleaner-gps-row { margin-top: 14px; }
.cleaner-check { display: flex; align-items: center; gap: 8px; margin-top: 13px; color: #d2d6cf; font-size: 13px; cursor: pointer; }
.cleaner-check input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); flex: 0 0 auto; }
.cleaner-icc { margin: 0 0 18px; }
#cleaner-progress { display: block; width: 100%; height: 7px; margin-top: 16px; accent-color: var(--accent); }
#cleaner-progress[hidden] { display: none; }
@media (max-width: 520px) { .cleaner-option-grid { grid-template-columns: 1fr; } }
.cleaner-dropzone {
  min-height: 210px;
  padding: 25px 18px;
  border: 1px dashed #768556;
  border-radius: 12px;
  background: #141a14;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-align: center;
  cursor: pointer;
}
.cleaner-dropzone:hover, .cleaner-dropzone.drag-over { border-color: var(--accent); background: #1c2517; }
.cleaner-dropzone strong { color: #f2f4ef; font-size: 18px; }
.cleaner-dropzone span { color: #afb4ad; font-size: 13px; }
.cleaner-pickers { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 9px; }
.cleaner-pickers .btn { margin: 0; }
input.cleaner-hidden-input[type=file] { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; clip-path: inset(50%); }
.cleaner-tool > .field-caption { margin: 12px 0 0; }
.cleaner-selection { margin-top: 20px; padding: 14px; border: 1px solid #3b4436; border-radius: 9px; background: #141a14; }
.cleaner-selection[hidden] { display: none; }
.cleaner-selection > div { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.cleaner-selection strong { color: #f0f3ea; }
.cleaner-selection button { border: 0; background: none; color: var(--accent); text-decoration: underline; }
.cleaner-selection ul { margin: 11px 0 0; padding-left: 20px; max-height: 140px; overflow: auto; color: #c1c7be; font-size: 13px; }
.cleaner-selection li { overflow-wrap: anywhere; }
.cleaner-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.cleaner-actions .btn { margin: 0; }
#cleaner-output-help { margin: 12px 0 0; }
.cleaner-downloads { margin-top: 17px; padding: 15px; border: 1px solid #3b4436; border-radius: 10px; background: #141a14; }
.cleaner-downloads[hidden] { display: none; }
.cleaner-downloads > strong { color: #f0f3ea; font-size: 15px; }
.cleaner-downloads p { margin: 5px 0 12px; color: #c1c7be; font-size: 13px; }
.cleaner-downloads ul { display: grid; gap: 8px; max-height: 280px; overflow: auto; margin: 0; padding: 0; list-style: none; }
.cleaner-downloads li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid #303a30; }
.cleaner-downloads li span { min-width: 0; overflow-wrap: anywhere; color: #e2e8de; font-size: 13px; }
.cleaner-downloads li .btn { flex: none; min-height: 38px; padding: 8px 11px; font-size: 12px; }
.cleaner-info { padding: 14px 0; }
.cleaner-info h2 {
  margin: 0 0 27px;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -.045em;
}
.cleaner-info ul {
  padding: 0 0 0 22px;
  margin: 0 0 30px;
  color: #e6e6e8;
  font-size: 14px;
  line-height: 1.7;
}
.cleaner-info li { margin-bottom: 16px; padding-left: 5px; }
.cleaner-info li::marker { color: var(--accent); }
.cleaner-info p {
  padding-top: 24px;
  border-top: 1px solid #36363a;
  color: #c5c9c5;
  font-size: 12px;
  line-height: 1.75;
}
.rights-note {
  margin: 18px 0;
  padding: 16px 18px;
  border: 1px solid #454d38;
  border-radius: 12px;
  background: #1c2118;
  color: #e5e8df;
  font-size: 14px;
  line-height: 1.55;
}
.rights-note strong { display: block; margin-bottom: 6px; color: #d3ff57; }
.rights-note p { margin: 0 0 14px; }
.rights-confirm { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; }
.rights-confirm input { width: 18px; height: 18px; flex: 0 0 18px; margin: 2px 0 0; accent-color: #d3ff57; }
.rights-confirm input:focus-visible { outline: 2px solid #d3ff57; outline-offset: 3px; }
@media (max-width: 1050px) {
  .app { grid-template-columns: 224px minmax(0, 1fr); }
  aside { width: 224px; padding-left: 12px; padding-right: 12px; }
  main { padding: 52px 32px 80px; }
  #dataset.panel.active, #identity .split, .cleaner-layout { grid-template-columns: 1fr; }
  #dataset .page-title { grid-column: 1; }
  #dataset > .card:last-of-type { border-left: 0; padding: 16px 4px; }
  .cleaner-info { max-width: 650px; }
}
@media (max-width: 720px) {
  .app { display: block; }
  aside {
    position: sticky;
    top: 0;
    z-index: 20;
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 15px 17px 0;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid #303035;
  }
  .brand { padding: 0 2px; margin-bottom: 14px; }
  .brand strong { font-size: 18px; }
  nav { flex-direction: row; overflow-x: auto; gap: 8px; }
  nav button {
    flex: 0 0 auto;
    width: auto;
    padding: 10px 11px 13px;
    border-radius: 11px 11px 0 0;
    font-size: 12px;
    white-space: nowrap;
  }
  .nav-index, .sidebar-note { display: none; }
  main { padding: 37px 19px 75px; }
  .page-title p { margin-bottom: 14px; }
  h1 { font-size: clamp(32px, 8vw, 44px); }
  .gate, .cleaner-tool { border-radius: 21px; padding: 24px; }
}
