:root {
  --ink: #181b18;
  --paper: #f4f1e9;
  --cream: #ebe5d8;
  --card: #fffdf8;
  --lime: #d8f65b;
  --muted: #73776f;
  --line: #dcd8cf;
  --shadow: 0 24px 70px rgba(26, 28, 24, 0.12);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  min-height: 100vh;
}
.topbar {
  height: 76px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 241, 233, 0.9);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  font-size: 11px;
  line-height: 1.05;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.brand-mark,
.agent-avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
  font: italic 700 22px "Playfair Display";
  width: 42px;
  height: 42px;
}
.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--card);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.plan-badge,
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}
.plan-badge {
  padding: 7px 10px;
  border: 1px solid var(--ink);
  border-radius: 99px;
}
.ghost-btn,
.icon-btn,
.primary-btn {
  font: 600 13px inherit;
  border-radius: 10px;
  cursor: pointer;
}
.sales-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.ghost-btn {
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}
.icon-btn {
  width: 38px;
  height: 38px;
  border: 0;
  background: var(--ink);
  color: #fff;
}
.workspace {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: 240px minmax(360px, 1fr) minmax(360px, 1.05fr);
}
.context-panel,
.chat-panel,
.preview-panel {
  min-width: 0;
}
.context-panel {
  padding: 38px 26px;
  border-right: 1px solid var(--line);
}
.context-panel h1 {
  font: 700 clamp(21px, 2vw, 24px) / 1.06 "Playfair Display";
  margin: 12px 0 28px;
  overflow-wrap: break-word;
  hyphens: auto;
}
.muted {
  font-size: 12px;
  color: var(--muted);
}
.progress-track {
  height: 4px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.progress-track span {
  display: block;
  height: 100%;
  width: 25%;
  background: var(--ink);
  transition: 0.3s;
}
.asset-summary {
  margin-top: 32px;
  display: grid;
  gap: 9px;
}
.asset-row {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.asset-row b {
  margin-left: auto;
}
.format-card {
  margin-top: 36px;
  border-radius: 16px;
  background: var(--ink);
  color: white;
  padding: 20px;
  display: grid;
  gap: 3px;
}
.format-card span {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: #c7c9c4;
}
.format-card strong {
  font: 700 34px "Playfair Display";
  color: var(--lime);
}
.format-card small {
  color: #aeb2ab;
}
.chat-panel {
  background: var(--card);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  height: calc(100vh - 76px);
  position: sticky;
  top: 76px;
}
.agent-head {
  height: 72px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 11px;
  align-items: center;
}
.agent-avatar {
  width: 40px;
  height: 40px;
}
.agent-head div:last-child {
  display: grid;
  font-size: 13px;
}
.agent-head span {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}
.agent-head i {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #65ba53;
  border-radius: 50%;
  margin-right: 4px;
}
.chat {
  padding: 28px 22px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}
.bubble {
  max-width: 86%;
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.bubble.agent {
  background: var(--paper);
  border-bottom-left-radius: 4px;
}
.bubble.user {
  background: var(--ink);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.composer {
  margin: 12px 18px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  display: flex;
  align-items: flex-end;
  padding: 8px;
}
.composer:focus-within {
  border-color: #9ca074;
  box-shadow: 0 0 0 3px rgba(216, 246, 91, 0.22);
}
.composer textarea {
  resize: none;
  border: 0;
  outline: 0;
  min-height: 42px;
  max-height: 120px;
  padding: 11px;
  flex: 1;
  background: transparent;
  font: 14px inherit;
}
.composer button,
.attach-btn {
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.composer button {
  background: var(--ink);
  color: var(--lime);
  font-size: 21px;
}
.attach-btn {
  background: var(--paper);
  font-size: 22px;
}
.quick-options {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  padding: 0 18px 16px;
}
.quick-options button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 99px;
  padding: 8px 12px;
  cursor: pointer;
}
.preview-panel {
  padding: 28px;
  overflow: auto;
  height: calc(100vh - 76px);
}
.preview-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
}
.preview-head h2 {
  font: 700 26px "Playfair Display";
  margin: 5px 0 0;
}
.preview-head > span {
  font-size: 11px;
  color: var(--muted);
}
.preview-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.preview-tools .ghost-btn {
  padding: 8px 10px;
  text-decoration: none;
  white-space: nowrap;
}
.preview-empty {
  height: 70%;
  min-height: 390px;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
}
.preview-empty strong {
  color: var(--ink);
  margin-top: 20px;
}
.preview-empty p {
  font-size: 13px;
}
.empty-art {
  width: 170px;
  height: 240px;
  position: relative;
  margin: auto;
}
.empty-art span {
  position: absolute;
  width: 115px;
  height: 205px;
  border: 1px solid #c9c4b8;
  border-radius: 10px;
  left: 28px;
  top: 16px;
  background: var(--paper);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}
.empty-art span:first-child {
  transform: rotate(-10deg);
  left: 4px;
}
.empty-art span:last-child {
  transform: rotate(10deg);
  left: 52px;
}
.plan-preview {
  display: grid;
  gap: 10px;
}
.slide-plan {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 13px;
  padding: 14px;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
}
.slide-plan .number {
  font: 700 19px "Playfair Display";
  color: #8e927e;
}
.slide-plan strong {
  font-size: 13px;
}
.slide-plan p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.gallery figure {
  margin: 0;
  position: relative;
}
.gallery img {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}
.gallery a {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  color: var(--ink);
}
.generate-box {
  position: sticky;
  bottom: 0;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.generate-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.generate-actions .ghost-btn {
  padding: 11px 12px;
  white-space: nowrap;
}
.generate-box div {
  display: grid;
  font-size: 12px;
}
.generate-box small {
  color: var(--muted);
  margin-top: 2px;
}
.primary-btn {
  border: 0;
  background: var(--ink);
  color: var(--lime);
  padding: 12px 17px;
  text-decoration: none;
  text-align: center;
  display: inline-block;
}
.primary-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}
@media (max-width: 620px) {
  .generate-box { align-items: stretch; flex-direction: column; }
  .generate-actions { width: 100%; }
  .generate-actions button { flex: 1; }
}
.wide {
  width: 100%;
}
.landing {
  min-height: calc(100vh - 76px);
  padding: 70px clamp(24px, 7vw, 110px);
  display: grid;
  grid-template-columns: 1.15fr minmax(320px, 440px);
  align-items: center;
  gap: 8vw;
  background: radial-gradient(
    circle at 20% 90%,
    rgba(216, 246, 91, 0.22),
    transparent 28%
  );
}
.landing-copy h1 {
  font: 700 clamp(46px, 6vw, 86px) / 0.96 "Playfair Display";
  letter-spacing: -0.04em;
  margin: 18px 0 28px;
}
.landing-copy h1 em {
  font-weight: 600;
  color: #777b72;
}
.landing-copy > p {
  max-width: 560px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}
.features {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 12px;
  margin-top: 34px;
}
.auth-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px;
  box-shadow: var(--shadow);
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--paper);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
}
.auth-tabs button {
  border: 0;
  background: transparent;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  font: 600 13px inherit;
}
.auth-tabs .active {
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.auth-card form {
  display: grid;
  gap: 14px;
}
.auth-card label {
  font-size: 11px;
  font-weight: 600;
  display: grid;
  gap: 6px;
}
.auth-card input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px;
  font: 14px inherit;
  outline: 0;
}
.auth-card input:focus {
  border-color: #898d6f;
}
.auth-card > small {
  display: block;
  text-align: center;
  color: var(--muted);
  font-size: 10px;
  margin-top: 16px;
}
.form-error {
  color: #a33;
  font-size: 12px;
  min-height: 17px;
  margin: 0;
}
dialog {
  border: 0;
  border-radius: 22px;
  padding: 32px;
  max-width: 430px;
  color: var(--ink);
  box-shadow: var(--shadow);
}
dialog::backdrop {
  background: rgba(16, 18, 16, 0.62);
  backdrop-filter: blur(4px);
}
dialog h2 {
  font: 700 31px "Playfair Display";
  margin: 10px 0;
}
dialog p,
dialog li {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
dialog ul {
  padding-left: 20px;
  margin: 22px 0;
}
.dialog-close {
  position: absolute;
  right: 14px;
  top: 14px;
  border: 0;
  background: var(--paper);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
}
.premium-icon {
  font-size: 34px;
  color: #94a42f;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
  z-index: 30;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
[hidden] {
  display: none !important;
}
@media (max-width: 1050px) {
  .workspace {
    grid-template-columns: 190px 1fr;
  }
  .preview-panel {
    grid-column: 1/-1;
    height: auto;
    border-top: 1px solid var(--line);
  }
  .chat-panel {
    border-right: 0;
  }
  .landing {
    grid-template-columns: 1fr;
  }
  .landing-copy h1 {
    font-size: 58px;
  }
}
@media (max-width: 700px) {
  .topbar {
    padding: 0 14px;
  }
  .brand span:last-child,
  .plan-badge {
    display: none;
  }
  .workspace {
    display: block;
  }
  .context-panel {
    display: none;
  }
  .chat-panel {
    height: calc(100vh - 76px);
    position: relative;
    top: 0;
  }
  .preview-panel {
    height: auto;
    padding: 22px;
  }
  .top-actions .ghost-btn {
    font-size: 0;
  }
  .top-actions .ghost-btn:after {
    content: "+";
    font-size: 20px;
  }
  .landing {
    padding: 42px 20px;
  }
  .landing-copy h1 {
    font-size: 47px;
  }
  .features {
    gap: 9px;
    display: grid;
  }
  .gallery {
    grid-template-columns: 1fr 1fr;
  }
}
