* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --page: #eeece5;
  --paper: #fbfaf6;
  --panel: #ffffff;
  --ink: #151515;
  --charcoal: #20201e;
  --carbon: #11110f;
  --muted: #676159;
  --soft: #91887b;
  --line: #ded8ce;
  --line-strong: #bfb5a8;
  --accent: #23614d;
  --accent-strong: #123f32;
  --accent-soft: #e6eee8;
  --gold: #9a7137;
  --green: #177245;
  --red: #b42318;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 26px 80px rgba(29, 27, 23, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(21, 21, 21, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(21, 21, 21, 0.035) 1px, transparent 1px),
    var(--page);
  background-size: 56px 56px, 56px 56px, auto;
  color: var(--ink);
  font-family: "Aptos", "Segoe UI Variable", "Helvetica Neue", Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0;
}

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

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

[hidden] {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  isolation: isolate;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 72px;
  padding: 14px clamp(18px, 3.6vw, 54px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(238, 236, 229, 0.88);
  border-bottom: 1px solid rgba(191, 181, 168, 0.6);
  backdrop-filter: blur(20px) saturate(140%);
}

.brand,
.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  color: var(--ink);
  font-weight: 820;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--carbon);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.top-actions {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.top-actions a {
  transition: color 180ms ease, opacity 180ms ease;
}

.top-actions a:hover {
  color: var(--ink);
}

.balance-pill {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(35, 97, 77, 0.26);
  border-radius: 999px;
  color: var(--accent-strong);
  background: rgba(230, 238, 232, 0.88);
  display: inline-flex;
  align-items: center;
  font-weight: 850;
  white-space: nowrap;
}

.account-menu {
  position: relative;
}

.account-menu-btn {
  min-height: 40px;
  padding: 0 14px 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 14px 34px rgba(29, 27, 23, 0.08);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.account-menu-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(35, 97, 77, 0.38);
  background: var(--paper);
}

.account-menu-btn.signed-in {
  border-color: rgba(35, 97, 77, 0.35);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.account-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--carbon);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.account-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: min(390px, calc(100vw - 32px));
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 250, 246, 0.98);
  box-shadow: 0 34px 90px rgba(17, 17, 15, 0.22);
  z-index: 60;
}

.account-popover[hidden] {
  display: none;
}

.workspace {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 42px) clamp(16px, 3.5vw, 52px) 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 360px);
  gap: clamp(18px, 2vw, 28px);
  align-items: start;
}

.composer,
.side-panel > section,
.jobs-panel {
  border: 1px solid rgba(191, 181, 168, 0.78);
  background: rgba(251, 250, 246, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.composer {
  overflow: hidden;
  padding: 0;
}

.section-head {
  position: relative;
  max-width: none;
  margin: 0;
  padding: clamp(30px, 5vw, 58px);
  color: #f7f3ea;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(135deg, #10100e 0%, #20231f 62%, #123f32 100%);
  background-size: 44px 44px, 44px 44px, auto;
}

.section-head::after {
  content: "";
  position: absolute;
  right: clamp(24px, 5vw, 72px);
  bottom: clamp(22px, 4vw, 52px);
  width: min(34vw, 360px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(247, 243, 234, 0.72));
}

.section-head .eyebrow {
  border-color: rgba(247, 243, 234, 0.24);
  color: #dce8de;
  background: rgba(255, 255, 255, 0.08);
}

.section-head h1 {
  max-width: 780px;
  color: #fffdf8;
}

.section-head p {
  max-width: 740px;
  color: rgba(247, 243, 234, 0.75);
}

.head-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.head-metrics span {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(247, 243, 234, 0.18);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(247, 243, 234, 0.76);
  background: rgba(255, 255, 255, 0.07);
  font-size: 13px;
}

.head-metrics strong {
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 0 10px;
  border: 1px solid rgba(35, 97, 77, 0.26);
  border-radius: 999px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

h1 {
  margin: 20px 0 14px;
  font-size: clamp(36px, 5vw, 76px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.12;
}

p {
  color: var(--muted);
  line-height: 1.58;
}

.mode-tabs {
  position: sticky;
  top: 72px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  padding: 12px clamp(18px, 3vw, 34px);
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: rgba(251, 250, 246, 0.94);
  backdrop-filter: blur(18px);
}

.mode-tab {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 850;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.mode-tab:hover {
  color: var(--ink);
}

.mode-tab.active {
  background: var(--carbon);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(17, 17, 15, 0.18);
}

.mode-tab:active,
.primary-btn:active,
.secondary-btn:active,
.google-btn:active,
.download-btn:active {
  transform: translateY(1px);
}

.mode-panel {
  display: none;
}

.mode-panel.active {
  display: grid;
}

.form-grid {
  gap: 18px;
  padding: clamp(22px, 3vw, 38px);
}

.field {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.field span {
  color: var(--charcoal);
  font-size: 14px;
  font-weight: 850;
}

.field small {
  color: var(--soft);
  line-height: 1.48;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  padding: 13px 14px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input[type="file"] {
  min-height: 48px;
  background: var(--paper);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(35, 97, 77, 0.82);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(35, 97, 77, 0.12);
}

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

.submit-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.primary-btn,
.secondary-btn {
  min-height: 46px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 850;
  padding: 0 20px;
  white-space: nowrap;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.primary-btn {
  border: 0;
  background: var(--carbon);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(17, 17, 15, 0.18);
}

.primary-btn:hover {
  background: var(--accent-strong);
}

.secondary-btn {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.secondary-btn:hover {
  border-color: rgba(35, 97, 77, 0.34);
  background: var(--paper);
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.form-status {
  margin: 0;
  color: var(--gold);
  font-weight: 800;
}

.form-status[data-tone="error"] {
  color: var(--red);
}

.form-status[data-tone="success"] {
  color: var(--green);
}

.model-flow-note {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid rgba(154, 113, 55, 0.24);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.94), rgba(251, 250, 246, 0.88));
}

.model-flow-note strong {
  color: #714312;
}

.model-flow-note span {
  color: var(--muted);
  line-height: 1.48;
}

.storyboard-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(35, 97, 77, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(35, 97, 77, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(35, 97, 77, 0.05) 1px, transparent 1px),
    #f4f8f4;
  background-size: 34px 34px, 34px 34px, auto;
}

.storyboard-panel[hidden] {
  display: none;
}

.storyboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.storyboard-head h2 {
  margin-top: 8px;
  font-size: 20px;
}

.analysis-meta {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(154, 113, 55, 0.24);
  border-radius: 999px;
  color: #714312;
  background: #fffbeb;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.shot-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.shot-card {
  min-height: 128px;
  padding: 14px;
  border: 1px solid rgba(191, 181, 168, 0.78);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.84);
}

.shot-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.shot-card-head strong,
.shot-card-head span,
.shot-card small {
  overflow-wrap: anywhere;
}

.shot-card-head span {
  color: #714312;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.shot-card p {
  margin: 8px 0 6px;
  color: var(--muted);
}

.shot-card small {
  color: var(--soft);
  line-height: 1.45;
}

.model-builder {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(191, 181, 168, 0.78);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.42);
}

.model-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.model-refs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.model-ref {
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--panel);
}

.model-ref img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--carbon);
}

.model-ref span {
  display: block;
  padding: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.side-panel {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
}

.side-panel > section {
  padding: 22px;
}

.auth-card {
  display: grid;
  gap: 12px;
}

.auth-card h2 {
  font-size: 20px;
}

.auth-card p {
  margin: 0;
}

.auth-form,
.auth-session,
.auth-actions {
  display: grid;
  gap: 10px;
}

.signed-in-box {
  border: 1px solid rgba(35, 97, 77, 0.24);
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: grid;
  gap: 4px;
}

.signed-in-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.signed-in-box strong {
  display: block;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.google-btn {
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 850;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.google-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.google-mark {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #ffffff;
  color: #1a73e8;
  display: inline-grid;
  place-items: center;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(7, 18, 33, 0.14);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

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

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

.auth-card .primary-btn,
.auth-card .secondary-btn,
.auth-card .google-btn {
  width: 100%;
}

.account-card {
  background:
    linear-gradient(135deg, rgba(17, 17, 15, 0.96), rgba(32, 35, 31, 0.94)),
    var(--carbon) !important;
  color: #fffdf8;
}

.account-card .eyebrow {
  border-color: rgba(255, 255, 255, 0.18);
  color: #dce8de;
  background: rgba(255, 255, 255, 0.08);
}

.account-card strong {
  display: block;
  margin-top: 18px;
  font-size: clamp(34px, 4vw, 48px);
  color: #fffdf8;
}

.account-card p {
  color: rgba(255, 253, 248, 0.72);
}

.account-card .secondary-btn {
  width: 100%;
  margin-top: 14px;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.rules-card h2 {
  font-size: 24px;
}

.rules-card ul {
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
  color: var(--muted);
  line-height: 1.52;
}

.rules-card li {
  position: relative;
  padding: 13px 0 13px 22px;
  border-top: 1px solid var(--line);
}

.rules-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
}

.jobs-panel {
  grid-column: 1 / -1;
  padding: 22px;
}

.jobs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.jobs-head h2 {
  margin-top: 8px;
}

.jobs-list {
  display: grid;
  gap: 12px;
}

.job-row,
.empty-state {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
  border-radius: var(--radius);
  padding: 16px;
}

.job-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.job-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.job-main strong,
.job-main span {
  display: block;
}

.job-main span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.job-actions {
  display: flex;
  gap: 8px;
}

.job-preview {
  grid-column: 2 / -1;
  width: min(420px, 100%);
  margin-top: 4px;
}

.job-preview video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--carbon);
}

.download-btn {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--accent-strong);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  font-weight: 850;
}

.empty-state {
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .account-menu-btn,
  .top-actions a,
  .mode-tab,
  input,
  select,
  textarea,
  .primary-btn,
  .secondary-btn {
    transition: none;
  }
}

@media (max-width: 1120px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .account-menu {
    margin-left: auto;
  }

  .workspace,
  .inline-fields,
  .model-refs,
  .shot-list {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }

  .job-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .job-actions,
  .job-preview {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  body {
    overflow-x: hidden;
  }

  .topbar {
    min-height: 64px;
    padding: 12px 16px;
    gap: 12px;
  }

  .brand span:last-child {
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .top-actions a {
    display: none;
  }

  .top-actions {
    display: flex;
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    gap: 10px;
    justify-content: flex-start;
    overflow: visible;
  }

  .account-menu {
    order: -1;
    margin-left: 0;
    flex: 0 0 auto;
  }

  .balance-pill {
    max-width: 152px;
    flex: 0 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
  }

  #accountMenuLabel {
    display: none;
  }

  .account-menu-btn {
    padding-right: 8px;
  }

  .workspace {
    padding-inline: 12px;
    padding-bottom: 34px;
    overflow: hidden;
  }

  .section-head {
    padding: 24px 20px 28px;
  }

  .section-head::after {
    display: none;
  }

  h1 {
    max-width: 310px;
    font-size: clamp(30px, 8.6vw, 36px);
    line-height: 1.08;
    overflow-wrap: normal;
  }

  .section-head p {
    max-width: 310px;
    font-size: 15px;
  }

  .head-metrics {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 310px;
  }

  .mode-tabs {
    position: static;
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .form-grid {
    padding: 18px;
  }

  .submit-row {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn,
  .google-btn {
    width: 100%;
  }

  .storyboard-head,
  .jobs-head {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-actions {
    grid-template-columns: 1fr;
  }
}

/* Restored premium app workspace */
:root {
  color-scheme: dark;
  --page: #07080d;
  --paper: rgba(16, 18, 27, 0.82);
  --panel: rgba(255, 255, 255, 0.055);
  --ink: #f7f5ff;
  --charcoal: #f8f7ff;
  --carbon: #090a11;
  --muted: rgba(235, 230, 255, 0.64);
  --soft: rgba(235, 230, 255, 0.42);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: #a879ff;
  --accent-strong: #8b5cf6;
  --accent-soft: rgba(168, 121, 255, 0.14);
  --gold: #d6bc86;
  --green: #77d8a6;
  --red: #ff8c8c;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
}

html,
body {
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at 17% 0%, rgba(139, 92, 246, 0.18), transparent 30%),
    radial-gradient(circle at 82% 12%, rgba(80, 105, 255, 0.12), transparent 27%),
    linear-gradient(135deg, #07080d 0%, #10121a 52%, #080910 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: Inter, "SF Pro Display", "Segoe UI Variable", "Helvetica Neue", Arial, ui-sans-serif, system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 78%);
}

.app-shell {
  position: relative;
  min-height: 100vh;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto minmax(260px, 1fr);
  align-items: center;
  gap: 22px;
  min-height: 76px;
  padding: 14px clamp(18px, 3vw, 36px);
  background: rgba(8, 10, 16, 0.76);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(22px) saturate(140%);
}

.brand {
  min-width: 0;
  color: #ffffff;
  font-size: 17px;
  font-weight: 780;
  letter-spacing: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #bd96ff, #6d3cff 58%, #4b1ea9);
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(139, 92, 246, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.mode-tabs {
  position: static;
  width: auto;
  min-width: min(760px, 52vw);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(18px);
}

.mode-tab {
  min-height: 38px;
  border-radius: 999px;
  padding: 0 14px;
  color: rgba(248, 247, 255, 0.56);
  font-size: 13px;
  font-weight: 720;
}

.mode-tab:hover {
  color: #ffffff;
}

.mode-tab.active {
  background: rgba(255, 255, 255, 0.105);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.top-actions {
  justify-content: flex-end;
  color: rgba(248, 247, 255, 0.58);
  font-size: 13px;
}

.top-actions > a {
  display: none;
}

.balance-pill,
.account-menu-btn {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.065);
  color: rgba(248, 247, 255, 0.78);
  box-shadow: none;
}

.account-menu-btn:hover,
.account-menu-btn.signed-in {
  border-color: rgba(168, 121, 255, 0.32);
  background: rgba(168, 121, 255, 0.12);
  color: #ffffff;
}

.account-avatar {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.account-popover {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(15, 17, 26, 0.97);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.46);
}

.workspace {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(22px, 3vw, 38px);
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.32fr);
  gap: 26px;
}

.workspace > *,
.topbar > * {
  min-width: 0;
}

.composer,
.side-panel > section,
.jobs-panel,
.auth-card,
.storyboard-panel,
.job-row,
.empty-state,
.model-builder {
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.composer {
  min-width: 0;
  overflow: hidden;
}

.section-head {
  padding: 24px clamp(20px, 2vw, 30px);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(168, 121, 255, 0.18), transparent 26%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.section-head::after {
  display: none;
}

.section-head .eyebrow,
.eyebrow {
  min-height: 25px;
  border-color: rgba(168, 121, 255, 0.26);
  background: rgba(168, 121, 255, 0.12);
  color: rgba(213, 195, 255, 0.96);
  font-size: 11px;
  letter-spacing: 0.08em;
}

h1,
.section-head h1 {
  max-width: 720px;
  margin: 14px 0 10px;
  color: #ffffff;
  font-size: clamp(28px, 2.6vw, 38px);
  line-height: 1.06;
  font-weight: 760;
  letter-spacing: 0;
}

h2,
.storyboard-head h2,
.rules-card h2,
.jobs-head h2 {
  color: #ffffff;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 720;
}

.section-head p,
p {
  color: var(--muted);
}

.section-head p {
  max-width: 760px;
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.62;
}

.head-metrics {
  margin-top: 20px;
}

.head-metrics span {
  min-height: 34px;
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.065);
  color: rgba(248, 247, 255, 0.68);
}

.form-grid {
  gap: 18px;
  padding: clamp(20px, 2.2vw, 28px);
  background: rgba(11, 13, 20, 0.46);
}

.field span {
  color: rgba(248, 247, 255, 0.8);
  font-size: 13px;
  font-weight: 680;
}

.field small {
  color: rgba(235, 230, 255, 0.42);
}

input,
select,
textarea {
  min-height: 48px;
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(9, 11, 18, 0.82);
  color: #ffffff;
  box-shadow: none;
}

input::placeholder,
textarea::placeholder {
  color: rgba(235, 230, 255, 0.32);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(168, 121, 255, 0.72);
  background: rgba(13, 16, 25, 0.96);
  box-shadow: 0 0 0 4px rgba(168, 121, 255, 0.13);
}

input[type="file"] {
  border-style: dashed;
  background: rgba(9, 11, 18, 0.58);
}

.mode-panel > label.field:first-of-type {
  min-height: 210px;
  justify-content: center;
  padding: 24px;
  border: 1px dashed rgba(168, 121, 255, 0.58);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(168, 121, 255, 0.08), rgba(255, 255, 255, 0.025));
  text-align: center;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.mode-panel > label.field:first-of-type:hover {
  transform: translateY(-1px);
  border-color: rgba(198, 177, 255, 0.9);
  background: rgba(168, 121, 255, 0.105);
}

.mode-panel > label.field:first-of-type span {
  color: #ffffff;
  font-size: 18px;
}

.mode-panel > label.field:first-of-type input[type="file"] {
  max-width: 560px;
  margin: 6px auto 0;
}

.file-control {
  position: relative;
  width: 100%;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(9, 11, 18, 0.62);
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.mode-panel > label.field:first-of-type .file-control {
  width: min(560px, 100%);
  margin: 6px auto 0;
  text-align: left;
}

.file-control .file-input-native {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.field .file-picker-btn {
  width: auto;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.field .file-picker-btn:hover,
.field .file-picker-btn:focus-visible {
  border-color: rgba(198, 177, 255, 0.78);
  background: rgba(168, 121, 255, 0.22);
  outline: none;
  transform: translateY(-1px);
}

.field .file-picker-text {
  min-width: 0;
  color: rgba(235, 230, 255, 0.6);
  display: block;
  flex: 1 1 auto;
  font-size: 13px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-flow-note,
.storyboard-panel {
  border-color: rgba(168, 121, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(168, 121, 255, 0.1), rgba(255, 255, 255, 0.035));
}

.model-flow-note strong {
  color: #ffffff;
}

.model-flow-note span,
.rules-card li,
.empty-state {
  color: rgba(235, 230, 255, 0.62);
}

.primary-btn {
  min-height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #bd96ff, #8b5cf6 58%, #5f21cf);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(139, 92, 246, 0.25);
}

.primary-btn:hover {
  background: linear-gradient(135deg, #c7a8ff, #9a6cff 58%, #6d2ee0);
}

.secondary-btn,
.google-btn,
.download-btn {
  min-height: 44px;
  border-color: rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(248, 247, 255, 0.84);
  box-shadow: none;
}

.secondary-btn:hover,
.google-btn:hover {
  border-color: rgba(168, 121, 255, 0.32);
  background: rgba(255, 255, 255, 0.085);
  color: #ffffff;
}

.side-panel {
  position: sticky;
  top: 100px;
  grid-column: 2;
  grid-row: 1 / span 2;
  gap: 18px;
}

.side-panel > section {
  padding: 22px;
}

.account-card {
  background:
    radial-gradient(circle at 15% 0%, rgba(168, 121, 255, 0.23), transparent 38%),
    rgba(255, 255, 255, 0.06) !important;
}

.account-card strong {
  color: #c9b2ff;
  font-size: clamp(36px, 3.4vw, 46px);
  letter-spacing: 0;
}

.account-card p {
  color: rgba(235, 230, 255, 0.58);
}

.account-card .secondary-btn {
  border-color: rgba(168, 121, 255, 0.32);
  background: rgba(168, 121, 255, 0.1);
  color: #d8c7ff;
}

.rules-card ul {
  color: rgba(235, 230, 255, 0.62);
}

.rules-card li {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.rules-card li::before {
  top: 22px;
  background: #a879ff;
  box-shadow: 0 0 0 4px rgba(168, 121, 255, 0.12);
}

.jobs-panel {
  grid-column: 1;
  padding: 22px;
}

.job-row,
.empty-state,
.shot-card,
.signed-in-box {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
}

.job-icon,
.google-mark {
  background: rgba(168, 121, 255, 0.15);
  color: #d8c7ff;
}

.job-main span,
.shot-card p,
.shot-card small,
.signed-in-box span,
.auth-divider {
  color: rgba(235, 230, 255, 0.5);
}

.shot-card-head strong,
.signed-in-box strong {
  color: #ffffff;
}

.shot-card-head span,
.analysis-meta,
.form-status {
  color: #d6bc86;
}

.model-ref {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .mode-tabs {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .top-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .side-panel,
  .jobs-panel {
    position: static;
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 12px 14px;
  }

  .brand span:last-child {
    max-width: none;
  }

  .top-actions a {
    display: none;
  }

  .workspace {
    width: 100vw;
    max-width: 100vw;
    padding: 14px;
    gap: 16px;
  }

  .composer,
  .section-head,
  .form-grid,
  .side-panel > section,
  .jobs-panel {
    width: 100%;
    max-width: calc(100vw - 28px);
  }

  .section-head {
    padding: 22px 18px;
  }

  h1,
  .section-head h1 {
    width: min(100%, 304px);
    max-width: 304px;
    font-size: 28px;
    line-height: 1.1;
  }

  .section-head p,
  .head-metrics,
  .model-flow-note {
    width: min(100%, 304px);
    max-width: 304px;
  }

  .head-metrics span {
    width: 100%;
  }

  .mode-tabs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    border-radius: 14px;
    overflow: visible;
  }

  .mode-tab {
    width: 100%;
    min-width: 0;
  }

  .mode-panel > label.field:first-of-type {
    min-height: 180px;
  }

  .top-actions {
    width: auto;
    max-width: 100%;
  }

  .section-head h1,
  .section-head p,
  .head-metrics,
  .model-flow-note,
  .mode-panel > label.field:first-of-type,
  input,
  select,
  textarea {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}
