:root {
  --page: #f8f7f2;
  --cream: #f6f1e8;
  --cream-2: #fffef9;
  --ink: #141619;
  --ink-2: #25282c;
  --muted: #6f7782;
  --line: #ded7cc;
  --charcoal: #17191c;
  --charcoal-2: #202427;
  --mint: #16bec8;
  --mint-soft: #d9f6f8;
  --gold: #ff8518;
  --sky: #187f8c;
  --danger: #bb5545;
  --radius: 8px;
  --shadow: 0 24px 70px rgba(24, 25, 27, .15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--page);
  color: var(--ink);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

.icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-page {
  min-height: 100vh;
  display: grid;
  background:
    radial-gradient(circle at 20% 0%, rgba(22, 190, 200, .12), transparent 24%),
    radial-gradient(circle at 90% 10%, rgba(255, 133, 24, .12), transparent 28%),
    var(--page);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 84px 1fr;
  background:
    radial-gradient(circle at 12% 18%, rgba(22, 190, 200, .14), transparent 24%),
    radial-gradient(circle at 70% 18%, rgba(217, 154, 55, .08), transparent 28%),
    var(--charcoal);
  overflow: auto;
}

.auth-page > svg[width="0"] {
  position: absolute;
}

.auth-nav {
  padding: 14px 30px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  background: rgba(5, 8, 13, .96);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: relative;
  z-index: 10;
}

.brand-link {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 850;
}

.brand-link img {
  height: 54px;
  width: auto;
  display: block;
}

.auth-layout {
  min-height: calc(100vh - 84px);
  display: grid;
  grid-template-columns: minmax(420px, .86fr) minmax(420px, 1.14fr);
  overflow: visible;
}

.auth-panel-wrap {
  min-height: 0;
  padding: clamp(18px, 3vw, 38px);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 20px;
  border-right: 1px solid rgba(255, 255, 255, .08);
}

.auth-copy {
  width: min(100%, 460px);
  display: grid;
  gap: 12px;
}

.eyebrow {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(22, 190, 200, .28);
  border-radius: 999px;
  background: rgba(209, 246, 248, .75);
  color: #0b6d72;
  font-size: 13px;
  font-weight: 760;
}

.auth-copy h1 {
  margin: 0;
  max-width: 12ch;
  color: #f7f4ec;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: .96;
  letter-spacing: 0;
}

.auth-copy p {
  margin: 0;
  max-width: 54ch;
  color: #aeb5be;
  font-size: 15px;
  line-height: 1.45;
}

.auth-panel {
  width: min(100%, 430px);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
  background: rgba(246, 241, 232, .96);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .28);
  overflow: hidden;
}

.auth-art {
  min-height: 0;
  padding: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  background: #070a0e;
  overflow: hidden;
}

.line-field {
  position: relative;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 60% 35%, rgba(255, 255, 255, .03), transparent 45%),
    #070a0e;
  box-shadow: inset 0 0 120px rgba(0, 0, 0, .55);
}

.line-field::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 110%, rgba(0, 0, 0, .5), transparent 60%);
  pointer-events: none;
}

.flow-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.visual-core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 12px;
}

.visual-core-logo {
  width: 200px;
  height: auto;
  object-fit: contain;
}

.visual-core span {
  max-width: 24ch;
  color: rgba(216, 221, 227, .55);
  text-align: center;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
}

.panel-head {
  padding: 24px 24px 10px;
  border-bottom: 0;
  display: grid;
  gap: 6px;
}

.panel-head {
  padding-bottom: 4px;
}

.panel-head h2 {
  margin: 0 0 4px;
  font-size: 22px;
  line-height: 1.1;
}

.panel-head p {
  margin: 0;
  color: rgba(20, 22, 25, .45);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
}

.auth-body {
  padding: 14px 24px 24px;
  display: grid;
  gap: 14px;
}

.oauth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.oauth-stack {
  display: grid;
  gap: 10px;
}

.oauth-button {
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid #d4cdc5;
  border-radius: var(--radius);
  background: #fff;
  color: #1a1d21;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: background .12s, border-color .12s;
}

.oauth-button:hover {
  background: #f7f5f2;
  border-color: #c0b9b0;
}

.oauth-button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.provider-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn {
  min-height: 42px;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fffef9;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 820;
  text-decoration: none;
}

.btn.dark {
  color: #fff;
  background: var(--charcoal);
  border-color: var(--charcoal);
}

.btn.mint {
  color: #042e30;
  background: var(--mint);
  border-color: var(--mint);
}

.btn.soft {
  color: #042e30;
  background: var(--mint-soft);
  border-color: rgba(22, 190, 200, .28);
}

.btn.full {
  width: 100%;
}

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.auth-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius);
  background: #e8e0d3;
}

.auth-mode button {
  min-height: 34px;
  border-radius: 6px;
  background: transparent;
  color: #68625a;
  font-size: 12px;
  font-weight: 820;
}

.auth-mode button.active {
  color: #042e30;
  background: var(--mint-soft);
}

.signup-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.signup-fields .field:last-child {
  grid-column: 1 / -1;
}

.signup-fields[hidden] {
  display: none;
}

.field {
  display: grid;
  gap: 7px;
  color: #3c4146;
  font-size: 12px;
  font-weight: 780;
}

.field input,
.field select,
.field textarea,
.fake-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #ded5c9;
  border-radius: var(--radius);
  background: #fffef9;
  color: var(--ink);
  outline: 0;
  padding: 10px 11px;
}

.field textarea {
  min-height: 118px;
  resize: vertical;
  line-height: 1.45;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(22, 190, 200, .16);
}

.auth-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.auth-foot span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.auth-foot a,
.text-link {
  color: #0a6e76;
  font-weight: 800;
  text-decoration: none;
}

.forgot-link {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 13px;
  font-weight: 720;
  color: #9ca3ac;
  background: none;
  border: none;
  padding: 6px 0 0;
  cursor: pointer;
}

.forgot-link:hover {
  color: #f0ece4;
}

.notice {
  display: none;
  padding: 11px 12px;
  border-radius: var(--radius);
  background: var(--mint-soft);
  color: #065762;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 680;
}

.notice.show {
  display: block;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  background: var(--charcoal);
  color: #f7f4ec;
}

.app-rail {
  background: #111315;
  border-right: 1px solid rgba(255, 255, 255, .08);
  padding: 12px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
}

.rail-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--charcoal);
}

.rail-mark img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.rail-nav {
  display: grid;
  align-content: start;
  gap: 10px;
}

.rail-link {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: #969da7;
  text-decoration: none;
}

.rail-link.active {
  color: #042e30;
  background: var(--mint);
  box-shadow: 0 12px 28px rgba(22, 190, 200, .25);
}

.rail-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.rail-link.active:hover {
  color: #042e30;
  background: var(--mint);
}

.app-main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  background:
    radial-gradient(circle at 22% 0%, rgba(22, 190, 200, .12), transparent 34%),
    #1a1d20;
}

.app-topbar {
  min-height: 74px;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.app-title strong {
  display: block;
  font-size: 17px;
}

.app-title > span {
  display: block;
  margin-top: 4px;
  color: #9ca3ac;
  font-size: 12px;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px 7px 7px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: #f7f4ec;
  font-weight: 780;
  text-decoration: none;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--mint);
  color: #042e30;
  font-size: 12px;
  font-weight: 900;
}

.dashboard {
  padding: 26px;
  display: grid;
  gap: 22px;
  align-content: start;
}

.welcome {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.welcome h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 58px);
  line-height: .98;
  letter-spacing: 0;
}

.welcome p {
  margin: 8px 0 0;
  color: #aeb5be;
  line-height: 1.5;
}

.range-slicer {
  display: inline-grid;
  grid-template-columns: repeat(4, auto);
  gap: 3px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .08);
}

.range-slicer button {
  min-height: 30px;
  min-width: 48px;
  padding: 6px 12px;
  border-radius: 999px;
  background: transparent;
  color: #aeb5be;
  font-size: 12px;
  font-weight: 820;
}

.range-slicer button.active {
  background: #f6f1e8;
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, .04);
}

.metric,
.project-card,
.queue-card {
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .055);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .18);
}

.metric {
  min-height: 122px;
  padding: 16px;
  display: grid;
  align-content: space-between;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, .08);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.metric:last-child {
  border-right: 0;
}

.metric span {
  color: #aeb5be;
  font-size: 12px;
  font-weight: 720;
}

.metric strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.metric small {
  color: var(--mint);
  font-weight: 800;
}

.mini-chart {
  height: 34px;
  width: 100%;
  margin-top: 14px;
}

.mini-chart path,
.mini-chart polyline {
  fill: none;
  stroke: var(--mint);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mini-chart .muted-line {
  stroke: rgba(255, 255, 255, .22);
  stroke-dasharray: 8 8;
}

.spend-bar {
  height: 11px;
  margin-top: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, .12);
}

.spend-bar span {
  display: block;
  width: var(--value);
  height: 100%;
  background: linear-gradient(90deg, var(--mint), var(--gold));
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .48fr);
  gap: 26px;
  align-items: start;
}

.section-card {
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .045);
  overflow: hidden;
}

.section-card-head {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.section-card-head h2 {
  margin: 0;
  font-size: 18px;
}

.section-card-head span {
  color: #aeb5be;
  font-size: 12px;
}

.content-stack {
  display: grid;
  gap: 22px;
}

.project-list,
.queue-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.project-card {
  padding: 14px;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 14px;
}

.project-art {
  width: 64px;
  aspect-ratio: 1;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 38% 30%, rgba(255, 255, 255, .26), transparent 18%),
    var(--art);
  border: 1px solid rgba(255, 255, 255, .12);
}

.project-card strong,
.queue-card strong {
  display: block;
  font-size: 14px;
}

.project-card span,
.queue-card span {
  display: block;
  margin-top: 4px;
  color: #aeb5be;
  font-size: 12px;
}

.status-chip {
  min-height: 28px;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--mint-soft);
  color: #054950;
  font-size: 12px;
  font-weight: 820;
}

.queue-card {
  padding: 14px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.tool-card {
  min-height: 132px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .04);
  display: grid;
  align-content: space-between;
  color: #f7f4ec;
  text-decoration: none;
}

.tool-card .mini-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .08);
  color: var(--mint);
}

.tool-card strong {
  display: block;
  font-size: 14px;
}

.tool-card span {
  display: block;
  margin-top: 5px;
  color: #aeb5be;
  font-size: 12px;
  line-height: 1.4;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(360px, 1.1fr);
  gap: 14px;
}

.settings-form {
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.settings-form .field:nth-child(3),
.settings-form .field:nth-child(4),
.settings-form .btn,
.settings-form .notice {
  grid-column: 1 / -1;
}

.settings-list {
  display: grid;
  gap: 0;
}

.settings-list article {
  min-height: 72px;
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.settings-list strong,
.settings-list span {
  display: block;
}

.settings-list span {
  color: #aeb5be;
  text-align: right;
  font-size: 13px;
  line-height: 1.4;
}

.updates-list {
  display: grid;
  gap: 22px;
  padding: 14px;
}

.update-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
}

.update-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(22, 190, 200, .12);
  color: var(--mint);
}

.update-item time {
  display: block;
  color: #aeb5be;
  font-size: 12px;
}

.update-item strong {
  display: block;
  margin-top: 3px;
  color: #f7f4ec;
  font-size: 13px;
  line-height: 1.35;
}

.update-item p {
  margin: 5px 0 0;
  color: #aeb5be;
  font-size: 12px;
  line-height: 1.45;
}

.usage-bar {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, .12);
  margin-top: 10px;
}

.usage-bar span {
  display: block;
  height: 100%;
  width: var(--value);
  background: linear-gradient(90deg, var(--mint), var(--gold));
}

.studio-app {
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.creation-gate,
.video-planner {
  padding: 16px 18px 22px;
  display: grid;
  grid-template-columns: minmax(280px, .56fr) minmax(420px, .44fr);
  gap: 14px;
  align-items: end;
  background:
    radial-gradient(circle at 18% 0%, rgba(22, 190, 200, .12), transparent 30%),
    rgba(255, 255, 255, .025);
}

.creation-intro {
  display: grid;
  gap: 8px;
  max-width: 760px;
}

.creation-intro h1 {
  margin: 0;
  color: #f7f4ec;
  font-size: clamp(28px, 4vw, 44px);
  line-height: .98;
}

.creation-intro p {
  margin: 0;
  color: #aeb5be;
  line-height: 1.5;
  padding-bottom: 8px;
}

.creation-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: none;
}

.creation-card {
  min-height: 104px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .055);
  color: #f7f4ec;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  text-align: left;
  align-items: start;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .14);
}

.creation-card.active {
  border-color: rgba(22, 190, 200, .46);
  background:
    linear-gradient(135deg, rgba(22, 190, 200, .16), rgba(255, 255, 255, .055));
}

.creation-card.coming-soon {
  cursor: not-allowed;
  opacity: .62;
}

.creation-card small {
  margin-left: 6px;
  padding: 3px 6px;
  border-radius: 999px;
  color: #9de4ea;
  background: rgba(22, 190, 200, .12);
  font-size: 9px;
  text-transform: uppercase;
}

.creation-card .mini-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--mint);
  color: #042e30;
}

.creation-card strong {
  display: block;
  font-size: 16px;
}

.creation-card span span {
  display: block;
  margin-top: 5px;
  color: #aeb5be;
  font-size: 12px;
  line-height: 1.45;
}

.video-planner[hidden],
[hidden] {
  display: none !important;
}

.generator-work {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.composer {
  margin: 14px 18px 0;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .065);
  overflow: hidden;
}

.workflow-step {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  display: grid;
  gap: 14px;
}

.step-heading {
  display: flex;
  align-items: center;
  gap: 11px;
}

.step-heading > span {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #042e30;
  background: var(--mint);
  font-weight: 850;
}

.step-heading strong {
  display: block;
  color: #f7f4ec;
  font-size: 15px;
}

.step-heading p {
  margin: 3px 0 0;
  color: #9fa7b0;
  font-size: 12px;
}

.project-choice-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}

.project-limit {
  min-height: 44px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  color: #aeb5be;
  font-size: 12px;
  white-space: nowrap;
}

.inline-project-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto minmax(180px, .7fr);
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(22, 190, 200, .25);
  border-radius: var(--radius);
  background: rgba(22, 190, 200, .055);
}

.inline-project-form > span {
  color: #f0a98e;
  font-size: 12px;
  align-self: center;
}

.essential-controls {
  display: grid;
  grid-template-columns: minmax(220px, .6fr) minmax(360px, 1fr);
  gap: 10px;
}

.advanced-controls {
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, .1);
}

.advanced-controls summary {
  padding: 12px;
  color: #dce1e5;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.advanced-controls summary span {
  margin-left: 7px;
  color: #929ba5;
  font-size: 11px;
  font-weight: 600;
}

.advanced-grid {
  padding: 0 12px 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.prompt-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #c8ced6;
  font-size: 12px;
  font-weight: 760;
}

.prompt-toolbar > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.prompt-toolbar [data-prompt-count] {
  color: #9de4ea;
}

.prompt-feedback {
  min-height: 20px;
  color: #8f99a3;
  font-size: 12px;
}

.prompt-feedback.error {
  color: #f0a98e;
}

.prompt-list-preview {
  margin-top: 8px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  background: rgba(255,255,255,.025);
  max-height: 220px;
  overflow-y: auto;
}

.prompt-preview-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  font-size: 12px;
}

.prompt-preview-item:last-child { border-bottom: none; }

.prompt-pos {
  color: var(--mint);
  font-weight: 820;
  font-size: 12px;
  white-space: nowrap;
}

.prompt-pos small {
  color: #8f99a3;
  font-weight: 400;
  font-size: 11px;
}

.prompt-preview-text {
  color: #b8bec6;
  line-height: 1.4;
  word-break: break-word;
}

/* Skeleton loaders — shown in the static HTML so the first paint is an
   intentional shimmer instead of placeholder text that flashes then swaps. */
.skeleton,
.skeleton-text {
  background: linear-gradient(90deg, rgba(24,25,27,.06) 25%, rgba(24,25,27,.12) 37%, rgba(24,25,27,.06) 63%);
  background-size: 400% 100%;
  animation: sf-shimmer 1.4s ease infinite;
  border-radius: 8px;
}
.skeleton-text {
  display: inline-block;
  min-width: 40px;
  border-radius: 6px;
  color: transparent !important;
  user-select: none;
}
@keyframes sf-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton,
  .skeleton-text { animation: none; }
}

.ref-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ref-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--mint);
  color: #042e30;
  font-size: 10px;
  font-weight: 780;
  margin-left: 4px;
}
.style-lock-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7,10,11,.74);
  backdrop-filter: blur(7px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.style-lock-overlay[hidden] { display: none; }
.style-lock-dialog {
  width: min(460px, calc(100vw - 28px));
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  color: #f7f4ec;
  background: #202527;
  box-shadow: 0 35px 100px rgba(0,0,0,.55);
}
.style-lock-inner {
  padding: 20px;
  display: grid;
  gap: 16px;
}
.style-lock-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.style-lock-head h3 { margin: 0 0 5px; font-size: 17px; font-weight: 780; }
.style-lock-head p { margin: 0; font-size: 13px; color: #7e8791; line-height: 1.5; }
.style-lock-drop {
  border: 1px dashed rgba(255,255,255,.14);
  border-radius: var(--radius);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  display: grid;
  gap: 8px;
  place-items: center;
  color: #c8ced6;
  transition: border-color .14s, background .14s;
  user-select: none;
}
.style-lock-drop:hover,
.style-lock-drop.drag-over {
  border-color: var(--mint);
  background: rgba(22,190,200,.06);
}
.style-lock-drop strong { font-size: 14px; font-weight: 760; }
.style-lock-drop span { font-size: 12px; color: #7e8791; }
.style-lock-footer { display: flex; justify-content: flex-end; }
.feature-badge {
  font-size: 10px;
  font-weight: 720;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(22, 190, 200, .12);
  color: #9de4ea;
  text-transform: uppercase;
  letter-spacing: .04em;
  flex-shrink: 0;
}
.reference-bar-hint {
  font-size: 12px;
  color: #7e8791;
}
[data-reference-field].is-locked { opacity: .52; }
[data-reference-field].is-locked button[data-add-reference] { cursor: not-allowed; pointer-events: none; }

.reference-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.reference-thumb {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
}
.reference-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reference-thumb button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
}


.tabs {
  display: flex;
  gap: 4px;
  padding: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.tabs button {
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 6px;
  color: #9ca3ac;
  background: transparent;
  font-size: 12px;
  font-weight: 740;
}

.tabs button.active {
  color: #fff;
  background: rgba(255, 255, 255, .1);
}

.prompt-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  align-items: stretch;
}

.dark-field {
  display: grid;
  gap: 7px;
  color: #c8ced6;
  font-size: 12px;
  font-weight: 760;
}

.dark-field textarea,
.dark-field input,
.dark-field select {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius);
  background: #1b2021;
  color: #f6f4ef;
  outline: 0;
  padding: 11px 12px;
}

.dark-field select option {
  background: #15191b;
  color: #f6f4ef;
}

.dark-field textarea::placeholder,
.dark-field input::placeholder {
  color: #7f8892;
  opacity: 1;
  font-weight: 600;
}

.dark-field textarea {
  min-height: 128px;
  resize: vertical;
  line-height: 1.45;
}

.prompt-field textarea {
  min-height: 255px;
}

.style-field textarea {
  min-height: 88px;
}

.setup-strip {
  display: grid;
  grid-template-columns: minmax(170px, .9fr) minmax(170px, .9fr) minmax(230px, 1.2fr) minmax(150px, .75fr) minmax(210px, 1fr);
  gap: 10px;
  align-items: stretch;
}

.dark-segmented {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: #1b2021;
  padding: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}

.dark-segmented button {
  color: #c5ccd2;
  border-radius: 6px;
  background: transparent;
  font-weight: 820;
}

.dark-segmented button.active {
  color: #e6ffff;
  background: linear-gradient(135deg, rgba(22, 190, 200, .92), rgba(9, 110, 118, .92));
  box-shadow: 0 8px 22px rgba(22, 190, 200, .18);
}

.setup-stat {
  min-height: 70px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, .14);
  color: #f6f4ef;
  padding: 12px;
  display: grid;
  align-content: center;
  gap: 4px;
}

.setup-stat span {
  color: #aeb5be;
  font-size: 12px;
  font-weight: 760;
}

.setup-stat strong {
  font-size: 22px;
  line-height: 1;
}

.run-row {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, .35fr)) minmax(220px, .65fr);
  gap: 10px;
  align-items: stretch;
}

.project-picker {
  min-height: 70px;
  align-content: center;
}

.run-button {
  min-height: 70px;
  justify-content: center;
  color: #042e30;
  box-shadow: 0 18px 42px rgba(22, 190, 200, .2);
}

.run-button:disabled,
.section-card-actions .btn:disabled {
  cursor: not-allowed;
  opacity: .42;
  box-shadow: none;
}

.batch-summary {
  margin: 14px 18px 0;
  padding: 16px;
  border: 1px solid rgba(22, 190, 200, .28);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(22, 190, 200, .1), rgba(255, 255, 255, .04));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.batch-summary h2 {
  margin: 9px 0 4px;
  font-size: 18px;
}

.batch-summary p {
  margin: 0;
  color: #aeb5be;
  font-size: 12px;
}

.batch-summary-actions,
.output-actions {
  display: flex;
  gap: 8px;
}

.batch-counts {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.batch-counts span {
  padding: 8px;
  border-radius: 6px;
  color: #929ba5;
  background: rgba(0, 0, 0, .13);
  font-size: 10px;
  text-align: center;
}

.batch-counts strong {
  display: block;
  margin-bottom: 3px;
  color: #f6f4ef;
  font-size: 18px;
}

.expiration-note {
  margin: 12px 14px 0;
  padding: 9px 11px;
  border-radius: var(--radius);
  color: #e5c786;
  background: rgba(217, 154, 55, .1);
  font-size: 12px;
}

.output-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius);
  background: #202629;
}

.output-card img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  display: block;
  object-fit: cover;
}

.output-card.selected {
  border-color: var(--mint);
  box-shadow: 0 0 0 2px rgba(22, 190, 200, .2);
}

.output-select {
  position: absolute;
  top: 9px;
  left: 9px;
  width: 24px;
  height: 24px;
  accent-color: var(--mint);
}

.output-meta {
  position: absolute;
  inset: auto 0 0;
  padding: 26px 10px 10px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .86));
}

.output-meta strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.output-card-actions {
  display: flex;
  gap: 5px;
}

.output-card-actions button,
.output-card-actions a {
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 6px;
  color: #fff;
  background: rgba(15, 18, 20, .86);
}

.output-card.failed {
  padding: 20px;
  display: grid;
  place-items: center;
  text-align: center;
}

.output-card.failed p {
  color: #aeb5be;
  font-size: 12px;
}

.confirm-dialog {
  width: min(620px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius);
  color: #f7f4ec;
  background: #202527;
  box-shadow: 0 35px 100px rgba(0, 0, 0, .55);
}

.confirm-dialog::backdrop {
  background: rgba(7, 10, 11, .74);
  backdrop-filter: blur(7px);
}

.confirm-dialog form {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.confirm-head {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
}

.confirm-head span {
  color: #9de4ea;
  font-size: 11px;
  font-weight: 760;
}

.confirm-head h2 {
  margin: 3px 0 0;
  font-size: 21px;
}

.icon-button {
  width: 34px;
  height: 34px;
  color: #aeb5be;
  background: transparent;
  font-size: 24px;
}

.confirm-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: var(--radius);
  overflow: hidden;
}

.confirm-grid > div {
  padding: 12px;
  border-right: 1px solid rgba(255, 255, 255, .08);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.confirm-grid > div:nth-child(2n) { border-right: 0; }
.confirm-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
.confirm-grid span { display: block; color: #929ba5; font-size: 11px; }
.confirm-grid strong { display: block; margin-top: 4px; font-size: 15px; }

.retention-callout {
  padding: 12px;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  border-radius: var(--radius);
  color: #d7c69e;
  background: rgba(217, 154, 55, .09);
  font-size: 12px;
  line-height: 1.45;
}

.retention-callout strong { display: block; color: #f1dfb5; }
.confirm-error { padding: 10px; border-radius: var(--radius); color: #ffd0c2; background: rgba(192, 67, 42, .16); font-size: 12px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }

.resolution-field.is-disabled {
  opacity: .48;
}

.resolution-field.is-disabled select {
  cursor: not-allowed;
}

.run-card {
  border-radius: var(--radius);
  background: #f6f1e8;
  color: var(--ink);
  padding: 12px;
  display: grid;
  gap: 10px;
  align-content: space-between;
}

.run-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.generation-board {
  padding: 24px 18px 18px;
  display: grid;
  grid-template-columns: minmax(320px, .36fr) minmax(0, .64fr);
  gap: 12px;
  align-items: start;
}

.progress-feed,
.output-viewer {
  min-height: 260px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .045);
  overflow: hidden;
}

.feed-list {
  display: grid;
  gap: 0;
  padding: 8px 14px 14px;
}

.feed-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.feed-item:last-child {
  border-bottom: 0;
}

.feed-item > span {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: #7e8791;
}

.feed-item.done > span {
  background: var(--mint);
  box-shadow: 0 0 0 5px rgba(22, 190, 200, .12);
}

.feed-item.running > span {
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(217, 154, 55, .13);
}

.feed-item strong {
  display: block;
  font-size: 13px;
}

.feed-item p {
  margin: 4px 0 0;
  color: #aeb5be;
  font-size: 12px;
  line-height: 1.45;
}

.feed-item-list {
  border-top: 1px solid rgba(255,255,255,.06);
  max-height: 260px;
  overflow-y: auto;
}

.feed-item-prompt {
  display: grid;
  grid-template-columns: 12px 46px 1fr;
  gap: 8px;
  align-items: baseline;
  padding: 6px 14px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: 12px;
}

.feed-item-prompt:last-child { border-bottom: none; }

.feed-item-prompt > .feed-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  margin-top: 2px;
  flex-shrink: 0;
}

.feed-item-prompt.done > .feed-dot { background: var(--mint); }
.feed-item-prompt.running > .feed-dot { background: var(--gold); }
.feed-item-prompt.failed > .feed-dot { background: #e5836c; }

.prompt-item-pos {
  color: #8f99a3;
  font-size: 11px;
  font-weight: 820;
  white-space: nowrap;
}

.prompt-item-text {
  color: #c4cad2;
  line-height: 1.4;
  word-break: break-word;
}

/* Position badge on output cards */
.output-scene-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,.62);
  color: rgba(255,255,255,.9);
  font-size: 10px;
  font-weight: 820;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: .02em;
}

.topup {
  padding: 16px;
}

.topup h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.topup > p,
.topup [data-plan-description],
.topup [data-plan-renews-at] {
  margin: 0 0 12px;
  color: #8f99a3;
  font-size: 13px;
}

.topup-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,.08);
  margin: 18px 0;
}

.topup-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* Dark-themed buttons in the billing/topup section */
.topup .btn:not(.mint):not(.dark) {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
  color: #dce0e5;
}

.topup .btn:not(.mint):not(.dark):hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.18);
}

.output-grid {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.output-card,
.empty-output {
  min-height: 144px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .05);
  overflow: hidden;
}

.empty-output {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 22px;
}

.empty-output strong,
.empty-output span {
  display: block;
}

.empty-output span {
  max-width: 42ch;
  margin-top: 6px;
  color: #aeb5be;
  font-size: 13px;
  line-height: 1.45;
}

.output-card {
  position: relative;
  background: var(--art);
}

.output-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 45%, rgba(0,0,0,.72)),
    radial-gradient(circle at 36% 28%, rgba(255,255,255,.24), transparent 18%);
}

.output-card strong,
.output-card span {
  position: absolute;
  left: 10px;
  right: 10px;
  z-index: 1;
}

.output-card strong {
  bottom: 28px;
  color: #fff;
  font-size: 12px;
}

.output-card span {
  bottom: 9px;
  color: rgba(255,255,255,.78);
  font-size: 11px;
}

.image-grid {
  min-height: 0;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

.shot {
  position: relative;
  min-height: 158px;
  aspect-ratio: 16 / 11;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--art);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .22);
}

.shot.tall {
  grid-row: span 2;
  aspect-ratio: auto;
}

.shot::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 46%, rgba(0, 0, 0, .72)),
    radial-gradient(circle at 36% 28%, rgba(255, 255, 255, .26), transparent 18%),
    linear-gradient(90deg, rgba(0, 0, 0, .18), transparent 48%);
}

.shot .tag {
  position: absolute;
  top: 9px;
  left: 9px;
  min-height: 24px;
  padding: 5px 7px;
  border-radius: 999px;
  color: #101315;
  background: rgba(255, 255, 255, .82);
  font-size: 11px;
  font-weight: 820;
}

.shot strong {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 9px;
  color: #fff;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inspector {
  background: var(--cream);
  color: var(--ink);
  border-left: 1px solid rgba(255, 255, 255, .1);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-width: 0;
}

.inspector-head,
.cost,
.controls,
.export-panel {
  padding: 18px;
}

.inspector-head {
  border-bottom: 1px solid #e3dbce;
}

.inspector-head h2 {
  margin: 0;
  font-size: 20px;
}

.inspector-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.cost {
  border-bottom: 1px solid #e3dbce;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.cost span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.cost strong {
  display: block;
  margin-top: 4px;
  font-size: 34px;
  line-height: 1;
}

.credit-badge {
  padding: 7px 9px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e1d9cd;
  font-size: 12px;
  font-weight: 800;
  color: #66523c;
}

.controls {
  display: grid;
  gap: 14px;
  overflow: auto;
}

.style-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: var(--radius);
  background: #fffef9;
  border: 1px solid #ded5c9;
}

.style-swatch {
  aspect-ratio: 1;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(22, 190, 200, .82), transparent 48%),
    linear-gradient(45deg, rgba(187, 85, 69, .78), transparent 45%),
    linear-gradient(220deg, #ff8518, #16bec8);
}

.style-card strong {
  display: block;
  font-size: 13px;
}

.style-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 4px;
  background: #e8e0d3;
  border-radius: var(--radius);
}

.segmented button {
  min-height: 33px;
  border-radius: 6px;
  background: transparent;
  color: #68625a;
  font-size: 12px;
  font-weight: 800;
}

.segmented button.active {
  color: #042e30;
  background: var(--mint-soft);
  box-shadow: 0 10px 22px rgba(24, 25, 27, .08);
}

.segmented.dark-segmented {
  border: 1px solid rgba(255, 255, 255, .1);
  background: #1b2021;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}

.segmented.dark-segmented button {
  color: #c5ccd2;
  background: transparent;
}

.segmented.dark-segmented button.active {
  color: #e6ffff;
  background: linear-gradient(135deg, rgba(22, 190, 200, .92), rgba(9, 110, 118, .92));
  box-shadow: 0 8px 22px rgba(22, 190, 200, .18);
}

.check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #e3dbce;
  font-size: 13px;
  font-weight: 720;
}

.switch {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #c9c3bb;
  position: relative;
}

.switch::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #fff;
}

.switch.on {
  background: var(--mint);
}

.switch.on::after {
  transform: translateX(18px);
}

.export-panel {
  border-top: 1px solid #e3dbce;
  display: grid;
  gap: 10px;
}

@media (max-width: 1100px) {
  .auth-layout,
  .dashboard-grid,
  .settings-grid,
  .studio-app {
    grid-template-columns: 1fr;
  }

  .auth-panel-wrap {
    border-right: 0;
  }

  .auth-art,
  .auth-panel-wrap {
    min-height: auto;
  }

  .auth-layout {
    min-height: auto;
  }

  .line-field {
    min-height: 430px;
  }

  .metric-grid,
  .tool-grid,
  .generation-board,
  .setup-strip,
  .run-row,
  .image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .creation-gate,
  .video-planner {
    grid-template-columns: 1fr;
  }

  .inspector {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, .1);
  }

  .style-prefix {
    grid-template-columns: 1fr;
  }

  .project-picker {
    grid-column: 1 / -1;
  }
}

.project-folder-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.section-card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-card-actions > span {
  white-space: nowrap;
}

.project-create-form {
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(300px, 1.4fr) auto auto;
  align-items: end;
  gap: 10px;
  background: rgba(22, 190, 200, .055);
}

.project-create-form[hidden] {
  display: none;
}

.project-create-form p {
  margin: 0;
  color: #aeb5be;
  font-size: 12px;
  line-height: 1.45;
}

.project-form-message {
  display: block;
  margin-top: 4px;
  color: #f0a98e;
  font-size: 12px;
}

.project-folder-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.project-folder-actions .btn {
  min-height: 38px;
}

.project-folder,
.project-folder-empty {
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .035);
}

.project-folder-empty {
  padding: 24px;
  color: #aeb5be;
  text-align: center;
}

.project-folder summary {
  min-height: 74px;
  padding: 14px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  list-style: none;
}

.project-folder summary::-webkit-details-marker {
  display: none;
}

.folder-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: var(--mint);
  background: rgba(22, 190, 200, .12);
}

.project-folder summary strong,
.project-file-row strong {
  display: block;
  font-size: 14px;
}

.project-folder summary span span,
.project-file-row span span {
  display: block;
  margin-top: 4px;
  color: #aeb5be;
  font-size: 12px;
}

.project-folder-body {
  padding: 0 14px 14px 70px;
  display: grid;
  gap: 8px;
}

.project-file-row {
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, .14);
  color: #f6f4ef;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  text-align: left;
}

button.project-file-row {
  cursor: pointer;
}

@media (max-height: 860px) and (min-width: 1101px) {
  .auth-page {
    grid-template-rows: 68px 1fr;
  }

  .auth-nav {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .brand-link img {
    height: 46px;
  }

  .auth-layout {
    min-height: calc(100vh - 68px);
  }

  .auth-panel-wrap {
    padding-top: 18px;
    padding-bottom: 18px;
    gap: 12px;
    align-content: center;
  }

  .auth-copy {
    gap: 9px;
  }

  .auth-copy h1 {
    max-width: 15ch;
    font-size: clamp(28px, 3.2vw, 40px);
  }

  .auth-copy p {
    font-size: 14px;
    line-height: 1.38;
  }

  .auth-panel {
    width: min(100%, 410px);
  }

  .panel-head {
    padding: 16px 24px 6px;
  }

  .auth-panel-mark {
    width: 34px;
    height: 34px;
    margin-bottom: 6px;
  }

  .panel-head p {
    font-size: 21px;
  }

  .panel-head h2 {
    font-size: 22px;
  }

  .auth-body {
    padding: 10px 24px 18px;
    gap: 10px;
  }

  .oauth-button {
    min-height: 34px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .auth-mode button,
  .field input,
  .btn {
    min-height: 36px;
  }
}

@media (max-height: 760px) and (min-width: 1101px) {
  .auth-page {
    grid-template-rows: 60px 1fr;
  }

  .auth-nav {
    padding: 6px 22px;
  }

  .brand-link img {
    height: 40px;
  }

  .auth-layout {
    min-height: calc(100vh - 60px);
    grid-template-columns: 1fr;
  }

  .auth-panel-wrap {
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 10px;
    border-right: 0;
  }

  .auth-art {
    display: none;
  }

  .auth-copy .eyebrow,
  .auth-copy p {
    display: none;
  }

  .auth-copy {
    width: min(100%, 390px);
  }

  .auth-copy h1 {
    max-width: none;
    font-size: 28px;
    line-height: 1.05;
  }

  .auth-panel {
    width: min(100%, 390px);
  }

  .panel-head {
    padding: 12px 20px 4px;
  }

  .auth-panel-mark {
    width: 28px;
    height: 28px;
    margin-bottom: 4px;
  }

  .panel-head p {
    font-size: 18px;
  }

  .panel-head h2 {
    font-size: 20px;
  }

  .auth-body {
    padding: 8px 20px 14px;
    gap: 8px;
  }

  .oauth-stack {
    gap: 7px;
  }

  .oauth-button,
  .auth-mode button,
  .field input,
  .btn {
    min-height: 32px;
  }

  .field {
    gap: 5px;
  }

  .auth-foot {
    display: none;
  }
}

@media (max-width: 720px) {
  .auth-nav {
    padding: 12px 18px;
  }

  .auth-nav .btn {
    display: none;
  }

  .brand-link img {
    height: 48px;
    width: auto;
  }

  .auth-panel-wrap,
  .auth-art {
    padding: 22px;
  }

  .line-field {
    min-height: 360px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-rail {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: none;
    align-items: center;
  }

  .rail-nav {
    display: flex;
  }

  .metric-grid,
  .tool-grid,
  .creation-options,
  .signup-fields,
  .settings-form,
  .generation-board,
  .output-grid,
  .prompt-grid,
  .setup-strip,
  .run-row,
  .image-grid,
  .oauth-row {
    grid-template-columns: 1fr;
  }

  .welcome,
  .app-topbar,
  .project-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-card-head,
  .section-card-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-create-form {
    grid-template-columns: 1fr;
  }

  .project-choice-row,
  .inline-project-form,
  .essential-controls,
  .advanced-grid,
  .confirm-grid {
    grid-template-columns: 1fr;
  }

  .run-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .run-button {
    grid-column: 1 / -1;
  }

  .batch-summary,
  .prompt-toolbar,
  .section-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .confirm-grid > div,
  .confirm-grid > div:nth-child(2n),
  .confirm-grid > div:nth-last-child(-n+2) {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }

  .confirm-grid > div:last-child {
    border-bottom: 0;
  }
}
