:root {
  color-scheme: light;
  --bg: #f3f3f3;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --text: #111111;
  --muted: #555555;
  --primary: #111111;
  --primary-strong: #000000;
  --outline: #d6d6d6;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

h2 {
  font-size: 1.35rem;
}

.lead {
  margin-top: 14px;
  max-width: 40rem;
  color: var(--muted);
  line-height: 1.7;
}

.hero-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--outline);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--primary);
  font-weight: 600;
}

.hero-badge-icon {
  font-size: 28px;
  line-height: 1;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 24px;
  margin-top: 24px;
}

.controls,
.preview-panel {
  padding: 28px;
}

.controls {
  display: grid;
  gap: 18px;
}

.field-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field,
.switch {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

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

input,
select {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--outline);
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

input:focus,
select:focus {
  border-color: var(--primary);
  background: #fafafa;
}

input[type="color"] {
  padding: 8px;
}

.switch {
  grid-auto-flow: column;
  justify-content: start;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.switch input {
  width: 20px;
  min-height: 20px;
  margin: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  border: 1px solid var(--text);
  border-radius: 999px;
  min-height: 48px;
  padding: 0 20px;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.button:hover {
  opacity: 0.85;
}

.button.primary {
  background: var(--text);
  color: #fff;
}

.button.tonal {
  background: var(--surface-strong);
  color: var(--primary-strong);
}

.helper {
  min-height: 1.5em;
  color: var(--muted);
}

.preview-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.pill {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--outline);
  background: var(--surface-strong);
  color: var(--primary-strong);
  font-weight: 600;
}

.preview-stage {
  margin: 24px 0;
  min-height: 340px;
  display: grid;
  place-items: center;
  padding: 20px;
  border-radius: 10px;
  background: var(--surface-strong);
  border: 1px solid var(--outline);
}

.preview-stage canvas,
.preview-stage svg {
  max-width: min(100%, 320px);
  height: auto;
}

.details {
  display: grid;
  gap: 16px;
}

.details div {
  padding: 14px 0 0;
  border-top: 1px solid var(--outline);
}

.details dt {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.details dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 20px, 100%);
    padding-top: 20px;
  }

  .hero,
  .controls,
  .preview-panel {
    padding: 22px;
  }

  .field-group {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}
