@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;1,500&display=swap");
:root {
  font-family: "DM Sans", Arial, sans-serif;
  color: #272823;
  background: #f5f2eb;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
[hidden] {
  display: none !important;
}
.shell {
  max-width: 1500px;
  min-height: 100vh;
  margin: auto;
  padding: 0 4.2vw;
}
.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #dedbd2;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #292b25;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.15em;
}
.brand-symbol {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1.5px solid #3e503c;
  border-radius: 50%;
  color: #3e503c;
  font-size: 20px;
  line-height: 1;
}
.brand-light {
  font-weight: 400;
  color: #71806f;
}
.top-note {
  font-size: 12px;
  color: #8a8c81;
  letter-spacing: 0.05em;
}
.text-button {
  border: 0;
  background: transparent;
  color: #3c4d3a;
  font-weight: 700;
  font-size: 13px;
}
.text-button:hover {
  text-decoration: underline;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(370px, 1fr) minmax(440px, 1fr);
  gap: 7vw;
  align-items: center;
  min-height: calc(100vh - 76px);
  padding: 42px 0 48px;
}
.composer {
  max-width: 565px;
}
.eyebrow {
  display: block;
  color: #6f8069;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
}
.intro h1 {
  margin: 15px 0 12px;
  font:
    500 clamp(48px, 4.5vw, 76px) / 0.98 "Playfair Display",
    Georgia,
    serif;
  letter-spacing: -0.055em;
}
.intro h1 em {
  color: #697c62;
  font-weight: 500;
}
.intro p {
  max-width: 410px;
  margin: 0 0 24px;
  color: #7a7e73;
  font-size: 15px;
  line-height: 1.55;
}
.form-card {
  padding: 26px 28px 23px;
  border: 1px solid #e0ddd5;
  border-radius: 16px;
  background: #fffdf9;
  box-shadow: 0 14px 40px #5951430b;
}
.mode-control {
  border: 0;
  padding: 0;
  margin: 0 0 21px;
  width: 100%;
}
.mode-control legend,
.field-label {
  margin: 0 0 10px;
  color: #33382f;
  font-size: 13px;
  font-weight: 700;
}
.segments {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 5px;
  border-radius: 10px;
  background: #f1f0ea;
}
.segments label {
  position: relative;
}
.segments input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.segments span {
  display: block;
  padding: 11px 5px;
  text-align: center;
  border-radius: 8px;
  color: #808379;
  font-size: 13px;
  font-weight: 700;
}
.segments input:checked + span {
  background: #fff;
  box-shadow: 0 2px 7px #4a4e3b17;
  color: #354631;
}
.segments input:focus-visible + span {
  outline: 2px solid #78906d;
  outline-offset: 2px;
}
.field-label {
  display: block;
}
textarea,
input,
select {
  outline: none;
}
#briefInput {
  display: block;
  width: 100%;
  min-height: 103px;
  resize: vertical;
  padding: 13px 14px;
  border: 1px solid #dddcd4;
  border-radius: 10px;
  color: #2c302a;
  background: #fff;
  font-size: 14px;
  line-height: 1.45;
}
#briefInput::placeholder {
  color: #a1a397;
}
#briefInput:focus,
.details input:focus,
.details select:focus,
.edit-dialog input:focus,
.edit-dialog textarea:focus,
.edit-dialog select:focus {
  border-color: #78906d;
  box-shadow: 0 0 0 3px #78906d25;
}
.photo-input {
  margin-top: 14px;
}
.drop-zone {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  padding: 13px;
  border: 1.5px dashed #bbc5b6;
  border-radius: 10px;
  background: #f8faf6;
  color: #43563f;
  font-size: 13px;
  cursor: pointer;
}
.drop-zone small {
  display: block;
  width: 100%;
  padding-left: 26px;
  color: #83897f;
  line-height: 1.4;
}
.drop-icon {
  font-size: 22px;
  line-height: 10px;
}
.photo-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 9px;
}
.photo-list img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 5px;
}
.photo-list span {
  align-self: center;
  color: #677361;
  font-size: 12px;
}
.photo-input.has-photos .drop-zone { padding: 8px 10px; }
.photo-input.has-photos .drop-zone small { display: none; }
.photo-input.has-photos .photo-list { margin-top: 6px; }
.photo-input.has-photos .photo-list img { width: 35px; height: 35px; }
.details {
  margin: 16px 0;
  border-top: 1px solid #ecebe6;
  border-bottom: 1px solid #ecebe6;
}
.details summary {
  display: flex;
  justify-content: space-between;
  padding: 14px 1px;
  list-style: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: #455740;
}
.details summary::-webkit-details-marker {
  display: none;
}
.details[open] summary span {
  transform: rotate(180deg);
}
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px 10px;
  padding: 0 0 15px;
}
.details-grid label,
.edit-dialog label {
  display: block;
  color: #535b4f;
  font-size: 12px;
  font-weight: 700;
}
.details-grid input,
.details-grid select,
.edit-dialog input,
.edit-dialog textarea,
.edit-dialog select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 9px;
  border: 1px solid #dadbd3;
  border-radius: 7px;
  background: white;
  color: #30352d;
  font-size: 12px;
}
.primary-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 17px;
  border: 0;
  border-radius: 9px;
  background: #334f39;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  transition:
    background 0.2s,
    transform 0.2s;
}
.primary-button:hover {
  background: #49674d;
  transform: translateY(-1px);
}
.primary-button:disabled {
  opacity: 0.65;
  cursor: wait;
}
.form-footnote {
  margin: 11px 0 0;
  text-align: center;
  color: #9b9f93;
  font-size: 11px;
}
.preview-panel {
  width: 100%;
  max-width: 550px;
  justify-self: end;
}
.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 14px;
}
.preview-header h2 {
  margin: 5px 0 0;
  font:
    500 24px/1.15 "Playfair Display",
    Georgia,
    serif;
}
.preview-count {
  padding-bottom: 4px;
  color: #859080;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: min(62vh, 590px);
  padding: 18px 35px 12px;
  border-radius: 19px;
  background: #e8e8df;
}
.slide-card {
  position: relative;
  overflow: hidden;
  width: min(100%, 350px);
  aspect-ratio: 4/5;
  border-radius: 3px;
  background: #687a61;
  box-shadow: 0 19px 33px #2b342929;
  isolation: isolate;
}
.slide-card[data-format="vertical"] {
  width: min(100%, 230px);
  aspect-ratio: 9/16;
}
.slide-card[data-format="vertical"] .slide-copy {
  padding-top: 19%;
  padding-bottom: 27%;
}
.slide-card[data-format="vertical"] .slide-copy h3 {
  font-size: 34px;
}
.slide-card[data-format="square"] {
  width: min(100%, 360px);
  aspect-ratio: 1;
}
.slide-card[data-format="square"] .slide-copy h3 {
  font-size: 38px;
}
.slide-card[data-format="pin"] {
  width: min(100%, 270px);
  aspect-ratio: 2/3;
}
.format-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 14px;
  padding: 6px 9px;
  border-radius: 5px;
  background: #f7f7f0e8;
  color: #4c5c48;
  font-size: 10px;
  font-weight: 700;
}
.slide-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slide-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 14%,
    #0c18127a 67%,
    #0c1812cf 100%
  );
}
.slide-card[data-placement="upper-left"] .slide-shade {
  background: linear-gradient(180deg, #0c1812cc, #0c18125c 54%, transparent 100%);
}
.slide-card[data-placement="center"] .slide-shade {
  background: #0c181267;
}
.slide-card[data-placement="middle-left"] .slide-shade {
  background: linear-gradient(90deg, #0c1812bd, #0c18123d 72%, transparent);
}
.slide-card[data-placement="middle-right"] .slide-shade {
  background: linear-gradient(270deg, #0c1812bd, #0c18123d 72%, transparent);
}
.slide-card[data-placement="lower-right"] .slide-shade {
  background: linear-gradient(180deg, transparent 14%, #0c18127a 67%, #0c1812cf 100%);
}
.slide-copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 9.4% 8%;
  color: white;
  text-shadow: 0 2px 12px #0005;
}
.slide-card[data-placement="upper-left"] .slide-copy {
  justify-content: start;
  padding-top: 13%;
}
.slide-card[data-format="vertical"][data-placement="upper-left"] .slide-copy {
  padding-top: 22%;
}
.slide-card[data-placement="center"] .slide-copy {
  justify-content: center;
  align-items: center;
  text-align: center;
}
.slide-card[data-placement="middle-left"] .slide-copy,
.slide-card[data-placement="middle-right"] .slide-copy {
  justify-content: center;
}
.slide-card[data-placement="middle-right"] .slide-copy,
.slide-card[data-placement="lower-right"] .slide-copy {
  align-items: flex-end;
  text-align: right;
}
.slide-card[data-placement="center"] .slide-copy h3,
.slide-card[data-placement="center"] .slide-copy p {
  max-width: 100%;
}
.slide-kicker {
  font-size: clamp(8px, 0.75vw, 11px);
  font-weight: 700;
  letter-spacing: 0.16em;
}
.slide-copy h3 {
  max-width: 95%;
  margin: 3% 0 2%;
  font:
    500 clamp(32px, 3.25vw, 52px) / 1.02 "Playfair Display",
    Georgia,
    serif;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}
.slide-card[data-copy-size="long"] .slide-copy h3 {
  font-size: clamp(29px, 2.7vw, 39px);
}
.slide-card[data-copy-size="very-long"] .slide-copy h3 {
  font-size: clamp(25px, 2.25vw, 34px);
}
.slide-copy p {
  max-width: 90%;
  margin: 0 0 8%;
  font-size: clamp(10px, 1vw, 14px);
  line-height: 1.35;
}
.sample-label {
  position: absolute;
  bottom: 15px;
  left: 0;
  right: 0;
  color: #91988b;
  text-align: center;
  font-size: 11px;
}
.preview-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 13px 0;
}
.preview-nav button {
  width: 35px;
  height: 35px;
  border: 1px solid #d4d8cf;
  border-radius: 50%;
  background: #fff;
  color: #41563d;
}
.preview-nav button:disabled {
  opacity: 0.4;
  cursor: default;
}
.dots {
  display: flex;
  gap: 7px;
}
.dot {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c5cbc0;
}
.dot.active {
  width: 18px;
  border-radius: 10px;
  background: #567154;
}
.dots button {
  padding: 0;
  border: 0;
}
.result-actions {
  display: flex;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
}
.action-button {
  padding: 10px 12px;
  border: 1px solid #d5dbd1;
  border-radius: 7px;
  background: #fffdf9;
  color: #3e523b;
  font-size: 12px;
  font-weight: 700;
}
.action-button:hover {
  background: #f1f5ee;
}
.action-primary {
  background: #f0eee6;
}
.export-wrap {
  position: relative;
}
.export-menu {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: calc(100% + 6px);
  width: 255px;
  padding: 12px;
  border: 1px solid #d7ddd3;
  border-radius: 8px;
  background: white;
  box-shadow: 0 12px 24px #303c2b22;
}
.export-label {
  display: block;
  margin-bottom: 7px;
  color: #495b45;
  font-size: 11px;
  font-weight: 700;
}
.export-menu select {
  width: 100%;
  padding: 9px;
  border: 1px solid #d5dbd1;
  border-radius: 6px;
  background: white;
  color: #354431;
  font-size: 12px;
}
.export-spec {
  margin: 7px 0 10px;
  color: #828b7e;
  font-size: 11px;
}
.export-menu button {
  display: block;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  text-align: left;
  color: #384a36;
  font-size: 12px;
}
.export-menu button:hover {
  background: #f0f5ed;
}
.status {
  min-height: 18px;
  margin: 10px 0 0;
  text-align: center;
  color: #8a9485;
  font-size: 11px;
  line-height: 1.35;
}
.status.error {
  color: #a64036;
}
.slide-card.motion img {
  animation: kenburns 4s ease-in-out forwards;
}
.slide-card.motion .slide-copy > * {
  animation-duration: 0.8s;
  animation-timing-function: cubic-bezier(.2,.7,.2,1);
  animation-fill-mode: both;
}
.slide-card.motion .slide-copy > :nth-child(2) {
  animation-delay: 0.14s;
}
.slide-card.motion .slide-copy > :nth-child(3) {
  animation-delay: 0.28s;
}
.slide-card.motion[data-entrance="lift"] .slide-copy > * {
  animation-name: rise;
}
.slide-card.motion[data-entrance="from-left"] .slide-copy > * {
  animation-name: enter-left;
}
.slide-card.motion[data-entrance="from-right"] .slide-copy > * {
  animation-name: enter-right;
}
.slide-card.motion[data-entrance="drop"] .slide-copy > * {
  animation-name: enter-top;
}
.slide-card.motion[data-entrance="focus"] .slide-copy > * {
  animation-name: focus-in;
}
.slide-card.motion .slide-shade {
  animation: fadein 1s ease-out both;
}
@keyframes kenburns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.13) translate(-2%, -1%);
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes enter-left {
  from { opacity: 0; transform: translateX(-28px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes enter-right {
  from { opacity: 0; transform: translateX(28px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes enter-top {
  from { opacity: 0; transform: translateY(-28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes focus-in {
  from { opacity: 0; filter: blur(7px); transform: scale(.9); }
  to { opacity: 1; filter: blur(0); transform: scale(1); }
}
@keyframes fadein {
  from {
    opacity: 0.2;
  }
  to {
    opacity: 1;
  }
}
.edit-dialog {
  width: min(440px, calc(100vw - 28px));
  padding: 25px;
  border: 1px solid #d7dcd3;
  border-radius: 14px;
  background: #fffdf9;
  box-shadow: 0 24px 80px #0004;
}
.edit-dialog::backdrop {
  background: #1d271eb0;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 19px;
}
.dialog-head h2 {
  margin: 5px 0;
  font:
    500 26px "Playfair Display",
    Georgia,
    serif;
}
.close-button {
  border: 0;
  background: transparent;
  font-size: 27px;
  color: #596758;
}
.edit-dialog label {
  margin-bottom: 14px;
}
.edit-dialog input,
.edit-dialog textarea,
.edit-dialog select {
  font-size: 14px;
  resize: vertical;
}
.edit-style-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.dialog-actions .primary-button {
  width: auto;
  min-width: 115px;
  justify-content: center;
}
.top-actions { display: flex; gap: 14px; align-items: center; }
.workflow-dialog {
  width: min(650px, calc(100vw - 28px));
  max-height: min(88vh, 850px);
  padding: 25px;
  overflow: auto;
  border: 1px solid #d7dcd3;
  border-radius: 14px;
  background: #fffdf9;
  box-shadow: 0 24px 80px #0004;
}
.workflow-dialog::backdrop { background: #1d271eb0; }
.workflow-dialog label {
  display: block;
  margin: 10px 0 14px;
  color: #394a36;
  font-size: 13px;
  font-weight: 700;
}
.workflow-dialog input, .workflow-dialog textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  border: 1px solid #dadbd3;
  border-radius: 7px;
  background: white;
  color: #30352d;
  font-size: 13px;
  font-weight: 400;
}
.workflow-dialog input:focus, .workflow-dialog textarea:focus {
  border-color: #78906d;
  box-shadow: 0 0 0 3px #78906d25;
}
.dialog-note { color: #738071; font-size: 12px; line-height: 1.5; }
.campaign-list { display: grid; gap: 8px; margin: 17px 0; max-height: 44vh; overflow: auto; }
.campaign-row, .hook-choice {
  display: block;
  width: 100%;
  padding: 13px;
  border: 1px solid #dde3d9;
  border-radius: 8px;
  background: #f7f8f4;
  color: #344432;
  text-align: left;
}
.campaign-row strong, .campaign-row small { display: block; }
.campaign-row small { margin-top: 4px; color: #7c8679; }
.campaign-row:hover, .hook-choice:hover, .hook-choice.selected { border-color: #799371; background: #eef4eb; }
.import-label { width: auto; padding: 10px 12px; margin: 0 !important; cursor: pointer; }
.review-dialog { width: min(720px, calc(100vw - 28px)); }
.review-sections { display: grid; gap: 18px; }
.review-sections section { border-top: 1px solid #e4e8df; padding-top: 12px; }
.review-sections h3 { margin: 0 0 6px; font: 500 20px "Playfair Display", Georgia, serif; }
.hook-choices { display: grid; gap: 6px; }
.custom-hook { display: flex; align-items: end; gap: 8px; }
.custom-hook input { margin: 8px 0 0; }
.custom-hook button { flex: none; }
.check-list { margin: 10px 0; padding-left: 18px; color: #586554; font-size: 12px; line-height: 1.55; }
#visualChecks p { margin: 7px 0; color: #586554; font-size: 12px; line-height: 1.5; }
#altTextInputs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.metrics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.marking-subject { cursor: crosshair; outline: 3px solid #e2b34b; }
.subject-marker {
  position: absolute;
  z-index: 4;
  width: 28px;
  height: 28px;
  border: 3px solid #f4c55f;
  border-radius: 50%;
  background: #3d4b2c55;
  box-shadow: 0 0 0 2px #263c28aa;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.action-button:disabled { opacity: .55; cursor: wait; }
@media (max-height: 800px) and (min-width: 901px) {
  .topbar {
    height: 62px;
  }
  .workspace {
    min-height: calc(100vh - 62px);
    padding: 16px 0 18px;
  }
  .intro h1 {
    font-size: clamp(48px, 4vw, 61px);
    margin: 10px 0 8px;
  }
  .intro p {
    margin-bottom: 14px;
    font-size: 13px;
  }
  .form-card {
    padding: 19px 22px 16px;
  }
  .mode-control {
    margin-bottom: 14px;
  }
  .segments span {
    padding: 9px 5px;
  }
  #briefInput {
    min-height: 82px;
  }
  .details {
    margin: 11px 0;
  }
  .details summary {
    padding: 11px 1px;
  }
  .stage {
    min-height: 435px;
    padding: 13px 30px 30px;
  }
  .slide-card {
    width: min(100%, 315px);
  }
  .slide-copy h3 {
    font-size: 42px;
  }
  .slide-copy p {
    font-size: 12px;
  }
  .sample-label {
    bottom: 7px;
  }
  .preview-nav {
    margin: 7px 0;
  }
  .preview-header {
    margin-bottom: 9px;
  }
}
.dots button.dot {
  display: block;
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #c5cbc0;
}
.dots button.dot.active {
  width: 19px;
  border-radius: 10px;
  background: #567154;
}
.slide-copy h3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}
@media (max-width: 900px) {
  .shell {
    padding: 0 22px;
  }
  .workspace {
    grid-template-columns: 1fr;
    gap: 35px;
    align-items: start;
    max-width: 650px;
    margin: auto;
    padding-top: 38px;
  }
  .composer,
  .preview-panel {
    max-width: none;
  }
  .intro h1 {
    font-size: 60px;
  }
  .stage {
    min-height: 530px;
  }
  .slide-card {
    width: 355px;
  }
  .slide-copy h3 {
    font-size: 46px;
  }
  .slide-copy p {
    font-size: 14px;
  }
  .top-note {
    display: none;
  }
}
@media (max-width: 520px) {
  .top-actions { gap: 4px; }
  .top-actions .text-button { font-size: 11px; }
  #altTextInputs, .metrics-grid { grid-template-columns: 1fr; }
  .shell {
    padding: 0 15px;
  }
  .topbar {
    height: 65px;
  }
  .brand {
    font-size: 12px;
  }
  .workspace {
    padding-top: 30px;
    gap: 28px;
  }
  .intro h1 {
    font-size: 48px;
  }
  .intro p {
    font-size: 13px;
    margin-bottom: 18px;
  }
  .form-card {
    padding: 19px;
  }
  .stage {
    min-height: 410px;
    padding: 15px 25px 24px;
  }
  .slide-card {
    width: min(100%, 300px);
  }
  .slide-copy h3 {
    font-size: 38px;
  }
  .slide-copy p {
    font-size: 12px;
  }
  .details-grid {
    grid-template-columns: 1fr;
  }
  .preview-header h2 {
    font-size: 22px;
  }
  .sample-label {
    bottom: 6px;
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
