/* Shared shell and media workspaces. */
:root {
  color-scheme: dark;
  --ink: #f4f0f4;
  --paper: #080708;
  --line: #271f27;
  --soft: #1e171d;
  --lime: #ef793f;
  --muted: #af91ad;
  --panel: #100c0f;
  --well: #1a151a;
  --mint: #f6854d;
}
body {
  background:
    radial-gradient(ellipse at 53% -7%, #1d161c 0, transparent 43rem),
    var(--paper);
  font-size: 14px;
  color: var(--ink);
}
header#header {
  position: sticky;
  top: 0;
  z-index: 12;
  width: 100%;
  height: 56px;
  min-height: 56px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  background: #0f0b0eed;
  backdrop-filter: blur(16px);
  border: 0;
}
a {
  color: inherit;
}
button,
.button {
  background: #1e171d;
  border: 1px solid #312731;
  border-radius: 9px;
  color: var(--ink);
  font-size: 14px;
}
button:hover,
.button:hover {
  background: #2d232c;
  border-color: #493a48;
}
.primary,
.button.primary {
  background: linear-gradient(115deg, #f79a6d, #d35415);
  color: #0c090c;
  border: 0;
  font-weight: 700;
}
.primary:hover {
  background: linear-gradient(115deg, #f9ae89, #e86b2d);
}
header .brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  font-size: 16px;
  font-weight: 850;
  letter-spacing: -0.045em;
}
.brand-disc {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e75f1d;
  color: #1b151a;
  font-size: 21px;
  line-height: 1;
  box-shadow: 0 0 22px #f26f2e34;
}
.utilities {
  justify-self: end;
  gap: 16px;
}
.utilities a {
  text-decoration: none;
}
.signin-link {
  color: #c3adc2;
  font-weight: 500;
}
.languages {
  border: 1px solid #433442;
  border-radius: 5px;
  display: flex;
  overflow: hidden;
}
.languages a {
  font-size: 12px;
  line-height: 18px;
  color: #a988a7;
  padding: 2px 8px;
}
.languages .on {
  color: var(--mint);
  background: #241d24;
}
.tool-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  justify-content: center;
}
.tool-nav a {
  position: relative;
  color: #b79cb5;
  font-size: 14px;
  font-weight: 550;
  height: 56px;
  display: grid;
  place-items: center;
  text-decoration: none;
}
.tool-nav a[aria-current] {
  color: #f5f1f5;
}
.tool-nav a[aria-current]:after {
  content: "";
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--mint);
}
.tool-nav svg {
  display: none;
}
.user-menu {
  position: relative;
}
.user-menu summary {
  background: var(--well);
  padding: 6px 10px;
  border-radius: 7px;
}
.user-menu > div {
  position: absolute;
  top: 105%;
  right: 0;
  padding: 9px;
  min-width: 150px;
  background: #1a151a;
  box-shadow: 0 10px 45px #0009;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
}
.user-menu a {
  padding: 6px;
}
main {
  color: var(--ink);
}
h1 {
  letter-spacing: -0.05em;
}
h2 {
  letter-spacing: -0.035em;
}
.surface,
.block,
.cards > article,
.admin details,
.preview {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 15px;
}
.dark {
  background: #211a21;
}
.card,
.form-card {
  border-radius: 16px;
}
.state {
  background: #1f181e;
  color: #e9bfaa;
  border-color: #655064;
}
.warn {
  color: #ffd6c7;
  background: #35241d;
  border-color: #c8734e;
}
.surface .button,
.preview .button:not(.primary) {
  color: var(--ink);
}
.surface .primary {
  color: #120e12;
}
input:not([type="checkbox"]),
select,
textarea {
  background: var(--well);
  color: var(--ink);
  border: 1px solid #362b36;
  border-radius: 8px;
}
input:focus,
select:focus,
textarea:focus {
  outline-color: var(--mint);
}
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}
.a11y {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  left: 12px;
  top: 8px;
  z-index: 20;
  color: black;
}
main.studio-page {
  width: 100%;
  max-width: none;
  padding: 12px;
  min-height: 0;
}
.lab-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr) 300px;
  align-items: stretch;
  gap: 12px;
  height: calc(100dvh - 80px);
  min-height: 470px;
}
.lab-layout > * {
  min-width: 0;
}
.lab-form,
.monitor,
.job-rail {
  border-radius: 16px;
  border: 1px solid #221b22;
  background: linear-gradient(145deg, #151014, #0f0b0e 170px);
  overflow: hidden;
}
.lab-form {
  display: flex;
  flex-direction: column;
  position: relative;
}
.lab-form #settings {
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #342833 transparent;
  flex: 1;
  padding: 16px 15px 12px;
}
.stage {
  margin: 0 0 32px;
}
.stage:last-child {
  margin-bottom: 7px;
}
.stage h2,
.panel-top {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #bba1b9;
  font-size: 12px;
  line-height: 18px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.045em;
}
.stage h2 {
  margin: 0 0 12px;
}
.stage h2 b {
  color: var(--mint);
  background: #271e26;
  border-radius: 5px;
  padding: 1px 5px;
  letter-spacing: 0.035em;
}
.stage h2 small {
  margin-left: auto;
  color: #a582a2;
  font-size: 11px;
}
.model-menu {
  position: relative;
  margin-bottom: 9px;
}
.model-menu summary {
  list-style: none;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  background: #1d171d;
  border-radius: 8px;
  padding: 9px 12px;
  line-height: 1.3;
}
.model-menu summary::-webkit-details-marker {
  display: none;
}
.model-menu summary strong,
.model-options b {
  font-size: 13px;
}
.model-menu summary small,
.model-menu summary > span:last-child,
.model-options small {
  color: #ae90ac;
  font-size: 11px;
}
.model-menu summary small {
  display: block;
  margin-top: 1px;
}
.model-options {
  display: grid;
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: calc(100% + 3px);
  padding: 5px;
  background: #1d171d;
  border: 1px solid #40333f;
  box-shadow: 0 12px 28px #0008;
  border-radius: 9px;
}
.model-options button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  text-align: left;
  background: transparent;
  padding: 8px;
}
.model-options button[aria-pressed="true"] {
  color: var(--mint);
  background: #30252f;
}
.segment {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: #191419;
  border-radius: 9px;
}
.segment button {
  background: transparent;
  flex: 1;
  padding: 4px 3px;
  min-width: 0;
  color: #b498b2;
  border: 1px solid transparent;
  font-size: 12px;
  line-height: 16px;
  border-radius: 6px;
}
.segment button[aria-pressed="true"] {
  background: #281f27;
  color: #fabd9f;
  border-color: #4c3c4b;
}
.setting {
  display: block;
  margin: 0 0 10px;
  color: #ab8ba9;
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.setting > span:not(.range):first-child {
  display: block;
  margin-bottom: 4px;
}
.setting .range {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 9px;
}
.range input[type="range"] {
  padding: 0;
  accent-color: #f18854;
  border: 0;
  width: 0;
  flex: 1;
}
.range output {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  color: #e2d8e2;
}
.check,
.check input {
  accent-color: var(--mint);
}
.stage textarea {
  background: #1a1419;
  width: 100%;
  min-height: 138px;
  border: 1px solid transparent;
  padding: 12px;
  font-size: 15px;
  border-radius: 8px;
  display: block;
}
.stage textarea::placeholder {
  color: #a17d9e;
}
.counter,
.extract-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.counter {
  color: #a684a4;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 10px 0;
}
.extract-link {
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  color: #e8e0e8;
  background: #1b161b;
}
.shot-presets {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
.shot-presets select {
  margin-top: 6px;
}
.upload-block {
  padding: 2px 0 0;
  min-width: 0;
}
.upload-block.dragging {
  background: #282028;
  outline: 1px dashed var(--mint);
}
.upload-block p {
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
  color: #ac8caa;
  margin: 8px auto 0;
}
.tiles {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.file-tile,
.picked {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #1a151a;
  min-width: 70px;
  min-height: 52px;
  padding: 7px;
  flex: 1;
}
.file-tile {
  cursor: pointer;
  overflow: hidden;
  gap: 2px;
  text-align: center;
}
.file-tile input,
.bulk input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.file-tile:focus-within,
.bulk:focus-within {
  outline: 2px solid var(--mint);
}
.file-tile span {
  background: #271e26;
  border-radius: 50%;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  font-size: 16px;
}
.file-tile small,
.picked small {
  font-size: 10px;
  line-height: 1.15;
  color: #c7b1c5;
}
.portrait-tiles .file-tile,
.portrait-tiles .picked {
  flex: 0 0 72px;
  width: 72px;
  height: 96px;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.picked {
  padding: 0;
  overflow: hidden;
}
.picked > button:first-child {
  border: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  min-height: 48px;
  display: grid;
  overflow: hidden;
  background: none;
}
.picked img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.picked .remove {
  position: absolute;
  right: 2px;
  top: 2px;
  font-size: 16px;
  padding: 0;
  width: 23px;
  height: 23px;
  background: #0d0a0dd9;
  border-radius: 20px;
}
.pair-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 6px;
  background: #181318;
  border-radius: 8px;
}
.pair-row > .upload-block {
  flex: 1;
}
.pair-row button {
  padding: 4px 6px;
}
.bulk {
  position: relative;
  display: inline-flex;
  padding: 8px 10px;
  margin-top: 5px;
  overflow: hidden;
  font-size: 12px;
}
.launch {
  background: linear-gradient(180deg, #100d10ed, #100c0f);
  border-top: 1px solid #312630;
  padding: 10px 15px 15px;
  display: grid;
  gap: 6px;
}
.launch .primary {
  width: 100%;
  border-radius: 30px;
  min-height: 52px;
  font-size: 15px;
  box-shadow: 0 0 20px #db612525;
  gap: 6px;
}
.launch #cost {
  opacity: 0.85;
}
.launch > small,
.launch .check {
  font-size: 12px;
  line-height: 1.35;
  color: #b598b3;
}
.launch .warn {
  font-size: 12px;
  margin: 0;
}
.panel-top {
  height: 49px;
  padding: 0 20px;
  justify-content: space-between;
  background: #0d0a0d;
}
.panel-top a {
  text-transform: none;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0;
  color: #f6f3f6;
}
.monitor {
  background: radial-gradient(ellipse at top, #161216, #080708 60%);
  display: flex;
  flex-direction: column;
}
.monitor #preview {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 16px;
}
.empty-output {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
  text-align: center;
  height: 100%;
  color: #b598b3;
}
.empty-output .empty-frame {
  height: 65%;
  aspect-ratio: 9/16;
  max-width: 74%;
  background: #110e11;
  border-radius: 11px;
  margin: 0 auto 16px;
}
.empty-output h3 {
  color: #f4eff3;
  font-size: 16px;
}
.empty-output p,
.empty-output small {
  max-width: 39ch;
  font-size: 14px;
}
.job-rail {
  overflow: auto;
}
.job-rail .panel-top {
  height: 42px;
  background: transparent;
  padding: 0 15px;
}
.job-rail #recent {
  padding: 20px 15px;
  color: #aa89a7;
  font-size: 12px;
}
.job-rail #recent button {
  width: 100%;
  margin-bottom: 7px;
}
.studio-page ~ footer {
  display: none;
}
.monitor .result {
  padding: 8px 4px;
}
.monitor .row {
  gap: 5px;
  margin: 8px 0;
}
.monitor .row .button,
.monitor .row button {
  font-size: 12px;
  padding: 6px;
}
.file-dialog,
.library-dialog {
  position: fixed;
  background: #161116;
  border: 1px solid #4a3b49;
  border-radius: 14px;
  color: white;
  padding: 20px;
  max-width: min(700px, 90vw);
  max-height: 85vh;
}
.file-dialog > button {
  display: block;
  margin: 0 0 8px auto;
}
.file-dialog img,
.file-dialog video {
  display: block;
  max-width: 100%;
  max-height: 64vh;
}
.library-choices {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}
dialog::backdrop {
  background: #000b;
}
.review-page .lab-layout {
  height: auto;
  min-height: calc(100dvh - 80px);
}
.review-page .monitor {
  min-height: 560px;
}
.review-page .empty-output .empty-frame {
  display: none;
}
.metadata-page {
  width: min(1080px, 94%);
  padding: 32px 0;
}
.metadata-page h1 {
  font-size: 32px;
  margin-top: 0;
}
.meta-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 15px;
  align-content: start;
}
.meta-workbench > h2,
.meta-workbench > p:first-of-type {
  display: none;
}
.meta-drop,
.meta-workbench fieldset,
.meta-workbench [data-field="media"] {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  padding: 20px;
  margin: 0;
}
.meta-drop {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 9px;
  position: relative;
  cursor: pointer;
  text-align: center;
}
.meta-drop:before {
  content: "↑";
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--mint);
  background: #231c23;
  border: 1px solid #493a48;
  border-radius: 50%;
  font-size: 24px;
}
.meta-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.meta-drop:focus-within {
  outline: 2px solid var(--mint);
}
.meta-drop span {
  color: var(--muted);
}
.meta-workbench fieldset {
  grid-column: 2;
  grid-row: 1;
}
.meta-workbench fieldset legend {
  float: left;
  width: 100%;
  font-weight: 650;
  padding: 0 0 12px;
}
.meta-fields {
  clear: both;
}
.meta-workbench [data-field="export"] {
  min-height: 48px;
}
.meta-workbench video {
  width: 100%;
  max-height: 360px;
}
.meta-workbench > * {
  margin: 0;
}
#toast {
  background: #2a2129;
  border: 1px solid #534152;
  border-radius: 10px;
}
@media (max-width: 1199px) and (min-width: 901px) {
  .lab-layout {
    grid-template-columns: 310px minmax(0, 1fr) 200px;
    gap: 8px;
  }
  .tool-nav {
    gap: 20px;
  }
}
@media (max-width: 900px) {
  body {
    padding-bottom: 78px;
  }
  header#header {
    height: 54px;
    min-height: 54px;
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
    position: sticky;
    backdrop-filter: none;
    background: #100d10;
  }
  header .brand {
    font-size: 14px;
  }
  .brand-disc {
    height: 19px;
    width: 19px;
    font-size: 17px;
  }
  .tool-nav {
    position: fixed;
    z-index: 15;
    left: 12px;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    height: 65px;
    display: flex;
    justify-content: space-around;
    gap: 0;
    border: 1px solid #352934;
    border-radius: 36px;
    background: #110d11f5;
    box-shadow: 0 4px 24px #0008;
    backdrop-filter: blur(14px);
  }
  .tool-nav a {
    flex: 1;
    height: 100%;
    align-content: center;
    gap: 5px;
    font-size: 10px;
  }
  .tool-nav svg {
    display: block;
  }
  .tool-nav a[aria-current]:after {
    top: 3px;
    bottom: auto;
    left: 38%;
    right: 38%;
    height: 2px;
  }
  .utilities {
    gap: 12px;
  }
  .languages a {
    font-size: 11px;
  }
  .lab-layout {
    display: flex;
    height: auto;
    min-height: 0;
    flex-direction: column;
    gap: 10px;
  }
  .lab-form,
  .monitor,
  .job-rail {
    border-radius: 0;
    border: 0;
  }
  .lab-form {
    overflow: visible;
  }
  .lab-form #settings {
    padding: 16px;
    overflow: visible;
  }
  .studio-page .lab-form {
    background: transparent;
  }
  main.studio-page {
    padding: 0 0 115px;
  }
  .monitor {
    min-height: 320px;
  }
  .empty-output {
    min-height: 260px;
  }
  .empty-output .empty-frame {
    height: 110px;
    margin: 5px;
  }
  .launch {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(76px + env(safe-area-inset-bottom));
    z-index: 11;
    padding: 8px 16px 12px;
    max-height: 160px;
    overflow: auto;
    box-shadow: 0 -6px 20px #0003;
    background: #100d10f7;
  }
  .launch .primary {
    min-height: 52px;
  }
  .launch {
    padding-top: 13px;
    padding-bottom: 17px;
    background: #100d10;
  }
  .stage textarea {
    min-height: 154px;
    font-size: 16px;
  }
  .lab-form #settings {
    padding-bottom: 18px;
  }
  .stage {
    margin-bottom: 32px;
  }
  .studio-page {
    scroll-padding-bottom: 200px;
  }
  .studio-page :is(input, textarea, select, button) {
    scroll-margin-bottom: 205px;
  }
  .job-rail {
    min-height: 100px;
  }
  .studio-page .history {
    padding: 16px;
  }
  .metadata-page {
    width: auto;
    margin: 0;
    padding: 30px 16px 16px;
  }
  .metadata-page h1 {
    font-size: 28px;
  }
  .meta-workbench {
    grid-template-columns: minmax(0, 1fr);
  }
  .meta-workbench fieldset {
    grid-row: auto;
    grid-column: auto;
  }
  .meta-workbench label {
    margin: 0;
  }
  .meta-workbench .meta-drop {
    margin: 0;
  }
  .review-page .monitor {
    min-height: 280px;
  }
  #toast {
    bottom: 160px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

.model-menu summary {
  padding: 7px 12px;
}
.stage {
  margin-bottom: 29px;
}
.stage h2 {
  margin-bottom: 11px;
}
.model-menu summary strong {
  font-weight: 650;
}
.empty-output .empty-frame {
  height: 68%;
}
.studio-page .shot-presets {
  margin-top: 14px;
}
.device-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.device-presets button {
  padding: 5px 9px;
}
.device-presets button[aria-pressed="true"] {
  background: #2b222a;
  color: #f7b99a;
}
.device-extra {
  margin: 12px 0;
  font-size: 12px;
  color: var(--muted);
}
.device-extra label {
  margin: 9px 0;
}
.meta-workbench fieldset button.primary {
  width: 100%;
  margin-top: 16px;
}
.analysis-demo {
  padding: 0 8px;
}
.demo-note {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}
.demo-note b {
  color: var(--mint);
  background: #261e26;
  padding: 2px 6px;
  border-radius: 5px;
}
.sample-clip video {
  max-width: 100%;
  max-height: 380px;
}
.sample-clip {
  margin: 12px 0;
}
.review-page .monitor {
  overflow: visible;
}
.review-page .launch {
  margin-top: auto;
}
@media (max-width: 900px) {
  body:has(.studio-page) {
    background:
      radial-gradient(ellipse 620px 230px at 50% 40px, #1a1419, transparent),
      #0c0a0c;
  }
  .empty-output .empty-frame {
    height: 110px;
  }
  .lab-form #settings {
    padding-top: 17px;
  }
}
