:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #63707c;
  --line: #d9e0e5;
  --panel: #ffffff;
  --page: #f3f6f8;
  --accent: #087f7c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font: 14px/1.45 Arial, sans-serif;
}

.app {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  min-height: 100vh;
}

.toolbar {
  padding: 22px;
  border-right: 1px solid var(--line);
  background: var(--panel);
  overflow: auto;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.brand-mark {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 20px;
  line-height: 1.15;
}

h2 {
  font-size: 18px;
}

p {
  color: var(--muted);
}

.control-block {
  margin-top: 16px;
}

label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  font-weight: 700;
}

input[type="file"],
input[type="number"] {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  font: inherit;
}

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

input[type="range"] {
  width: 100%;
}

.grid {
  display: grid;
  gap: 10px;
}

.grid.two {
  grid-template-columns: 1fr 1fr;
}

button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #b8c2cc;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

button:hover {
  border-color: var(--accent);
}

button.primary {
  width: 100%;
  margin-top: 20px;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.preview {
  min-width: 0;
  padding: 22px;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.size-badge {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
}

.canvas-wrap {
  display: grid;
  min-height: calc(100vh - 96px);
  place-items: center;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(45deg, #edf1f4 25%, transparent 25%),
    linear-gradient(-45deg, #edf1f4 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #edf1f4 75%),
    linear-gradient(-45deg, transparent 75%, #edf1f4 75%);
  background-color: #fff;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

canvas {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 130px);
  box-shadow: 0 12px 40px rgba(20, 35, 45, .22);
}

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

  .toolbar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .canvas-wrap {
    min-height: 420px;
  }
}
