:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f3;
  color: #161616;
  --accent: #ff7a18;
  --accent-strong: #e86400;
  --ink: #161616;
  --muted: #666a70;
  --line: #dedbd5;
  --panel: #ffffff;
  --soft: #f8f7f4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 122, 24, 0.06), rgba(255, 122, 24, 0) 190px),
    #f5f5f3;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.header-inner,
.shell {
  width: min(1360px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.brand-logo {
  width: 172px;
  height: auto;
  display: block;
}

.brand-copy {
  border-left: 1px solid var(--line);
  padding-left: 18px;
  min-width: 0;
}

.brand {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0;
}

.subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.env-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: #303030;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.env-pill.ok {
  border-color: rgba(255, 122, 24, 0.35);
  background: #fff4ea;
  color: #9a3f00;
}

.env-pill.err {
  border-color: #efb8b2;
  background: #fff1ef;
  color: #8b2d22;
}

.shell {
  padding: 22px 0 44px;
}

.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.tab {
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: transparent;
  color: #5d6065;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
}

.tab.active {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--line);
  position: relative;
  top: 1px;
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--accent);
}

.tab.disabled {
  color: #a3a19d;
  cursor: not-allowed;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.launch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 390px);
  gap: 18px;
  align-items: start;
}

.form-stack,
.side-stack {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 17px;
  min-width: 0;
}

.sticky {
  position: sticky;
  top: 16px;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 13px;
}

h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: 0;
}

.panel-title span {
  color: #8c4b15;
  font-size: 12px;
  font-weight: 700;
}

.field-grid {
  display: grid;
  gap: 12px;
}

.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wide {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 6px;
  color: #282828;
  font-size: 13px;
  font-weight: 750;
  min-width: 0;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #cfcbc3;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px 11px;
  font-size: 14px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 122, 24, 0.13);
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.compact-textarea {
  min-height: 126px;
}

.inline-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.derived-grid,
.review-list {
  display: grid;
  gap: 8px;
}

.derived-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 13px;
}

.fact {
  border: 1px solid #e5e1d8;
  border-radius: 6px;
  background: var(--soft);
  padding: 10px;
  min-width: 0;
}

.fact span {
  display: block;
  color: #7a766f;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.fact strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.fixed-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.fixed-list span {
  border: 1px solid #ead7c2;
  border-radius: 999px;
  background: #fff7ef;
  color: #7f3a02;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 750;
}

.geo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.geo-mode-hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.validation-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.geo-chip {
  border: 1px solid #ead7c2;
  border-radius: 999px;
  background: #fff7ef;
  color: #7f3a02;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.geo-chip.needs-map {
  border-color: #d7d1c5;
  background: #f4f1eb;
  color: #6d655b;
}

.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 138px;
  border: 1px dashed #a9a49c;
  border-radius: 8px;
  background: var(--soft);
  color: #303030;
  text-align: center;
  cursor: pointer;
}

.dropzone.dragover {
  border-color: var(--accent);
  background: #fff3e8;
}

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone strong {
  font-size: 15px;
}

.dropzone span {
  color: var(--muted);
  font-size: 13px;
}

.creative-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.creative-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #e5e1d8;
  border-radius: 7px;
  background: #ffffff;
  padding: 8px;
}

.thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  background: #eeeae2;
  display: grid;
  place-items: center;
  color: #5d5750;
  font-size: 11px;
  font-weight: 800;
}

.creative-name {
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.creative-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.remove {
  border: 0;
  border-radius: 6px;
  background: #f0ede7;
  color: #3a3835;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.step-list {
  display: grid;
  gap: 7px;
  margin: 14px 0;
}

.step {
  border: 1px solid #e5e1d8;
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 750;
}

.step.future {
  color: var(--muted);
  background: var(--soft);
}

.step.current {
  color: #8a3a00;
  background: #fff4ea;
  border-color: #f0c49b;
}

.primary,
.secondary,
.danger {
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 11px 12px;
  font-weight: 850;
}

.primary {
  background: var(--accent);
  color: #ffffff;
}

.secondary {
  margin-top: 8px;
  background: #f0ede7;
  color: #24211d;
}

.danger {
  margin-top: 8px;
  background: #1c1b19;
  color: #ffffff;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.dry-run-result,
.upload-result {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.result-box {
  border: 1px solid #e5e1d8;
  border-radius: 7px;
  background: var(--soft);
  padding: 10px;
  font-size: 13px;
  line-height: 1.35;
}

.result-box.ok {
  border-color: #b8d9bd;
  background: #f1fbf2;
  color: #205728;
}

.result-box.err {
  border-color: #efb8b2;
  background: #fff1ef;
  color: #8b2d22;
}

.result-box.warn {
  border-color: #ead7c2;
  background: #fff7ef;
  color: #7f3a02;
}

.result-box strong {
  display: block;
  margin-bottom: 4px;
}

.result-list {
  margin: 6px 0 0;
  padding-left: 18px;
}

.placeholder {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 28px;
  color: var(--muted);
}

.placeholder h2 {
  color: var(--ink);
}

@media (max-width: 980px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
    gap: 8px;
  }

  .brand-lockup {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .brand-logo {
    width: 150px;
  }

  .brand-copy {
    border-left: 0;
    padding-left: 0;
  }

  .launch-grid,
  .cols-2,
  .cols-3,
  .derived-grid {
    grid-template-columns: 1fr;
  }

  .sticky {
    position: static;
  }
}
