:root {
  --bg: #171a19;
  --panel: #202423;
  --surface: #292e2c;
  --line: #373d39;
  --text: #eeeee5;
  --muted: #a3ada4;
  --accent: #ecb28f;
  --green: #bfcfb5;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Trebuchet MS", Verdana, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 var(--sans);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 5px;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  padding: 10px 14px;
}
button:hover {
  border-color: var(--accent);
  background: #ffffff07;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: inherit;
  text-decoration: none;
}
input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  color: var(--text);
}
textarea {
  resize: vertical;
}
select {
  max-width: 100%;
  text-overflow: ellipsis;
}
label {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
label input,
label select,
label textarea {
  margin-top: 7px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font: 38px/1.15 var(--serif);
  font-weight: 400;
  margin-bottom: 0;
}
h2 {
  font: 25px/1.25 var(--serif);
  font-weight: 400;
}
h3 {
  font-size: 16px;
  font-weight: 400;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 12px;
}
.primary {
  background: var(--accent);
  color: #24251e;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-height: 46px;
  border-radius: 7px;
  padding: 12px 21px;
  font-weight: bold;
}
.primary:hover {
  background: #f4c5a8;
}
.quiet {
  font-size: 12px;
}
.wordmark {
  font: 25px var(--serif);
  letter-spacing: -1px;
  white-space: nowrap;
}
.wordmark span {
  font-style: italic;
  color: var(--accent);
}
.wordmark i {
  font-style: normal;
  padding-left: 20px;
  color: var(--accent);
}
.rail {
  width: 110px;
  background: #141716;
  border-right: 1px solid var(--line);
  height: 100dvh;
  position: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 10px;
  z-index: 5;
}
.symbol {
  font-size: 42px;
  color: var(--accent);
  height: 75px;
}
.rail nav {
  width: 100%;
  margin-top: 15px;
}
.nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  border: 0;
  min-height: 65px;
  color: var(--muted);
  margin: 6px 0;
}
.nav span {
  font-size: 22px;
}
.nav.active {
  color: var(--accent);
  background: #ecb28f10;
}
.logout {
  margin-top: auto;
}
.workspace {
  margin-left: 110px;
}
.topbar {
  height: 80px;
  border-bottom: 1px solid var(--line);
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-right {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 12px;
  color: var(--muted);
}
#mobile-settings,
#close-settings {
  display: none;
}
.studio-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  min-height: calc(100dvh - 80px);
}
.stage {
  padding: 35px 36px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.stage-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.project-picker {
  max-width: 180px;
}
.results {
  flex: 1;
  min-height: 370px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}
.empty {
  padding: 35px 0;
  text-align: center;
  grid-column: 1/-1;
}
.empty-symbol {
  font: 70px var(--serif);
  color: var(--green);
  margin-bottom: 20px;
}
.empty h2 {
  font-size: 29px;
}
.empty p {
  color: var(--muted);
}
.suggestions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 25px;
  flex-wrap: wrap;
}
.suggestions button {
  font-size: 11px;
}
.composer {
  margin-top: 30px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.composer textarea {
  border: 0;
  background: transparent;
  padding: 5px;
  min-height: 80px;
  max-height: 300px;
  font-size: 15px;
}
.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}
.composer-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.attach {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  min-height: 42px;
  cursor: pointer;
  color: var(--text);
}
.composer .muted {
  margin: 12px 0 0;
}
.settings {
  background: var(--panel);
  border-left: 1px solid var(--line);
  padding: 28px 25px;
  overflow-wrap: anywhere;
}
.settings-header {
  display: flex;
  justify-content: space-between;
}
.settings h2 {
  font-size: 23px;
}
.settings > label {
  margin: 17px 0;
}
.segmented {
  display: flex;
  background: var(--bg);
  padding: 4px;
  border-radius: 8px;
  gap: 3px;
}
.segmented button {
  flex: 1;
  font-size: 12px;
  border: 0;
  padding: 8px;
}
.segmented .active {
  background: var(--surface);
  color: var(--accent);
}
.parameter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.parameter-grid .wide {
  grid-column: 1/-1;
}
.parameter-grid label {
  min-width: 0;
}
details {
  border-top: 1px solid var(--line);
  padding: 16px 0;
  margin-top: 18px;
}
summary {
  cursor: pointer;
  color: var(--text);
  min-height: 35px;
  font-size: 12px;
}
#advanced label {
  margin: 15px 0;
}
#advanced textarea {
  font: 12px monospace;
  min-height: 80px;
}
#advanced .muted {
  margin: 6px 0;
}
#prices {
  font-size: 11px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.preset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.settings > .muted {
  margin-top: 20px;
}
.references {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.reference {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  padding: 6px;
  border-radius: 8px;
  max-width: 100%;
  margin-bottom: 12px;
}
.reference img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 4px;
}
.reference select {
  width: 145px;
  font-size: 11px;
  margin: 0;
}
.reference button {
  padding: 4px 10px;
  min-width: 40px;
}
.job-status {
  border: 1px solid var(--line);
  padding: 13px;
  margin-top: 20px;
  border-radius: 8px;
  color: var(--green);
  font-size: 12px;
}
.media-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  overflow: hidden;
  min-width: 0;
}
.media-card img,
.media-card video {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  display: block;
  background: #111;
}
.media-card audio {
  width: 100%;
  margin: 15px 0;
}
.card-info {
  padding: 14px;
}
.card-info p {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.card-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.card-actions button,
.card-actions a {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.list-view {
  padding: 35px 36px;
  max-width: 1600px;
  margin: auto;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 20px;
}
.history-row,
.project-row,
.stats-row {
  padding: 20px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.history-row .card-actions {
  margin: 12px 0;
}
.history-row pre {
  white-space: pre-wrap;
  font: 12px var(--sans);
  color: var(--muted);
  max-height: 100px;
  overflow: auto;
}
.stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.stat-card {
  background: var(--panel);
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.stat-card strong {
  font: 30px var(--serif);
  display: block;
  margin: 10px 0;
}
.login {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-copy {
  padding: 8vh 12%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.login-copy .wordmark {
  margin-bottom: 55px;
}
.login h1 {
  font-size: clamp(60px, 7vw, 105px);
  letter-spacing: -4px;
  line-height: 0.98;
  margin: 10px 0 35px;
}
.login h1 em {
  color: var(--accent);
  font-weight: 400;
}
.intro {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}
.login-button {
  margin: 20px 0;
}
.login-art {
  position: relative;
  background: #b9c5ad;
  overflow: hidden;
  min-height: 100dvh;
}
.art-ring {
  border: 42px solid #283f34;
  border-radius: 50%;
  position: absolute;
  width: 65%;
  aspect-ratio: 1;
  top: 20%;
  left: 15%;
  box-shadow: 0 30px 50px #25342a24;
}
.ring-two {
  transform: translate(-17%, 18%) rotate(-30deg);
  border-color: #e8d7bc;
}
.ring-three {
  transform: translate(18%, 38%);
  border-color: #c58061;
}
.art-caption {
  position: absolute;
  bottom: 9%;
  left: 12%;
  font-size: 11px;
  letter-spacing: 3px;
  color: #2f4638;
}
.art-stamp {
  position: absolute;
  right: 10%;
  top: 8%;
  font: 55px/0.65 var(--serif);
  color: #2f4638;
}
dialog {
  max-width: min(1000px, 94vw);
  width: 900px;
  max-height: 90dvh;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 25px;
}
dialog::backdrop {
  background: #000a;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.modal-header button {
  font-size: 24px;
}
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.comparison img,
.comparison video {
  width: 100%;
  max-height: 70dvh;
  object-fit: contain;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 22px;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  max-width: 90vw;
  z-index: 100;
  box-shadow: 0 6px 30px #0005;
}
#load-more {
  margin-top: 25px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
}
[hidden] {
  display: none !important;
}
@media (max-width: 1200px) {
  .stage {
    padding: 25px;
  }
  .settings {
    padding: 25px 18px;
  }
  .studio-view {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  .stage-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  h1 {
    font-size: 32px;
  }
}
@media (max-width: 850px) {
  .rail {
    width: 75px;
    padding: 15px 5px;
  }
  .workspace {
    margin-left: 75px;
  }
  .nav {
    font-size: 9px;
  }
  .topbar {
    padding: 0 20px;
    height: 65px;
  }
  .studio-view {
    display: block;
    min-height: calc(100dvh - 65px);
  }
  .settings {
    display: none;
    position: fixed;
    z-index: 20;
    top: 0;
    bottom: 0;
    right: 0;
    width: min(380px, 100vw);
    overflow-y: auto;
    box-shadow: -20px 0 50px #0008;
  }
  .settings.open {
    display: block;
  }
  #mobile-settings,
  #close-settings {
    display: block;
  }
  .stage {
    padding: 25px 20px;
  }
  .results {
    min-height: 300px;
  }
  .top-right #user-name {
    display: none;
  }
  .login-copy {
    padding: 50px 10%;
  }
  .login-art {
    min-height: 100dvh;
  }
  .login h1 {
    font-size: 65px;
  }
  .login-copy .wordmark {
    margin-bottom: 35px;
  }
  .art-ring {
    border-width: 25px;
    width: 85%;
    left: 5%;
  }
  .stat-cards {
    grid-template-columns: 1fr;
  }
  .list-view {
    padding: 25px 20px;
  }
}
@media (max-width: 550px) {
  .rail {
    height: 65px;
    width: 100%;
    bottom: 0;
    top: auto;
    flex-direction: row;
    border-right: 0;
    border-top: 1px solid var(--line);
    padding: 3px 4px;
  }
  .symbol {
    display: none;
  }
  .logout {
    font-size: 10px;
    min-width: 40px;
    min-height: 40px;
    padding: 4px;
    margin: 0;
  }
  .rail nav {
    display: flex;
    margin: 0;
    height: 60px;
  }
  .nav {
    margin: 0;
    min-height: 55px;
    font-size: 9px;
    gap: 0;
    padding: 4px 0;
    flex: 1;
  }
  .nav span {
    font-size: 21px;
  }
  .workspace {
    margin-left: 0;
    padding-bottom: 65px;
  }
  .topbar {
    padding: 0 18px;
  }
  .wordmark {
    font-size: 23px;
  }
  .stage {
    padding: 22px 16px;
  }
  .stage-heading {
    gap: 15px;
    margin-bottom: 15px;
  }
  h1 {
    font-size: 29px;
  }
  .project-picker {
    max-width: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .project-picker select {
    margin: 0;
    flex: 1;
    min-width: 0;
  }
  .empty {
    padding: 25px 0;
  }
  .empty h2 {
    font-size: 26px;
  }
  .empty-symbol {
    font-size: 55px;
  }
  .suggestions button {
    padding: 7px 9px;
  }
  .composer {
    padding: 12px;
    margin-top: 20px;
  }
  .composer-footer {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .composer-tools {
    gap: 5px;
  }
  .composer .primary {
    margin-left: auto;
    min-width: 120px;
  }
  .reference {
    width: 100%;
  }
  .reference select {
    flex: 1;
    width: auto;
    min-width: 0;
  }
  .login {
    display: block;
  }
  .login-copy {
    min-height: 100dvh;
    padding: 50px 9%;
  }
  .login-art {
    display: none;
  }
  .login h1 {
    font-size: 78px;
  }
  .list-view {
    padding: 22px 16px;
  }
  .comparison {
    grid-template-columns: 1fr;
  }
  .modal-header h2 {
    font-size: 23px;
  }
  dialog {
    padding: 18px;
  }
  .gallery {
    gap: 15px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .empty-symbol {
    animation: arrive 0.7s ease-out;
  }
  .media-card {
    animation: arrive 0.25s ease-out;
  }
  @keyframes arrive {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

.result-media {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 16px;
}
.results > .card-actions {
  align-items: center;
}
