:root {
  --ink: #1c1917;
  --muted: #5c534a;
  --paper: #f3eadb;
  --sheet: #fffaf3;
  --line: #d9cbb6;
  --copper: #c45c26;
  --copper-deep: #9a3f16;
  --chip: #efe4d2;
  --shadow: 0 18px 40px rgba(48, 28, 12, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 500px at 10% -10%, #fff8ec 0%, transparent 50%),
    linear-gradient(180deg, #e8dcc8 0%, var(--paper) 28%, #e4d6c0 100%);
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
}

.sheet {
  width: min(1120px, calc(100% - 32px));
  margin: 32px auto 64px;
}

.mast {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.mark {
  width: 52px;
  height: 52px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 26px;
  background: var(--sheet);
  box-shadow: 4px 4px 0 var(--ink);
}

.eyebrow {
  margin: 0 0 4px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--muted);
}

h1 {
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.03em;
}

.lede {
  margin: 0;
  max-width: 54ch;
  color: var(--muted);
  line-height: 1.45;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 22px;
  align-items: start;
}

.panel, .preview-frame {
  background: var(--sheet);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.panel {
  padding: 22px 22px 18px;
  border-radius: 20px;
}

.preview-col { position: sticky; top: 18px; }

.preview-frame {
  min-height: 360px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    linear-gradient(180deg, #fffdf8, #f7efe3);
}

.preview-frame img {
  width: min(100%, 420px);
  height: auto;
  image-rendering: auto;
}

.placeholder {
  color: var(--muted);
  border: 1.5px dashed var(--line);
  border-radius: 16px;
  padding: 48px 24px;
  width: 100%;
  text-align: center;
}

.notes {
  margin: 14px 4px 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
}

.block { margin-bottom: 22px; }

.block h2 {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.field span {
  font-size: 13px;
  font-weight: 600;
}

.field em {
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
}

input[type="text"],
input[type="number"],
select {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

input[type="color"] {
  height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 4px;
}

.row {
  display: flex;
  gap: 12px;
}

.grow { flex: 1; }

.drop {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  background: #fff;
  margin-bottom: 10px;
}

.drop input { display: none; }

.drop-copy strong { display: block; }
.drop-copy span { color: var(--muted); font-size: 13px; }

#icon-preview {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
  background: #efe4d2;
}

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

.chip {
  cursor: pointer;
}

.chip input { display: none; }

.chip span {
  display: inline-block;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--chip);
  border: 1px solid transparent;
  font-size: 13.5px;
}

.chip input:checked + span {
  background: var(--ink);
  color: var(--sheet);
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.btn {
  font: inherit;
  font-weight: 600;
  border-radius: 999px;
  padding: 11px 16px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.btn.primary {
  background: var(--copper);
  border-color: var(--copper-deep);
  color: #fff8f1;
}

.btn:hover { transform: translateY(-1px); }

.hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .preview-col { position: static; }
}
