:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light dark;
  --page: #f6f6f6;
  --surface: #fff;
  --soft: #f0f0f0;
  --ink: #202124;
  --muted: #686a70;
  --border: #d8d9dc;
  --accent: #344f83;
  --on-accent: #fff;
  --danger: #a32626;
  --notice: #edf2fa;
  --error: #fbeeed;
  --shadow: 0 8px 24px #00000008;
  background: var(--page);
  color: var(--ink);
  line-height: 1.5;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #17181a;
    --surface: #202124;
    --soft: #2a2b2f;
    --ink: #e6e6e8;
    --muted: #abacb3;
    --border: #41434a;
    --accent: #b1c5ef;
    --on-accent: #172846;
    --danger: #ffadab;
    --notice: #272f40;
    --error: #3b2527;
    --shadow: 0 8px 24px #00000018;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--accent);
  text-underline-offset: 3px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1220px;
  padding: 25px 32px;
  margin: auto;
}
.wordmark {
  color: var(--ink);
  font-size: 19px;
  font-weight: 600;
  text-decoration: none;
}
.wordmark span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  margin-left: 12px;
}
nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
}
nav a {
  color: var(--ink);
}
main {
  max-width: 1220px;
  margin: 20px auto 60px;
  padding: 0 32px;
}
h1 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin: 0 0 24px;
}
h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px;
}
h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 10px;
}
p {
  margin: 12px 0;
}
footer {
  padding: 24px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.narrow {
  max-width: 480px;
}
.create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 38px;
}
.form-section + .form-section {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 24px;
}
label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
}
input, select, textarea, button, .button {
  font: inherit;
}
input:not([type="checkbox"], [type="radio"]), select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 10px 11px;
  color: var(--ink);
  background: var(--surface);
  font-size: 14px;
  margin-top: 6px;
  min-width: 0;
}
input::placeholder, textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
input[type="checkbox"], input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  margin: 0;
}
input[type="file"] {
  font-size: 12px;
}
input[type="file"]::file-selector-button {
  color: var(--ink);
  background: var(--soft);
  border: 0;
  border-radius: 3px;
  padding: 6px 9px;
  margin-right: 8px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
button, .button {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 9px 14px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
button:hover, .button:hover {
  background: var(--soft);
}
button.primary, .button.primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
.text-button {
  padding: 0;
  background: none;
  border: 0;
}
.danger {
  color: var(--danger);
}
.optional, .hint {
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
}
.optional {
  margin-left: 5px;
}
.form-row {
  display: flex;
  align-items: start;
  gap: 16px;
}
.form-row > * {
  flex: 1;
  min-width: 0;
}
.choice-row {
  border: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 0;
  margin: 16px 0 0;
}
.choice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
#generator-fields {
  margin-top: 16px;
}
#generator-fields label {
  margin-bottom: 8px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.tag {
  font-size: 12px;
  padding: 5px 8px;
  overflow-wrap: anywhere;
}
.field-error {
  color: var(--danger);
  font-size: 13px;
}
.placement-inputs + .placement-inputs {
  margin-top: 22px;
}
.creative-input {
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
}
.creative-input.dragging {
  border-color: var(--accent);
  background: var(--notice);
}
.creative-input label {
  margin-bottom: 6px;
}
.creative-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}
.creative-status {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
  margin: 0;
}
.creative-status.error {
  color: var(--danger);
}
.creative-controls button {
  padding: 3px 6px;
  font-size: 12px;
}
.rate {
  font-size: 14px;
}
.notice, .verdict {
  background: var(--notice);
  border-radius: 6px;
  padding: 12px;
  font-size: 14px;
  margin: 16px 0;
  overflow-wrap: anywhere;
}
.notice.error {
  color: var(--danger);
  background: var(--error);
}
.verdict ul {
  padding-left: 20px;
  margin: 8px 0 0;
}
.preview-panel {
  position: sticky;
  top: 24px;
  min-width: 0;
}
.preview-panel > h2 {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.preview-device + .preview-device {
  margin-top: 28px;
}
.preview-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.preview-heading h3 {
  margin: 0;
}
.preview-heading select {
  width: auto;
  max-width: 65%;
  margin: 0;
  padding: 4px 8px;
  font-size: 12px;
}
.browser-mock, .phone-mock {
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.browser-chrome {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 31px;
  padding: 0 10px;
  background: var(--soft);
  border-bottom: 1px solid var(--border);
}
.browser-chrome > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.45;
}
.browser-chrome > div {
  margin: 0 0 0 10px;
  font-size: 9px;
  border-radius: 3px;
  color: var(--muted);
  background: var(--surface);
  padding: 1px 18px;
}
.mock-page {
  min-height: 215px;
  padding: 18px;
}
.mock-wordmark {
  color: var(--muted);
  font-size: 13px;
  font-family: Georgia, serif;
}
.mock-content {
  width: 70%;
  max-width: 245px;
  margin: 38px auto 26px;
}
.mock-title, .mock-line, .mock-control {
  background: var(--soft);
  border-radius: 3px;
}
.mock-title {
  height: 12px;
  width: 65%;
  margin: 0 auto 18px;
}
.mock-line {
  height: 6px;
  margin: 8px 0;
}
.mock-line.short {
  width: 75%;
  margin-left: auto;
  margin-right: auto;
}
.mock-control {
  width: 66px;
  height: 24px;
  border: 1px solid var(--border);
  margin: 20px auto 0;
}
.mock-slot {
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}
.desktop-slot {
  aspect-ratio: 728 / 90;
}
.mobile-slot {
  aspect-ratio: 320 / 50;
}
.mock-slot img {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: contain;
}
.preview-placeholder {
  color: var(--muted);
  font-size: 11px;
}
.phone-mock {
  width: 100%;
  max-width: 280px;
  border-radius: 23px;
  border-width: 5px;
  margin: 0 auto;
}
.phone-chrome {
  height: 21px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.phone-chrome span {
  width: 35%;
  height: 8px;
  border-radius: 8px;
  background: var(--soft);
}
.phone-mock .mock-page {
  min-height: 245px;
  padding: 12px;
}
.phone-mock .mock-content {
  margin-top: 55px;
  width: 90%;
}
.phone-bottom {
  height: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.phone-bottom span {
  height: 3px;
  width: 32%;
  border-radius: 2px;
  background: var(--muted);
}
.dashboard-top, .section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.inline-form {
  display: flex;
  gap: 12px;
  align-items: end;
  margin: 18px 0;
}
.inline-form label {
  flex: 1;
  margin: 0;
}
.inline-form button {
  flex-shrink: 0;
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin: 20px 0;
}
.stat strong, .stat span {
  display: block;
}
.stat strong {
  font-size: 22px;
  font-weight: 600;
}
.stat span {
  font-size: 12px;
  color: var(--muted);
}
.campaign-card, .review-card, .token-row {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  overflow-wrap: anywhere;
}
.campaign-card:last-child, .review-card:last-child, .token-row:last-child {
  border: 0;
}
.review-card img {
  display: block;
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
  margin: 12px 0;
}
.pill {
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 12px;
  background: var(--soft);
  color: var(--muted);
}
.table-scroll {
  overflow-x: auto;
  margin: 18px 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
}
th, td {
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
}
th {
  font-weight: 600;
}
.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
pre, code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  background: var(--soft);
  overflow-wrap: anywhere;
}
pre {
  overflow: auto;
  padding: 12px;
  border-radius: 5px;
  max-height: 500px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
[hidden] {
  display: none !important;
}
@media (max-width: 850px) {
  .create-layout {
    gap: 24px;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
  header {
    padding: 20px;
  }
  main {
    padding: 0 20px;
  }
  .panel {
    padding: 18px;
  }
}
@media (max-width: 680px) {
  .create-layout, .two-columns {
    grid-template-columns: 1fr;
  }
  .preview-panel {
    position: static;
  }
  .browser-mock {
    max-width: 520px;
    margin: auto;
  }
  .preview-panel {
    margin-top: 8px;
  }
  .form-row {
    gap: 10px;
  }
  .dashboard-top {
    align-items: start;
    flex-direction: column;
  }
  .inline-form {
    align-items: stretch;
    flex-direction: column;
  }
  .wordmark span {
    display: none;
  }
  nav {
    gap: 12px;
  }
}
