@font-face {
  font-family: Outfit;
  src: url(outfit-400.woff2);
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url(outfit-600.woff2);
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url(outfit-700.woff2);
  font-weight: 700;
  font-display: swap;
}
:root {
  font-family: Outfit, Arial, sans-serif;
  color: #282b27;
  background: #f7f6f2;
  --paper: #f7f6f2;
  --surface: #fffefa;
  --line: #dddcd4;
  --muted: #76796e;
  --accent: #47604b;
  --soft: #e9ede4;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 7px;
  padding: 10px 13px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 14px;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:hover {
  background: #edeee7;
}
button:active {
  transform: scale(0.98);
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
button.primary:hover {
  background: #354f3a;
}
button.ghost {
  border-color: transparent;
  background: transparent;
}
button.icon {
  width: 40px;
  padding: 8px;
}
button.small {
  padding: 6px 10px;
  min-height: 34px;
  font-size: 12px;
}
.active {
  color: var(--accent);
  background: var(--soft) !important;
}
a {
  color: inherit;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 10px 11px;
  min-height: 42px;
  font-size: 14px;
}
textarea {
  resize: vertical;
  line-height: 1.5;
}
input[type="color"] {
  padding: 4px;
  min-height: 40px;
}
input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 7px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: -0.045em;
  font-weight: 600;
}
h2 {
  font-size: 22px;
  letter-spacing: -0.025em;
  font-weight: 600;
}
h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
}
small,
.muted {
  color: var(--muted);
}
small {
  font-size: 12px;
  line-height: 1.5;
  display: block;
}
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.between {
  justify-content: space-between;
}
.wrap {
  flex-wrap: wrap;
}
.grow {
  flex: 1;
  min-width: 0;
}
.gap {
  height: 22px;
}
.field {
  margin-bottom: 18px;
}
.fields2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.divider {
  border-top: 1px solid var(--line);
  margin: 24px 0;
}
.error {
  color: #984532;
  background: #fbede7;
  border: 1px solid #e6c0af;
  padding: 12px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
}
.notice {
  padding: 12px;
  background: var(--soft);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
}
.tag {
  font-size: 11px;
  border: 1px solid var(--line);
  padding: 4px 7px;
  border-radius: 4px;
  color: var(--muted);
}
.hidden {
  display: none !important;
}
.boot {
  padding: 60px;
  color: var(--muted);
}
.topbar {
  height: 76px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: var(--paper);
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.04em;
  text-decoration: none;
}
.brand-mark {
  height: 28px;
  width: 28px;
  border: 1.5px solid var(--accent);
  display: grid;
  place-items: center;
  transform: rotate(-8deg);
  color: var(--accent);
  font-size: 15px;
}
.topbar .crumb {
  color: var(--muted);
  font-size: 13px;
  max-width: 300px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.account {
  display: flex;
  align-items: center;
  gap: 10px;
}
.account .name {
  font-size: 13px;
  color: var(--muted);
}
.login {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.login-art {
  background: #e4e8dd;
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}
.login-art h1 {
  font-size: 64px;
  max-width: 520px;
  position: relative;
  z-index: 1;
  margin-top: 60px;
}
.login-art .ring {
  position: absolute;
  width: 400px;
  height: 400px;
  border: 72px solid #b1bda5;
  border-radius: 50%;
  right: -120px;
  bottom: 50px;
}
.login-art .sheet {
  position: absolute;
  right: 12%;
  bottom: 15%;
  width: 180px;
  height: 250px;
  background: #fffef6;
  transform: rotate(-13deg);
  padding: 26px;
  border: 1px solid #c3c9bb;
  box-shadow: 0 12px 30px #2735290a;
}
.sheet b {
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.05em;
}
.sheet hr {
  margin: 28px 0;
  border: 0;
  border-top: 1px solid #b1bda5;
}
.login-form {
  align-self: center;
  max-width: 440px;
  padding: 48px;
  width: 100%;
  margin: auto;
}
.login-form h2 {
  font-size: 30px;
}
.login-form .primary {
  width: 100%;
}
.login-form p {
  font-size: 14px;
  line-height: 1.6;
}
.home {
  max-width: 1400px;
  margin: auto;
  padding: 52px 40px 80px;
}
.home-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 38px;
  gap: 20px;
}
.home-intro h1 {
  margin-bottom: 10px;
}
.home-intro p {
  margin: 0;
  color: var(--muted);
}
.project-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 22px;
}
.project-card {
  text-align: left;
  display: block;
  align-self: start;
  border: 0;
  padding: 0;
  background: transparent;
  min-width: 0;
}
.project-card:hover {
  background: transparent;
}
.cover {
  aspect-ratio: 4/4.6;
  background: #e9e9e2;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.cover-preview {
  position: absolute;
  border: 0;
  pointer-events: none;
  transform-origin: top left;
  background: #fff;
  box-shadow: 0 5px 12px #222a2210;
}
.cover-loading {
  color: var(--muted);
  font-size: 12px;
}
.cover-ready .cover-loading {
  display: none;
}
.cover-empty > span {
  display: grid;
  justify-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.project-card h3 {
  margin: 15px 0 6px;
  font-size: 17px;
}
.project-card p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.empty-home {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 70px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 48px 0;
}
.empty-home h2 {
  font-size: 32px;
  max-width: 400px;
}
.empty-home p {
  max-width: 400px;
  color: var(--muted);
  line-height: 1.6;
}
.examples {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.example {
  display: block;
  text-align: left;
  padding: 18px;
  border-radius: 3px;
}
.example .example-art {
  height: 190px;
  background: #eee5d6;
  color: #863d43;
  padding: 22px;
  margin-bottom: 16px;
  overflow: hidden;
}
.example-art strong {
  font-size: 39px;
  line-height: 0.95;
  letter-spacing: -0.07em;
  display: block;
}
.example.culture .example-art {
  background: #e3e7da;
  color: #304835;
}
.example p {
  margin: 6px 0 0;
  font-size: 12px;
}
.editor-shell {
  height: calc(100dvh - 76px);
  display: grid;
  grid-template-columns: 290px minmax(320px, 1fr) 260px;
}
.left-panel,
.properties {
  background: var(--paper);
  overflow-y: auto;
  padding: 24px 20px;
}
.left-panel {
  border-right: 1px solid var(--line);
}
.properties {
  border-left: 1px solid var(--line);
}
.panel-title {
  margin-bottom: 20px;
}
.panel-title h2 {
  font-size: 17px;
  margin: 0;
}
.panel-title small {
  margin-top: 5px;
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  gap: 18px;
}
.tabs button {
  border: 0;
  border-radius: 0;
  padding: 7px 0 12px;
  min-height: 38px;
  background: transparent;
  font-size: 13px;
  color: var(--muted);
}
.tabs button.selected {
  border-bottom: 2px solid var(--accent);
  color: var(--accent);
}
.left-panel textarea {
  min-height: 145px;
}
.left-panel .prompt {
  min-height: 90px;
}
.left-panel .primary {
  width: 100%;
}
.asset-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.asset-row img {
  height: 42px;
  width: 42px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.asset-row span {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.asset-row small {
  font-size: 10px;
}
.asset-upload {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 14px;
}
.asset-upload select {
  font-size: 12px;
  flex: 1;
}
.asset-upload button {
  font-size: 12px;
  white-space: nowrap;
}
.model-hint {
  margin-top: 6px;
  font-size: 11px;
}
.history-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.history-item p {
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 7px;
  overflow-wrap: anywhere;
}
.history-item small {
  font-size: 11px;
}
.history-item.current {
  border-left: 2px solid var(--accent);
  padding-left: 10px;
}
.job {
  padding: 12px;
  background: var(--soft);
  border-radius: 6px;
  margin: 12px 0;
  font-size: 12px;
  line-height: 1.5;
}
.job.error-job {
  background: #faeee8;
}
.job .row {
  margin-top: 7px;
}
.workspace {
  min-width: 0;
  background: #e9e9e3;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.canvas-toolbar {
  min-height: 63px;
  border-bottom: 1px solid #d6d7cf;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  gap: 10px;
  background: #f2f2ec;
}
.canvas-toolbar select {
  max-width: 210px;
  background: transparent;
  font-size: 12px;
}
.canvas-toolbar .export-actions {
  display: flex;
  gap: 5px;
}
.export-actions button {
  font-size: 12px;
  min-height: 36px;
  padding: 6px 9px;
}
.stage {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px;
}
.canvas-frame {
  position: relative;
  flex: none;
  box-shadow: 0 8px 30px #29312912;
  background: #fff;
  overflow: hidden;
}
.canvas-frame iframe {
  border: 0;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  background: #fff;
}
.stage-empty {
  align-self: center;
  text-align: center;
  max-width: 340px;
  padding: 30px;
}
.stage-empty .outline {
  margin: auto auto 25px;
  width: 100px;
  height: 132px;
  border: 1px solid #a8b09f;
  position: relative;
}
.outline:before {
  content: "";
  position: absolute;
  top: 24px;
  left: 18px;
  width: 60px;
  height: 8px;
  background: #bcc6b2;
  box-shadow: 0 17px #bcc6b2;
}
.outline:after {
  content: "";
  position: absolute;
  bottom: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: 7px solid #bcc6b2;
  border-radius: 50%;
}
.stage-empty h3 {
  font-size: 21px;
}
.stage-empty p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}
.canvas-footer {
  padding: 10px 18px;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid #d6d7cf;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.properties textarea {
  min-height: 130px;
}
.properties .field {
  margin-bottom: 15px;
}
.properties .hint {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 22px;
}
.properties .fields2 {
  gap: 9px;
}
.properties input,
.properties select {
  font-size: 13px;
}
.lock-row {
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 18px 0;
}
.lock-row label {
  margin: 0;
}
.overlay {
  position: fixed;
  inset: 0;
  background: #20251e55;
  backdrop-filter: blur(3px);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.dialog {
  width: min(630px, 100%);
  max-height: 90dvh;
  overflow: auto;
  background: var(--paper);
  padding: 30px;
  border-radius: 10px;
  border: 1px solid #e7e8df;
  box-shadow: 0 20px 70px #18211720;
}
.dialog.wide {
  width: min(820px, 100%);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.dialog-head h2 {
  margin: 0;
}
.dialog p {
  line-height: 1.6;
  font-size: 14px;
  color: var(--muted);
}
.dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.format-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-bottom: 20px;
}
.format-grid button {
  font-size: 12px;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.format-grid button span {
  font-size: 10px;
  color: var(--muted);
}
.model-list {
  max-height: 270px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.model-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
.model-item:last-child {
  border: 0;
}
.model-item strong {
  font-size: 13px;
  font-weight: 600;
}
.model-item small {
  font-size: 11px;
}
.model-item button {
  flex: none;
}
.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.user-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.save-state {
  color: var(--accent);
}
#toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: #29392c;
  color: white;
  border-radius: 8px;
  padding: 13px 20px;
  z-index: 20;
  font-size: 14px;
  box-shadow: 0 5px 20px #23332920;
  max-width: 90vw;
  display: none;
}
#toast.visible {
  display: block;
}
.mobile-nav {
  display: none;
}
@media (min-width: 1500px) {
  .editor-shell {
    grid-template-columns: 320px minmax(320px, 1fr) 290px;
  }
  .left-panel,
  .properties {
    padding: 26px;
  }
}
@media (max-width: 1150px) {
  .editor-shell {
    grid-template-columns: 250px minmax(280px, 1fr) 220px;
  }
  .left-panel,
  .properties {
    padding: 20px 14px;
  }
  .project-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .topbar {
    padding: 0 22px;
  }
  .canvas-toolbar {
    padding: 9px 10px;
    flex-wrap: wrap;
  }
  .stage {
    padding: 22px;
  }
  .account .name {
    display: none;
  }
}
@media (max-width: 860px) {
  .editor-shell {
    display: block;
    height: auto;
  }
  .left-panel,
  .properties {
    border: 0;
    overflow: visible;
    max-width: 620px;
    margin: auto;
    padding: 24px;
  }
  .workspace {
    height: calc(100dvh - 134px);
  }
  .mobile-nav {
    height: 58px;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid var(--line);
    gap: 12px;
    padding: 8px;
  }
  .mobile-nav button {
    font-size: 13px;
    min-height: 38px;
  }
  .editor-shell[data-mobile="canvas"] .left-panel,
  .editor-shell[data-mobile="canvas"] .properties {
    display: none;
  }
  .editor-shell[data-mobile="brief"] .workspace,
  .editor-shell[data-mobile="brief"] .properties {
    display: none;
  }
  .editor-shell[data-mobile="properties"] .workspace,
  .editor-shell[data-mobile="properties"] .left-panel {
    display: none;
  }
  .empty-home {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .project-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-art {
    display: none;
  }
  .login-form {
    padding: 30px;
  }
  .topbar .crumb {
    max-width: 180px;
  }
  .home {
    padding: 34px 24px;
  }
  .home-intro {
    align-items: flex-start;
  }
  .home-intro h1 {
    font-size: 32px;
  }
}
@media (max-width: 500px) {
  .topbar {
    height: 65px;
    padding: 0 14px;
  }
  .brand {
    font-size: 18px;
  }
  .brand-mark {
    width: 24px;
    height: 24px;
  }
  .topbar .crumb {
    display: none;
  }
  .account {
    gap: 2px;
  }
  .account button {
    padding: 8px;
  }
  .home {
    padding: 30px 18px;
  }
  .home-intro {
    display: block;
  }
  .home-intro > button {
    margin-top: 20px;
  }
  .project-list {
    gap: 22px 14px;
  }
  .project-card h3 {
    font-size: 15px;
  }
  .cover .mini-page {
    font-size: 22px;
  }
  .empty-home {
    padding-top: 25px;
  }
  .examples {
    gap: 12px;
  }
  .example {
    padding: 12px;
  }
  .example .example-art {
    height: 145px;
    padding: 16px;
  }
  .example-art strong {
    font-size: 29px;
  }
  .overlay {
    padding: 12px;
  }
  .dialog {
    padding: 22px;
  }
  .format-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .workspace {
    height: calc(100dvh - 123px);
  }
  .canvas-toolbar select {
    max-width: 150px;
  }
  .canvas-toolbar {
    gap: 6px;
  }
  .export-actions button {
    padding: 6px;
  }
  .stage {
    padding: 18px;
  }
  .fields2 {
    gap: 10px;
  }
  h1 {
    font-size: 32px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 860px) {
  .editor-shell[data-mobile="brief"] .workspace,
  .editor-shell[data-mobile="properties"] .workspace {
    display: flex;
    position: fixed;
    left: -10000px;
    top: 0;
    width: 100vw;
    visibility: hidden;
    pointer-events: none;
  }
}
.settings-tabs {
  gap: 22px;
  overflow-x: auto;
}
.settings-tabs button {
  white-space: nowrap;
}
.team-heading {
  align-items: flex-start;
}
.team-heading h3 {
  margin: 0 0 6px;
}
.team-list {
  border-top: 1px solid var(--line);
}
.team-list .user-row {
  align-items: center;
  gap: 14px;
  padding: 16px 0;
}
.user-row strong {
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.user-row small {
  overflow-wrap: anywhere;
}
.user-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.status-active {
  background: var(--soft);
  border-color: #d4dccb;
  color: var(--accent);
}
.user-inactive .grow {
  color: var(--muted);
}
.account-editor {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 22px;
}
.account-editor > .row {
  margin-bottom: 18px;
}
.account-editor h3 {
  margin: 0;
}
.account-editor .inline-check {
  margin: 16px 0 8px;
  min-height: 32px;
}
.inline-check label {
  margin: 0;
  font-size: 13px;
}
.my-account h3 {
  font-size: 22px;
  margin: 0 0 8px;
}
.my-account p {
  margin: 0 0 12px;
}
.account-editor .notice {
  margin-bottom: 0;
}
@media (max-width: 550px) {
  .team-list .user-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }
  .team-list .user-row .grow {
    grid-column: 1;
  }
  .team-list .user-badges {
    grid-column: 1;
    justify-content: flex-start;
  }
  .team-list .user-row > button {
    grid-column: 2;
    grid-row: 1/3;
  }
  .account-editor .fields2 {
    grid-template-columns: 1fr;
  }
  .settings-tabs {
    gap: 18px;
  }
  .settings-tabs button {
    font-size: 12px;
  }
  .team-heading {
    flex-wrap: wrap;
  }
}
