:root {
  --salmon: #F05A5A;
  --salmon-dark: #d8464c;
  --ink: #172129;
  --muted: #6e777e;
  --cream: #f8f3ed;
  --paper: #fffdfa;
  --line: #e7ded7;
  --green: #24826a;
  --amber: #a86414;
  --shadow: 0 18px 55px rgba(66, 45, 36, 0.09);
}
* {
  box-sizing: border-box;
}
html {
  background: var(--cream);
  color: var(--ink);
  font-family: Gilroy, Inter, system-ui, sans-serif;
}
body {
  margin: 0;
  min-height: 100vh;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--salmon);
}
::selection {
  background: rgba(240, 90, 90, 0.24);
}
.topbar {
  height: 68px;
  padding: 0 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 19px;
}
.brand em {
  font-style: normal;
  color: var(--muted);
  font-weight: 400;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--salmon);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}
.topbar nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.topbar nav form {
  margin: 0;
}
.user-chip {
  font-size: 13px;
  color: var(--muted);
}
.link-button {
  border: 0;
  background: none;
  font-weight: 600;
}
.page-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 52px 30px;
}
.page-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 28px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 700;
  color: var(--salmon);
  margin: 0 0 7px;
}
.page-intro h1,
.auth-card h1,
.project-heading h1 {
  font-size: 42px;
  letter-spacing: -0.035em;
  margin: 0;
}
.muted {
  color: var(--muted);
}
.button {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 700;
  transition: 0.18s ease;
}
.button:hover {
  transform: translateY(-1px);
}
.button.primary {
  background: var(--salmon);
  color: #fff;
  box-shadow: 0 8px 24px rgba(240, 90, 90, 0.23);
}
.button.primary:hover {
  background: var(--salmon-dark);
}
.button.secondary {
  background: #fff;
  border-color: var(--line);
}
.button.small {
  padding: 8px 11px;
  font-size: 13px;
}
.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.project-card,
.empty-project {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 23px;
  text-decoration: none;
  color: inherit;
  min-height: 205px;
  box-shadow: 0 8px 30px rgba(66, 45, 36, 0.04);
  transition: 0.18s;
}
.project-card:hover {
  border-color: #f1b0aa;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.project-card-top,
.project-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}
.project-card h2 {
  font-size: 24px;
  margin: 28px 0 7px;
}
.project-card p {
  color: var(--muted);
  min-height: 38px;
}
.project-meta {
  border-top: 1px solid var(--line);
  padding-top: 13px;
}
.stage-pill {
  color: var(--salmon-dark);
  font-weight: 700;
}
.empty-project {
  display: grid;
  place-content: center;
  text-align: center;
  gap: 7px;
  width: 100%;
  border-style: dashed;
  color: var(--muted);
}
.empty-project span {
  font-size: 30px;
  color: var(--salmon);
}
.modal {
  border: 0;
  border-radius: 22px;
  padding: 28px;
  width: min(540px, calc(100vw - 36px));
  box-shadow: 0 30px 100px rgba(35, 25, 20, 0.25);
  background: var(--paper);
}
.modal.wide {
  width: min(820px, calc(100vw - 36px));
}
.modal::backdrop,
.lightbox::backdrop {
  background: rgba(23, 33, 41, 0.7);
  backdrop-filter: blur(4px);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 22px;
}
.modal h2 {
  margin: 0;
  font-size: 28px;
}
.icon-button {
  border: 0;
  background: #f3ece6;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 24px;
}
.stack-form {
  display: grid;
  gap: 16px;
}
.stack-form label,
.input-card > label,
.compact-form {
  font-size: 13px;
  font-weight: 700;
  display: grid;
  gap: 7px;
}
.stack-form input,
.stack-form select,
.input-card input,
.input-card textarea,
.input-card select,
.compact-form input,
.compact-form select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 11px;
  padding: 11px 12px;
  outline: none;
}
.stack-form input:focus,
.input-card input:focus,
.input-card textarea:focus,
.input-card select:focus,
.compact-form input:focus,
.compact-form select:focus {
  border-color: var(--salmon);
  box-shadow: 0 0 0 3px rgba(240, 90, 90, 0.1);
}
.check-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
}
.check-row input {
  width: 17px !important;
  height: 17px;
}
.auth-shell {
  min-height: calc(100vh - 68px);
  display: grid;
  place-items: center;
  padding: 30px;
  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(240, 90, 90, 0.15),
      transparent 32%
    ),
    radial-gradient(
      circle at 80% 75%,
      rgba(242, 173, 124, 0.16),
      transparent 35%
    );
}
.auth-card {
  width: min(480px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 38px;
  border-radius: 26px;
  box-shadow: var(--shadow);
}
.workspace {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  min-height: calc(100vh - 68px);
}
.brief-pane {
  padding: 26px 24px;
  background: #f4ede6;
  border-right: 1px solid var(--line);
}
.flow-pane {
  padding: 30px 34px 70px;
  min-width: 0;
}
.back-link {
  font-size: 13px;
  text-decoration: none;
  color: var(--muted);
}
.project-heading {
  margin: 25px 0;
}
.project-heading h1 {
  font-size: 31px;
}
.save-state {
  font-size: 11px;
  color: var(--green);
}
.save-state.saving {
  color: var(--amber);
}
.input-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 17px;
  margin-bottom: 16px;
}
.input-card textarea {
  resize: vertical;
  line-height: 1.45;
}
.field-row {
  display: flex;
  gap: 12px;
}
.field-row > * {
  flex: 1;
}
.section-title,
.flow-header,
.flow-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-title h2,
.flow-header h2 {
  margin: 0;
}
.count {
  font-size: 12px;
  color: var(--muted);
}
.help {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
code {
  background: #f2e9e2;
  padding: 2px 5px;
  border-radius: 5px;
}
.reference-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}
.reference-row {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 8px;
  background: #faf6f2;
  border-radius: 10px;
}
.reference-row div {
  display: grid;
}
.reference-row small {
  color: var(--muted);
  font-size: 11px;
}
.file-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--salmon);
}
.compact-form {
  gap: 8px;
}
.flow-header {
  margin-bottom: 18px;
}
.flow-header h2 {
  font-size: 28px;
}
.spend {
  text-align: right;
  display: grid;
}
.spend small {
  color: var(--muted);
}
.spend strong {
  font-size: 23px;
}
.flow-section {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  margin-bottom: 17px;
  overflow: hidden;
}
.flow-section-head {
  padding: 19px 22px;
  border-bottom: 1px solid var(--line);
}
.flow-section-head > div {
  display: flex;
  align-items: center;
  gap: 13px;
}
.flow-section-head h3 {
  margin: 0;
  font-size: 19px;
}
.flow-section-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.step-number {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #f9dfd9;
  color: var(--salmon-dark);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
}
.section-content {
  padding: 20px;
}
.skeleton-card,
.empty-copy {
  color: var(--muted);
  font-size: 13px;
}
.beat-table {
  width: 100%;
  border-collapse: collapse;
}
.beat-table th {
  text-align: left;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 8px;
}
.beat-table td {
  padding: 11px 8px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  vertical-align: top;
}
.beat-num {
  font-weight: 700;
  color: var(--salmon);
}
.plan-actions {
  display: flex;
  gap: 10px;
  align-items: end;
  margin-top: 16px;
}
.plan-actions label {
  display: grid;
  gap: 5px;
  flex: 1;
  font-size: 11px;
  color: var(--muted);
}
.plan-actions input,
.regen-box textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px;
  width: 100%;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.media-card {
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  background: #fff;
}
.media-frame {
  aspect-ratio: 9/16;
  background: #eee7e1;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.media-frame img,
.media-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame button {
  border: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}
.status-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: rgba(23, 33, 41, 0.82);
  color: #fff;
  border-radius: 99px;
  padding: 5px 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.status-badge.approved {
  background: var(--green);
}
.media-body {
  padding: 12px;
}
.media-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.media-title strong {
  font-size: 14px;
}
.media-title span {
  font-size: 11px;
  color: var(--muted);
}
.media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}
.regen-box {
  margin-top: 9px;
  display: grid;
  gap: 7px;
}
.regen-box textarea {
  font-size: 12px;
  resize: vertical;
}
.error-copy {
  font-size: 11px;
  color: #a72d35;
  line-height: 1.35;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.prompt-link {
  background: none;
  border: 0;
  color: var(--salmon-dark);
  font-weight: 700;
  font-size: 12px;
  padding: 4px;
}
.modal pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #f7f1eb;
  padding: 16px;
  border-radius: 12px;
  max-height: 65vh;
  overflow: auto;
  font:
    12px/1.5 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
}
.lightbox {
  border: 0;
  background: transparent;
  padding: 0;
  max-width: 95vw;
  max-height: 95vh;
}
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  display: block;
  border-radius: 14px;
}
.lightbox-close {
  position: fixed;
  right: 26px;
  top: 20px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  width: 42px;
  height: 42px;
  font-size: 25px;
}
.post-panel {
  min-height: 120px;
}
.deliverables {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.deliverable {
  border: 1px solid var(--line);
  padding: 15px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
}
.deliverable small {
  display: block;
  color: var(--muted);
}
.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: grid;
  gap: 8px;
}
.toast {
  background: var(--ink);
  color: #fff;
  padding: 12px 15px;
  border-radius: 11px;
  box-shadow: var(--shadow);
}
@media (max-width: 940px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .brief-pane {
    border-right: 0;
  }
  .flow-pane {
    padding: 24px;
  }
  .topbar {
    padding: 0 18px;
  }
  .user-chip {
    display: none;
  }
}
@media (max-width: 620px) {
  .page-shell {
    padding: 30px 17px;
  }
  .page-intro {
    align-items: start;
    gap: 16px;
  }
  .page-intro h1 {
    font-size: 34px;
  }
  .flow-section-head {
    align-items: start;
    gap: 12px;
  }
  .flow-section-head > .button {
    font-size: 12px;
    padding: 9px;
  }
  .media-grid,
  .video-grid,
  .deliverables {
    grid-template-columns: 1fr 1fr;
  }
  .brief-pane,
  .flow-pane {
    padding: 18px;
  }
  .topbar {
    height: 60px;
  }
  .workspace {
    min-height: calc(100vh - 60px);
  }
}
.post-preview {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 9 / 16;
  margin: 1rem 0;
  overflow: hidden;
  border-radius: 22px;
  background: #101820;
}

.post-preview video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.post-preview-subtitle {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 17%;
  color: #f05a5a;
  font:
    900 1.2rem/1.15 Gilroy,
    sans-serif;
  text-align: center;
  pointer-events: none;
  -webkit-text-stroke: 1.5px #000;
  paint-order: stroke fill;
}
