@font-face {
  font-family: LocalSans;
  src: local("Segoe UI");
}
select:not([multiple]):not([size]),
select:not([multiple])[size="1"] {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%237d8491' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px 16px;
  padding-right: 46px;
}
@media (forced-colors: active) {
  select:not([multiple]):not([size]),
  select:not([multiple])[size="1"] {
    appearance: auto;
    -webkit-appearance: auto;
    background-image: none;
    padding-right: 14px;
  }
}
:root {
  font-family:
    LocalSans,
    Inter,
    Arial,
    sans-serif;
  color: #242936;
  background: #f6f7f9;
  font-synthesis: none;
  --ink:#242936;
  --muted:#7d8491;
  --line:#e7e9ee;
  --accent:#5267e9;
  --soft:#eef0ff;
  --green:#17866c;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: .55;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #a4afff;
  outline-offset: 3px;
}
button {
  border: 0;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
svg {
  flex-shrink: 0;
  vertical-align: middle;
}
h1,
h2,
h3,
p {
  margin: 0;
}
p {
  line-height: 1.65;
}
input,
textarea,
select {
  width: 100%;
  min-width: 0;
  background: #fff;
  border: 1px solid #dfe3eb;
  border-radius: 10px;
  color: var(--ink);
  padding: 12px 14px;
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #5267e912;
}
textarea {
  resize: vertical;
  line-height: 1.65;
  font-size: 16px;
}
button.primary {
  background: var(--accent);
  color: white;
  border: 1px solid var(--accent);
}
button.primary:hover {
  background: #4156d6;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
  max-width: 100%;
}
.btn:hover {
  background: #f2f4f8;
}
.btn.small {
  font-size: 12px;
  padding: 8px 11px;
}
.btn.danger {
  color: #bf4f50;
  background: #fff5f4;
  border-color: #f2d8d6;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}
.icon-button:hover {
  background: #eef0f5;
}
.app-shell {
  display: grid;
  grid-template-columns: 226px minmax(0, 1fr);
  min-height: 100vh;
}
.mobile-header, .menu-close, .menu-backdrop { display: none; }
.sidebar {
  background: #151922;
  color: #9299ab;
  padding: 30px 19px 20px;
  position: fixed;
  inset: 0 auto 0 0;
  width: 226px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f6f7fc;
  padding: 0 10px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.6px;
}
.brand-mark {
  background: #586df2;
  border-radius: 11px;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  color: #fff;
}
.brand em {
  font-style: normal;
  color: #8b95b1;
  font-weight: 400;
}
.sidebar-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 650;
  padding: 0 14px;
  margin: 43px 0 12px;
  color: #697285;
}
.nav-button {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 11px;
  width: 100%;
  padding: 12px 13px;
  border-radius: 9px;
  background: none;
  color: #9299ab;
  font-size: 13px;
  margin: 3px 0;
}
.nav-button:hover {
  background: #ffffff09;
  color: white;
}
.nav-button.active {
  background: #ffffff0c;
  color: #f1f3fc;
}
.nav-button.active svg {
  color: #8594ff;
}
.nav-count {
  margin-left: auto;
  color: #8991a6;
  background: #ffffff0d;
  padding: 2px 6px;
  font-size: 11px;
  border-radius: 4px;
}
.project-nav {
  overflow: auto;
  max-height: 260px;
}
.project-link {
  padding: 9px 14px;
  color: #939bae;
  display: block;
  background: none;
  text-align: left;
  width: 100%;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-link:hover {
  color: #fff;
}
.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid #ffffff0a;
  padding-top: 20px;
}
.workspace-person {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 15px 9px 0;
}
.avatar {
  width: 31px;
  height: 31px;
  border-radius: 8px;
  background: #2b3242;
  display: grid;
  place-items: center;
  color: #b9c2d6;
  font-size: 11px;
}
.workspace-person strong {
  display: block;
  color: #c1c7d6;
  font-size: 12px;
  font-weight: 500;
}
.workspace-person small {
  font-size: 10px;
  color: #778095;
}
.main {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 79px;
  border-bottom: 1px solid var(--line);
  padding: 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: #ffffff85;
}
.breadcrumb {
  font-size: 11px;
  color: #8f96a3;
  letter-spacing: .6px;
}
.breadcrumb b {
  color: #515a6a;
  font-weight: 500;
}
.top-right {
  display: flex;
  align-items: center;
  gap: 17px;
  font-size: 11px;
  color: #8a91a0;
}
.top-right .platform {
  color: #555f73;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 9px;
  font-weight: 600;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #26a788;
  display: inline-block;
  margin-right: 6px;
}
.page {
  max-width: 1260px;
  margin: 0 auto;
  padding: 44px 44px 60px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.7px;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(30px, 3.2vw, 43px);
  letter-spacing: -1.6px;
  font-weight: 650;
  line-height: 1.2;
  margin-bottom: 15px;
}
.hero p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 570px;
}
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 26px;
  align-items: start;
  margin-top: 30px;
}
.compose {
  background: #fff;
  border: 1px solid #e3e6ee;
  border-radius: 16px;
  box-shadow: 0 5px 22px #303c6010;
  overflow: hidden;
}
.compose-top {
  padding: 22px 23px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.compose-top strong {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
}
.compose-top strong svg {
  color: var(--accent);
}
.kbd {
  font-size: 10px;
  color: #a1a7b2;
  border: 1px solid #edf0f4;
  padding: 4px 6px;
  border-radius: 5px;
}
.compose textarea {
  border: 0;
  box-shadow: none;
  background: transparent;
  border-radius: 0;
  padding: 12px 23px 16px;
  min-height: 192px;
  resize: vertical;
  font-size: 15px;
  line-height: 1.85;
}
.compose textarea::placeholder {
  color: #a5aab6;
}
.compose-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  border-top: 1px solid #f0f2f5;
  padding: 14px 18px;
}
.compose-bottom .primary {
  white-space: nowrap;
}
.under-compose {
  font-size: 11px;
  color: #969eaa;
  display: flex;
  gap: 7px;
  align-items: flex-start;
  line-height: 1.5;
  margin: 13px 2px;
}
.under-compose svg {
  margin-top: 1px;
}
.process-card {
  padding: 21px 20px 19px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.process-card h3 {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 22px;
}
.process-step {
  position: relative;
  display: flex;
  gap: 12px;
  padding-bottom: 23px;
  align-items: start;
}
.process-step:last-of-type {
  padding-bottom: 0;
}
.process-step:not(:last-of-type):after {
  content: "";
  width: 1px;
  background: #e7eaf2;
  position: absolute;
  left: 12px;
  top: 27px;
  bottom: 4px;
}
.step-num {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 25px;
  height: 25px;
  font-size: 10px;
  font-weight: 650;
  border: 1px solid #e5e8f0;
  background: #fafbfe;
  border-radius: 50%;
  color: #858e9e;
}
.process-step.active .step-num {
  background: var(--soft);
  border-color: #e2e6ff;
  color: var(--accent);
}
.process-step strong {
  font-size: 11px;
  display: block;
  margin: 3px 0 4px;
  font-weight: 600;
}
.process-step small {
  font-size: 10px;
  line-height: 1.5;
  color: #939aa6;
  display: block;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 500;
  padding: 4px 7px;
  border-radius: 5px;
  background: #f2f4f8;
  color: #778194;
}
.tag.approval {
  color: #876bb4;
  background: #f6f1fc;
  margin-top: 6px;
}
.tag.demo {
  color: #98702c;
  background: #fff5df;
}
.tag.green {
  color: #137b65;
  background: #eaf7f2;
}
.examples {
  margin-top: 29px;
}
.section-label {
  font-size: 11px;
  color: #8c94a2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.example-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.example {
  border: 1px solid var(--line);
  background: #fff;
  text-align: left;
  padding: 15px 14px;
  border-radius: 11px;
  min-width: 0;
  transition: transform .15s, border-color .15s;
}
.example:hover {
  transform: translateY(-2px);
  border-color: #b5bfed;
}
.example .example-icon {
  color: #737f99;
  margin-bottom: 13px;
}
.example strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 5px;
}
.example span {
  font-size: 10px;
  color: #9aa1ad;
  line-height: 1.5;
  display: block;
}
.demo-strip {
  margin-top: 27px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border: 1px dashed #d8deec;
  border-radius: 12px;
  background: #f0f2f730;
}
.demo-strip strong {
  font-size: 11px;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}
.demo-strip p {
  font-size: 10px;
  color: #929ba9;
}
.demo-strip .btn {
  font-size: 11px;
  padding: 9px 12px;
}
.connection-note {
  margin-top: 15px;
  font-size: 11px;
  color: #8d95a4;
  line-height: 1.6;
}
.connection-note button {
  background: none;
  padding: 0;
  color: var(--accent);
  font-size: inherit;
  text-decoration: underline;
}
.page-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 25px;
}
.page-title h1 {
  font-size: 27px;
  letter-spacing: -.8px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.page-title p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
}
.button-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.project-list {
  display: grid;
  gap: 12px;
}
.project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  text-align: left;
  width: 100%;
  color: var(--ink);
}
.project-row:hover {
  border-color: #b9c2ef;
}
.project-row strong {
  display: block;
  font-size: 14px;
  margin-bottom: 8px;
}
.project-row small {
  color: var(--muted);
  font-size: 11px;
}
.empty {
  border: 1px dashed #d8dfeb;
  padding: 45px;
  text-align: center;
  border-radius: 16px;
  color: var(--muted);
  font-size: 13px;
}






.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 22px;
  margin-bottom: 18px;
  min-width: 0;
}
.card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 17px;
}
.card-title h2 {
  font-size: 14px;
  font-weight: 650;
}
.card p {
  font-size: 12px;
  color: #7c8595;
}
.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 19px 23px;
  margin-top: 20px;
}
.field-caption {
  display: block;
  font-size: 10px;
  color: #949dab;
  margin-bottom: 6px;
}
.field-value {
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 20px;
}
.metric {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 17px;
}
.metric strong {
  display: block;
  font-size: 21px;
  letter-spacing: -.5px;
  margin: 9px 0 3px;
}
.metric small {
  color: #949dab;
  font-size: 10px;
}
.creative-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.creative {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  min-width: 0;
}
.creative-top {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 15px;
}
.mini-logo {
  display: grid;
  place-items: center;
  background: #edf1fc;
  color: #6d7eab;
  font-size: 10px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
}
.creative-top strong {
  font-size: 10px;
  display: block;
  line-height: 1.4;
}
.creative-top small {
  font-size: 9px;
  color: #a1a7b1;
}
.creative-top button {
  margin-left: auto;
}
.visual {
  height: 145px;
  background:
    linear-gradient(
      135deg,
      #e1e8ed,
      #eef1ec);
  position: relative;
  overflow: hidden;
  padding: 22px;
  display: flex;
  align-items: center;
}
.visual:before,
.visual:after {
  content: "";
  position: absolute;
  width: 250px;
  height: 180px;
  transform: rotate(-32deg);
  background: #c7d3d4;
  bottom: -130px;
  left: -30px;
  border-radius: 18px;
}
.visual:after {
  background: #aebfc4;
  left: 110px;
  bottom: -160px;
  transform: rotate(24deg);
}
.visual.variant-1 {
  background:
    linear-gradient(
      120deg,
      #efe8df,
      #f4f1e9);
}
.visual.variant-1:before {
  background: #d6cdbd;
}
.visual.variant-1:after {
  background: #c3bbaa;
}
.visual strong {
  font-size: 20px;
  letter-spacing: -.5px;
  line-height: 1.2;
  max-width: 210px;
  color: #506369;
  position: relative;
  z-index: 1;
  overflow-wrap: anywhere;
}
.visual.variant-1 strong {
  color: #796e5d;
}
.visual-label {
  position: absolute;
  right: 9px;
  bottom: 8px;
  z-index: 2;
  color: #4e5b64;
  background: #ffffffb8;
  padding: 3px 6px;
  font-size: 8px;
  border-radius: 4px;
}
.creative-content {
  padding: 15px;
}
.creative-content p {
  font-size: 11px;
  color: #6f7989;
  line-height: 1.75;
  white-space: pre-wrap;
}
.creative-cta {
  display: block;
  margin-top: 13px;
  background: #f0f3f9;
  border-radius: 6px;
  text-align: center;
  color: #6b7d9c;
  font-size: 10px;
  font-weight: 600;
  padding: 9px;
}
.creative-info {
  border-top: 1px solid #eef0f4;
  padding: 13px 15px;
  background: #fcfcfe;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 9px;
  color: #8c94a3;
}
.creative details {
  font-size: 10px;
  color: #8b94a3;
  padding: 0 15px 13px;
  line-height: 1.6;
}
.creative details p {
  font-size: 10px;
  margin-top: 7px;
  color: #8b94a3;
}
.budget-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 0;
  font-size: 11px;
  color: #8992a2;
}
.budget-line strong {
  color: #465164;
  font-weight: 600;
  text-align: right;
}
.budget-total {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 16px;
}
.budget-total strong {
  font-size: 18px;
  letter-spacing: -.5px;
  color: var(--ink);
}
.rule {
  background: #f6f7fb;
  border: 1px solid #edf0f6;
  border-radius: 9px;
  padding: 13px;
  margin-top: 17px;
}
.rule strong {
  font-size: 10px;
  display: block;
  margin-bottom: 7px;
  color: #637193;
}
.rule p {
  font-size: 10px;
  color: #8c96a7;
  line-height: 1.7;
}
.action-card {
  border-color: #dce1fc;
  background: #f9faff;
}
.action-card h3 {
  font-size: 13px;
  margin-bottom: 10px;
}
.action-card p {
  font-size: 11px;
  color: #8490a6;
  line-height: 1.7;
}
.action-card .btn {
  width: 100%;
  margin-top: 15px;
}
.check-label {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 14px;
  font-size: 11px;
  color: #697890;
  line-height: 1.6;
}
.check-label input {
  width: 15px;
  flex: 0 0 15px;
  margin: 2px 0 0;
  padding: 0;
}
.alert {
  border: 1px solid #efdcbc;
  background: #fff9ed;
  border-radius: 10px;
  padding: 13px 16px;
  color: #a27e43;
  font-size: 11px;
  line-height: 1.7;
  margin-bottom: 18px;
}
.alert.error {
  border-color: #f0cdcf;
  color: #b76b72;
  background: #fff6f6;
}
.alert ul, .alert ol {
  margin: 8px 0 0;
  padding-left: 18px;
}
.chat-entry {
  font-size: 12px;
  line-height: 1.8;
  color: #687387;
  white-space: pre-wrap;
  margin-top: 15px;
  border-left: 2px solid #e4e8f2;
  padding-left: 12px;
  overflow-wrap: anywhere;
}
.chat-entry small {
  display: block;
  color: #a1a9b6;
  font-size: 9px;
  margin-bottom: 3px;
}
.chat-form {
  margin-top: 18px;
  display: grid;
  gap: 8px;
  align-items: flex-end;
}
.chat-controls { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.chat-controls small { flex:1; min-width:180px; color:var(--muted); font-size:11px; }
.chat-controls .btn.primary { margin-left:auto; }
.chat-controls > .media-attach { flex: 1 1 280px; }
.compose > .media-attach, .compose > .chat-media:not(:empty) { margin: 12px 23px 20px; }
.compose > .chat-media:empty { display: none; }
.chat-attach { cursor:pointer; }
.chat-media { display:flex; flex-wrap:wrap; gap:12px; margin-top:10px; }
.chat-media-item { display:grid; gap:6px; max-width:240px; overflow-wrap:anywhere; }
.chat-media-item img, .chat-media-item video { max-width:100%; max-height:220px; object-fit:contain; border-radius:10px; }
.chat-text { white-space:pre-wrap; }
.chat-form textarea {
  min-height: 77px;
  font-size: 13px;
}
.chat-form .btn {
  padding: 12px;
}
.event {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 15px;
  font-size: 10px;
  color: #7f899a;
  line-height: 1.7;
}
.event time {
  font-size: 9px;
  color: #a0a8b4;
  flex: 0 0 33px;
  margin-top: 2px;
}
.event span {
  overflow-wrap: anywhere;
}
.source {
  font-size: 10px;
  line-height: 1.7;
  color: #8791a1;
  margin-top: 12px;
  overflow-wrap: anywhere;
}
.source .tag {
  font-size: 9px;
}
.source a {
  display: block;
  margin-bottom: 5px;
}
.source p {
  font-size: 10px;
  margin-top: 5px;
}
.demo-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.demo-controls .btn {
  font-size: 10px;
  justify-content: flex-start;
  padding: 10px;
}
.settings-layout {
  max-width: 730px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
  margin-top: 19px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.form-field {
  display: block;
  min-width: 0;
}
.form-field > span {
  display: block;
  font-size: 11px;
  color: #7e8999;
  margin-bottom: 7px;
}
.form-field small {
  display: block;
  font-size: 10px;
  color: #a0a7b2;
  line-height: 1.6;
  margin-top: 6px;
}
.form-field input,
.form-field select {
  font-size: 14px;
}
.settings-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 22px;
}
.settings-footer p {
  font-size: 10px;
  color: #959eaa;
  max-width: 410px;
}
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #e5e9fa;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
}
.progress-box {
  padding: 50px 25px;
  text-align: center;
}
.progress-box h2 {
  font-size: 18px;
  margin: 17px 0 10px;
}
.progress-box p {
  font-size: 12px;
  color: #8d97a9;
}
.loading-screen {
  padding: 80px;
  text-align: center;
  color: #8b95a5;
  font-size: 14px;
}

#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: #202939;
  color: white;
  padding: 13px 19px;
  border-radius: 10px;
  box-shadow: 0 8px 35px #0002;
  font-size: 12px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: .2s;
  max-width: min(560px, 90vw);
  line-height: 1.6;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  width: min(720px, calc(100vw - 28px));
  padding: 26px;
  color: var(--ink);
  max-height: 90vh;
  box-shadow: 0 30px 100px #0003;
}
dialog::backdrop {
  background: #141b2b66;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font-size: 19px;
  margin: 0 0 8px;
}
dialog p {
  font-size: 12px;
  color: var(--muted);
}
dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 23px;
}
dialog textarea {
  font-size: 14px;
  min-height: 100px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (min-width: 1500px) {
  .page {
    padding-top: 59px;
  }
  .home-grid {
    grid-template-columns: minmax(0, 1fr) 295px;
  }
  .hero h1 {
    font-size: 45px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 190px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .app-shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .page {
    padding: 32px 26px 45px;
  }
  .topbar {
    padding: 0 26px;
  }
  .home-grid {
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 18px;
  }
  .compose-bottom {
    align-items: flex-end;
  }
  .hero h1 {
    font-size: 35px;
  }
  .creative-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 920px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
  .home-grid > .process-card {
    order: -1;
  }
  .creative-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hero h1 {
    font-size: 37px;
  }
  .top-right > span:first-child {
    display: none;
  }
  .page-title .button-row .btn {
    font-size: 11px;
    padding: 9px 11px;
  }
}
@media (max-width: 650px) {
  .app-shell {
    display: block;
  }
  .mobile-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 63px; padding: 0 19px; background: #fff; border-bottom: 1px solid var(--line); }
  .mobile-header .brand { color: var(--ink); font-size: 19px; padding: 0; }
  .mobile-header .icon-button { width: 44px; height: 44px; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(320px, 86vw); height: 100dvh; padding: max(24px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom)); overflow-y: auto; transform: translateX(-100%); visibility: hidden; z-index: 60; }
  .menu-open .sidebar { transform: translateX(0); visibility: visible; }
  .menu-close { display: grid; position: absolute; right: 12px; top: max(16px, env(safe-area-inset-top)); color: #fff; width: 44px; height: 44px; }
  .sidebar .brand { padding-right: 42px; }
  .menu-backdrop { display: block; position: fixed; inset: 0; z-index: 50; background: #10152180; }
  body.menu-open { overflow: hidden; }
  .main {
    width: 100%;
  }
  .topbar {
    height: 53px;
    padding: 0 19px;
  }
  .breadcrumb {
    font-size: 9px;
  }
  .top-right {
    gap: 0;
  }
  .top-right .platform {
    font-size: 10px;
    padding: 5px 7px;
  }
  .page {
    padding: 29px 19px 45px;
  }
  .hero h1 {
    font-size: 33px;
    letter-spacing: -1.1px;
  }
  .hero p {
    font-size: 13px;
  }
  .hero br {
    display: none;
  }
  .eyebrow {
    font-size: 9px;
    margin-bottom: 13px;
  }
  .home-grid {
    margin-top: 24px;
  }
  .compose-top {
    padding: 17px 17px 8px;
  }
  .compose textarea {
    padding: 8px 17px 16px;
    min-height: 210px;
    font-size: 16px;
  }
  .compose-bottom {
    padding: 12px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .compose-bottom .btn {
    font-size: 12px;
    padding: 11px 12px;
  }
  .kbd {
    display: none;
  }
  .example-grid {
    grid-template-columns: 1fr;
  }
  .example {
    display: grid;
    grid-template-columns: 29px 1fr;
    gap: 0 10px;
    padding: 13px 15px;
  }
  .example .example-icon {
    grid-row: 1/3;
    align-self: center;
    margin: 0;
  }
  .example strong {
    font-size: 12px;
  }
  .example span {
    font-size: 10px;
  }
  .demo-strip {
    padding: 14px;
    align-items: flex-start;
    flex-direction: column;
  }
  .demo-strip .btn {
    width: 100%;
  }
  .page-title {
    flex-wrap: wrap;
  }
  .page-title h1 {
    font-size: 24px;
  }
  .page-title .button-row {
    width: 100%;
  }
  .page-title .btn {
    flex: 1;
  }

  .creative-grid {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 18px;
    margin-bottom: 16px;
  }
  .summary-grid {
    gap: 17px;
    grid-template-columns: 1fr;
  }
  .metrics {
    gap: 7px;
  }
  .metric {
    padding: 13px 10px;
  }
  .metric strong {
    font-size: 18px;
  }
  .metric .field-caption {
    font-size: 9px;
  }
  .metric small {
    font-size: 9px;
  }
  .creative-top strong {
    font-size: 12px;
  }
  .creative-top small {
    font-size: 10px;
  }
  .visual {
    height: 177px;
  }
  .visual strong {
    font-size: 24px;
  }
  .creative-content p {
    font-size: 13px;
  }
  .creative-cta {
    font-size: 12px;
  }
  .creative-info {
    font-size: 10px;
  }
  .creative details,
  .creative details p {
    font-size: 12px;
  }
  .chat-entry {
    font-size: 13px;
  }
  .chat-form textarea {
    font-size: 16px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .full {
    grid-column: 1;
  }
  .form-field input,
  .form-field select,
  dialog textarea {
    font-size: 16px;
  }
  .settings-footer {
    flex-direction: column;
  }
  .settings-footer .btn {
    width: 100%;
  }
  .project-row {
    padding: 16px;
  }
  .project-row strong {
    font-size: 13px;
  }
  .project-row .tag {
    font-size: 9px;
  }
  .card-title h2 {
    font-size: 13px;
  }
  .action-card p {
    font-size: 12px;
  }
  .check-label {
    font-size: 12px;
  }
  .event {
    font-size: 11px;
  }
  .rule p {
    font-size: 11px;
  }
  .budget-line {
    font-size: 12px;
  }
  .settings-layout .card p {
    font-size: 12px;
  }
  dialog {
    padding: 20px;
  }
  dialog footer {
    flex-wrap: wrap;
  }
  dialog footer .btn {
    flex: 1;
  }
}
.rules-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 360px);
  gap: 20px;
  align-items: start;
}
.rule-preset p {
  line-height: 1.7;
  margin-bottom: 16px;
}
.rule-preset.selected {
  border-color: #b9c2ff;
  box-shadow: 0 0 0 2px #eef0ff;
}
.rule-list .card {
  margin-bottom: 12px;
}
.rule-editor {
  position: sticky;
  top: 20px;
}
#rule-editor-toggle { width: 100%; }
.rule-editor form { margin-top: 12px; }
.rule-editor form > .field-caption {
  line-height: 1.7;
  margin-top: 15px;
}
.rule-editor .form-grid {
  gap: 13px;
}
.project-rule-card {
  border-color: #dce1fc;
  background: #fbfbff;
}
.project-rule-card p {
  line-height: 1.6;
}
.project-rule-card .form-field {
  margin-top: 14px;
}
.project-rule-card select {
  width: 100%;
}
.project-rule-card #apply-rule {
  width: 100%;
  margin-top: 12px;
}
.creative-targeting {
  padding: 8px 15px;
  background: #eef2ff;
  color: #4456be;
  font-size: 11px;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 6px;
}
.creative details {
  padding: 14px 15px 16px;
  background: #f8faff;
  border-top: 1px solid #e7ebff;
  color: #526078;
}
.creative details summary {
  font-size: 12px;
  color: #394da9;
  font-weight: 700;
  cursor: pointer;
}
.creative details[open] summary {
  margin-bottom: 12px;
}
.creative details p {
  font-size: 11px;
  color: #66758f;
  line-height: 1.65;
}
.keyword-note {
  font-size: 11px !important;
  color: #5a6682 !important;
}
.keyword-group {
  margin: 14px 0;
}
.keyword-group > strong {
  font-size: 10px;
  color: #596887;
  display: block;
  margin-bottom: 7px;
}
.keyword-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.keyword-chip {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  border: 1px solid #dfe5f4;
  border-radius: 6px;
  background: white;
  color: #3d5278;
  padding: 5px 7px;
  font-size: 10px;
  line-height: 1.4;
}
.keyword-chip.hot {
  border-color: #bfe8d7;
  background: #f2fbf6;
  color: #28654e;
}
.keyword-chip.warm {
  border-color: #e7dcba;
  background: #fffbef;
  color: #79602d;
}
.keyword-chip.cold {
  border-color: #e1e4eb;
  background: #f5f6f8;
  color: #6c7585;
}
.creative details [data-add-keywords] {
  margin-top: 10px;
}
.rule-editor .check-label small {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: #a0a7b2;
  line-height: 1.6;
}
.keyword-warning {
  color: #976722 !important;
  background: #fff8e8;
  border: 1px solid #f0dfb9;
  border-radius: 8px;
  padding: 9px 11px;
  margin: 10px 0 !important;
  font-size: 11px !important;
}
.keyword-warning:not(.mixed)#keyword-editor-advice {
  background: #f5f8ff;
  border-color: #dfe7ff;
  color: #66758f !important;
}
.creative details [data-edit-keywords] {
  margin-top: 11px;
}
.keyword-edit-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
  padding: 8px 0 14px;
}
.keyword-edit-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  border: 1px solid #dfe5f4;
  border-radius: 7px;
  background: #f8faff;
  color: #3d5278;
  padding: 4px 4px 4px 8px;
  font-size: 11px;
  line-height: 1.4;
}
.keyword-edit-item.hot {
  border-color: #bfe8d7;
  background: #f2fbf6;
  color: #28654e;
}
.keyword-edit-item.warm {
  border-color: #e7dcba;
  background: #fffbef;
  color: #79602d;
}
.keyword-edit-item > span {
  overflow-wrap: anywhere;
}
.keyword-edit-item button {
  flex-shrink: 0;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  font-size: 16px;
  line-height: 1;
  padding: 2px 5px;
}
.keyword-edit-item button:hover {
  background: #0000000d;
}
#keyword-form > [data-kind],
#keyword-form > .form-field {
  margin-top: 15px;
}
#keyword-form > #append-keywords {
  margin-top: 9px;
}
.creative-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 12px 15px;
  border-top: 1px solid #eef1f8;
}
.creative-actions .btn {
  flex: 1;
  min-width: 130px;
  white-space: normal;
}
#split-keywords-form > .field-caption {
  line-height: 1.6;
}
@media (max-width: 920px) {
  .rules-layout {
    grid-template-columns: 1fr;
  }
  .rule-editor {
    position: static;
  }
}
@media (max-width: 650px) {
  .creative details summary {
    font-size: 13px;
  }
  .keyword-chip {
    font-size: 11px;
  }
  .rules-page .page-title .btn {
    width: 100%;
  }
}
@media (max-width: 650px) {
  .keyword-edit-item {
    font-size: 12px;
  }
}
@media (max-width: 650px) {
  .creative-actions .btn {
    min-width: 100%;
    justify-content: flex-start;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
.creative-top > div:nth-child(2) {
  min-width: 0;
  overflow-wrap: anywhere;
}
.creative-top .icon-button {
  flex-shrink: 0;
}
.creative-content p,
.card p,
.project-row strong,
.alert,
.field-caption {
  overflow-wrap: anywhere;
}
.project-row > div {
  min-width: 0;
}
.project-row > .tag {
  flex-shrink: 0;
}
.demo-run-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 19px;
  margin: 0 0 18px;
  background: #eef2ff;
  border: 1px solid #cfd7ff;
  border-radius: 12px;
  color: #334472;
}
.demo-run-card strong {
  display: block;
  font-size: 13px;
  margin-bottom: 5px;
}
.demo-run-card p {
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 5px;
}
.demo-run-card small {
  font-size: 10px;
  line-height: 1.5;
  color: #697aab;
}
.demo-run-card .btn {
  flex: 0 0 auto;
  font-size: 12px;
  white-space: normal;
  text-align: center;
}
.demo-run-card.finished {
  background: #edf8f2;
  border-color: #ccebd9;
  color: #1d694b;
}
.demo-run-card.finished p {
  margin: 0;
  color: #4f7b67;
}
@media (max-width: 700px) {
  .demo-run-card {
    flex-direction: column;
    align-items: stretch;
  }
  .demo-run-card .btn {
    width: 100%;
  }
}
.visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.visual img ~ strong,
.visual img ~ .visual-label {
  position: relative;
  z-index: 1;
  color: #fff;
  text-shadow: 0 1px 8px #000d;
}
.visual img ~ .visual-label {
  background: #17213399;
}
.creative-upload {
  padding: 11px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid #eef0f4;
}
.creative-upload .btn {
  cursor: pointer;
}
.creative-upload small {
  color: #8893a4;
  font-size: 10px;
  line-height: 1.5;
  flex: 1;
  min-width: 160px;
}
.visual.has-image {
  height: 205px;
  align-items: flex-end;
}
.visual.has-image:not(.has-video) { height: auto; aspect-ratio: 1080 / 607; }
.visual.has-image:not(.has-video) img { object-fit: contain; }
.visual.has-video { padding: 0; height: 280px; background: #151922; }
.visual.has-video:before, .visual.has-video > strong { display: none; }
.visual.has-video video { width: 100%; height: 100%; object-fit: contain; }
.visual.has-video .visual-label { top: 8px; bottom: auto; pointer-events: none; }
.video-cover-needed { width: 100%; margin: 0; font-size: 12px; color: #927330; }
.visual.has-image:before {
  inset: auto 0 0;
  width: 100%;
  height: 75%;
  border-radius: 0;
  transform: none;
  background: linear-gradient(transparent, #102238bd);
  z-index: 1;
}
.visual.has-image:after {
  display: none;
}
.visual.has-image strong {
  max-width: 75%;
  font-size: 22px;
  color: #fff !important;
  text-shadow: 0 2px 12px #0009;
}
.visual.has-image .visual-label {
  position: absolute;
  right: 8px;
  bottom: 8px;
  color: #fff;
  background: #122339bf;
  text-shadow: none;
  font-size: 9px;
}
@media (max-width: 650px) {
  .visual.has-image {
    height: 215px;
  }
  .visual.has-image strong {
    font-size: 21px;
    max-width: 70%;
  }
}
.project-row {
  gap: 8px;
}
.project-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex: 1;
  min-width: 0;
  text-align: left;
  background: transparent;
  color: var(--ink);
  padding: 0;
}
.project-row-main > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.project-row-main:hover strong {
  color: var(--accent);
}
.project-delete {
  flex: 0 0 36px;
  color: #b66666;
}
.project-delete:hover {
  background: #fff2f2;
}
.project-row-main .tag {
  flex-shrink: 0;
}
@media (max-width: 650px) {
  .project-row {
    padding: 12px;
  }
  .project-row-main {
    gap: 8px;
  }
  .project-delete {
    width: 34px;
    flex-basis: 34px;
  }
}
.provider-chooser {
  margin: 16px 0 20px;
}
.provider-chooser a {
  font-size: 12px;
}
[hidden] {
  display: none !important;
}
.new-account-choice {
  padding: 0 18px 15px;
  display: grid;
  gap: 12px;
}
.connection-guide {
  padding: 13px;
  border: 1px solid #e3e6ed;
  border-radius: 10px;
  background: #f7f8fc;
  min-width: 0;
}
.connection-guide.connected {
  background: #f2faf8;
  border-color: #d9ede7;
}
.connection-guide strong { display: block; font-size: 12px; line-height: 1.5; }
.connection-guide p { margin: 7px 0 0; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.connection-guide .btn { margin: 10px 0 0; }
.new-project-options > .connection-guide { grid-column: 1 / -1; }
.connection-steps { padding-left: 21px; margin: 18px 0; font-size: 12px; line-height: 1.8; }
.connection-steps li + li { margin-top: 10px; }
.connection-steps a { overflow-wrap: anywhere; }
.connection-return { max-width: 730px; margin: 0 0 18px; padding: 16px; border: 1px solid #e3e6ed; border-radius: 12px; background: #fff; }
.connection-return p { font-size: 12px; line-height: 1.7; }
.connection-back { margin-top: 16px; }
#community-connection, #vk-account-settings, #model-settings { scroll-margin-top: 18px; }
.new-project-options {
  margin-top: 0;
  padding: 0 18px 18px;
}
.new-project-options .source-hint {
  grid-column: 1 / -1;
  margin: 0;
}
.account-list {
  display: grid;
  gap: 9px;
  margin: 18px 0;
}
.account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 0;
}
.account-row > div:first-child {
  min-width: 0;
}
.account-row strong {
  display: block;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.account-row small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}
.account-picker {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 13px;
}
.account-picker select {
  flex: 1;
  min-width: 170px;
}
.project-account-card {
  margin-bottom: 18px;
}
.project-account-card p + p {
  margin-top: 5px;
}
@media (max-width: 650px) {
  .account-row {
    align-items: stretch;
    flex-direction: column;
  }
  .account-row .button-row .btn {
    flex: 1;
  }
  .account-picker select {
    flex-basis: 100%;
  }
}
.project-chat {
  border-color: #dfe5f8;
  box-shadow: 0 4px 18px #273d7209;
}
.project-chat .chat-history {
  max-height: 250px;
  overflow-y: auto;
  padding-right: 7px;
  margin-top: 4px;
}
.project-chat .chat-history .chat-entry:first-child {
  margin-top: 8px;
}
.creative .targeting-summary {
  font-weight: 600;
  color: #41557b;
  margin-bottom: 8px;
}
.creative .keyword-details {
  padding: 0;
  margin: 10px 0 0;
  background: transparent;
  border: 0;
}
.creative .keyword-details summary {
  font-size: 11px;
  color: #5266bb;
  font-weight: 600;
  margin: 0;
}
.creative .keyword-details[open] summary {
  margin-bottom: 8px;
}
.creative .keyword-details .keyword-group {
  margin: 10px 0;
}
.creative .keyword-details .keyword-note {
  font-size: 10px !important;
}
.project-rule-card > summary {
  cursor: pointer;
  list-style: none;
}
.project-rule-card > summary::-webkit-details-marker {
  display: none;
}
.project-rule-card > summary strong,
.project-rule-card > summary small {
  display: block;
}
.project-rule-card > summary strong {
  font-size: 12px;
  color: #43547c;
}
.project-rule-card > summary small {
  font-size: 10px;
  color: #8a95a9;
  margin-top: 5px;
  line-height: 1.4;
}
.project-rule-content {
  padding-top: 14px;
}
.project-rule-content .btn[data-view=rules] {
  width: 100%;
  margin-top: 8px;
}
@media (max-width: 650px) {
  .creative-actions .btn {
    min-width: 0;
    flex-basis: 100%;
  }
}
.creative-audience {
  padding: 14px 15px 16px;
  background: #f8faff;
  border-top: 1px solid #e7ebff;
  color: #526078;
}
.creative-audience > strong {
  display: block;
  font-size: 12px;
  color: #394da9;
  margin-bottom: 10px;
}
.creative-audience > p {
  font-size: 11px;
  color: #66758f;
  line-height: 1.65;
}
.creative-audience > .keyword-preview {
  margin: 8px 0;
}
.creative-audience > .keyword-edit {
  margin-top: 9px;
}
.creative-audience > .keyword-details summary {
  cursor: pointer;
}
.project-rule-heading strong,
.project-rule-heading small {
  display: block;
}
.project-rule-heading strong {
  font-size: 12px;
  color: #43547c;
}
.project-rule-heading small {
  font-size: 10px;
  color: #8a95a9;
  margin-top: 5px;
  line-height: 1.4;
}
.project-rule-content {
  padding-top: 12px;
}
.project-main > .creative-grid {
  margin-bottom: 22px;
}
.project-support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.project-support-grid > .card {
  min-width: 0;
}
.facts-explanation {
  line-height: 1.7;
  margin-bottom: 16px;
}
.project-rule-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  gap: 12px;
  margin-top: 14px;
}
.project-rule-card .project-rule-controls .form-field {
  margin: 0;
}
.project-rule-card .project-rule-controls .btn {
  width: auto;
  margin: 0;
  min-height: 43px;
}
.project-rule-heading strong {
  font-size: 14px;
}
.project-main > .action-card .btn {
  width: auto;
  min-width: 210px;
}
.project-main > .action-card .check-label {
  max-width: 700px;
}
.project-main > .action-card .source .btn {
  min-width: 0;
}
dialog {
  padding: 0;
  overflow: hidden;
}
.dialog-body {
  padding: 26px;
  max-height: calc(90vh - 2px);
  max-height: calc(90dvh - 2px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.dialog-body h2 {
  padding-right: 42px;
}
.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 2px 8px #273d7210;
}
.separate-variants {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}
.separate-variants .btn {
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
}
@media (max-width: 920px) {
  .project-support-grid {
    gap: 16px;
  }

}
@media (max-width: 650px) {
  .project-support-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .project-rule-controls {
    grid-template-columns: 1fr;
  }
  .project-rule-controls > .form-field {
    grid-row: auto;
  }
  .project-rule-controls > .btn:last-child {
    grid-column: auto;
  }
  .project-main > .action-card .btn {
    width: 100%;
    min-width: 0;
  }
  .dialog-body {
    padding: 20px;
  }
  .dialog-close {
    top: 10px;
    right: 10px;
  }
}
dialog[open] {
  display: flex;
  flex-direction: column;
  max-height: 90dvh;
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  padding: 16px 26px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.dialog-header h2 {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.dialog-header .dialog-close {
  position: static;
  flex-shrink: 0;
  box-shadow: none;
}
.dialog-body {
  max-height: none;
  min-height: 0;
  overflow-y: auto;
}
.dialog-header + .dialog-body {
  padding-top: 18px;
}
@media (max-width: 650px) {
  .dialog-header {
    padding: 13px 20px;
  }
  .dialog-header h2 {
    font-size: 17px;
  }
}
.comparison-modes {
  border: 0;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}
.comparison-modes legend {
  font-size: 11px;
  color: #7e8999;
  margin-bottom: 10px;
  padding: 0;
}
.comparison-mode {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  padding: 14px 13px;
  border: 1px solid #e1e6f2;
  border-radius: 10px;
  background: #f8faff;
  cursor: pointer;
}
.comparison-mode:hover {
  border-color: #aab9ed;
}
.comparison-mode.selected {
  border-color: #8596e8;
  background: #eef1ff;
}
.comparison-mode input {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin: 2px 0 0;
  accent-color: var(--accent);
  padding: 0;
}
.comparison-mode strong,
.comparison-mode small {
  display: block;
  overflow-wrap: anywhere;
}
.comparison-mode strong {
  font-size: 12px;
  line-height: 1.5;
  color: #3f4d69;
}
.comparison-mode small {
  font-size: 10px;
  line-height: 1.6;
  color: #8290a5;
  margin-top: 5px;
}
.comparison-mode:has(input:focus-visible) {
  outline: 3px solid #a4afff;
  outline-offset: 2px;
}
.comparison-mode:has(input:disabled) {
  cursor: default;
}
.comparison-note {
  margin: -7px 0 18px;
}
@media (max-width: 920px) {
  .comparison-modes {
    grid-template-columns: 1fr;
  }
  .comparison-mode {
    padding: 12px 14px;
  }
  .comparison-mode small {
    margin-top: 3px;
  }
}

.goal-catalog-refresh, .model-catalog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.goal-catalog-refresh small, .model-catalog-actions small { flex: 1 1 180px; color: #7b8699; font-size: 11px; line-height: 1.6; }
.model-catalog-actions { margin-top: 7px; }
#ai-model-manual { margin-top: 7px; }


.settings-subtitle { font-size: 12px; margin: 22px 0 10px; }
.settings-disclosure { border: 1px solid var(--line); border-radius: 10px; margin-top: 16px; overflow: hidden; }
.settings-disclosure > summary { padding: 15px 16px; cursor: pointer; font-size: 12px; font-weight: 600; }
.settings-disclosure[open] > summary { border-bottom: 1px solid var(--line); }
.disclosure-body { display: grid; gap: 16px; padding: 16px; }
.disclosure-body > p, .disclosure-body > .connection-steps { margin: 0; }
.disclosure-body .form-grid { margin-top: 0; }
.plain-details { border-top: 1px solid var(--line); padding-top: 12px; font-size: 11px; }
.plain-details > summary { cursor: pointer; }
.video-review-frames { display: block; width: 100%; height: auto; margin: 10px 0; border-radius: 8px; }
.creative-video-title { display: block; margin-bottom: 8px; }
.plain-details p { margin: 10px 0 0; overflow-wrap: anywhere; line-height: 1.8; }
.community-check-fields { display: grid; gap: 12px; margin-top: 20px; }
.access-checks { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 12px; }
.access-checks th, .access-checks td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.access-checks tbody th { font-weight: 400; }
.access-diagnostic { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; line-height: 1.6; }
#community-result:empty, #community-oauth-result:empty, #community-app-result:empty { display: none; }

.project-main { min-width: 0; }
.project-layout { margin-top: 0; }
.process-card { position: static; align-self: start; }
.process-step.done .step-num { background: #e8f6f0; border-color: #cbe7db; color: var(--green); }
.readiness-reasons { padding-left: 20px; margin: 12px 0; font-size: 13px; line-height: 1.65; }
.readiness-reasons li + li { margin-top: 6px; }
.readiness-details { margin-top: 18px; }
.readiness-details p { margin: 12px 0; }
.readiness-error { color: var(--muted); }
[data-goal-catalog-status][data-state="error"] { color: #9b4b15; font-size: 12px; line-height: 1.6; }
.process-step.active strong { color: var(--accent); }
.project-support-grid { align-items: stretch; }
.project-support-grid > .card { margin-bottom: 22px; }
@media (max-width: 920px) {
  .home-grid > .process-card { display: block; order: -1; }
  .process-card { padding: 18px; }
  .process-card h3 { margin-bottom: 16px; }
  .process-step { padding-bottom: 16px; }
}

.project-event-choice{margin-top:18px;padding-top:16px;border-top:1px solid var(--border,#e3e6ef)}
.project-event-choice p{margin:8px 0 12px}
#project-event-form .form-field{margin:14px 0}

.media-tabs {display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}
.media-library-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:12px;margin:16px 0;max-height:50vh;overflow:auto}
.media-library-item {display:flex;flex-direction:column;gap:8px;padding:10px;border:1px solid var(--border,#dfe3ee);border-radius:12px;min-width:0}
.media-library-item img,.media-library-item video {width:100%;height:120px;object-fit:contain;background:#f4f6fa;border-radius:8px}
.media-library-item strong {font-size:13px;overflow-wrap:anywhere}
.comparison-progress {display:flex;align-items:center;gap:16px;padding:20px;margin:16px 0;background:#eef0ff;border:1px solid #d7dcff;border-radius:14px;color:#3e47a8}
.comparison-progress .spinner {flex-shrink:0;margin:0}
.comparison-progress p {margin:6px 0 0;font-size:14px}
.creative-grid.is-updating {opacity:.45;pointer-events:none}
.media-video-label {display:grid;place-items:center;min-height:100px;background:#f4f6fa;border-radius:8px}
.photo-editor-previews {display:grid;grid-template-columns:3fr 1fr;gap:12px;margin:16px 0}
.photo-editor-previews figure {margin:0;min-width:0}
.photo-editor-previews canvas {width:100%;height:auto;border-radius:8px;border:1px solid #dfe3ee}
.photo-editor-previews figcaption {font-size:12px;margin-top:6px;color:#7c869e}
#photo-position input {width:100%}
@media(max-width:650px){.photo-editor-previews {grid-template-columns:1fr}.photo-editor-previews figure:last-child {max-width:130px}}

.mini-logo img{width:100%;height:100%;object-fit:contain;border-radius:inherit}.source-posts[open]{max-height:520px;overflow:auto}.source-posts>summary{position:sticky;top:0;background:var(--surface,#fff);padding:8px 0}.plain-details>summary{cursor:pointer;padding:10px 0}
