:root {
  --bg: #ececec;
  --panel: #f4f4f4;
  --line: #d9d9d9;
  --text: #171717;
  --muted: #676767;
  --dark: #24262a;
  --dark-soft: #32353a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top right, #ffffff, var(--bg));
  color: var(--text);
  padding: 24px;
}

.app-shell {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
}

.panel h1,
.panel h2 {
  margin: 0;
  line-height: 1.2;
}

.panel h1 {
  font-size: 1.45rem;
}

.panel-preview h2 {
  font-size: 1rem;
  margin-bottom: 10px;
}

.subline {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.field span {
  font-weight: 600;
  font-size: 0.92rem;
}

input[type="url"],
input[type="text"],
input[type="file"] {
  border: 1px solid #cbcbcb;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
}

input[type="url"]:focus,
input[type="text"]:focus,
input[type="file"]:focus {
  outline: 2px solid #9aa7ff;
  outline-offset: 1px;
}

.color-wrap {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
}

input[type="color"] {
  width: 48px;
  height: 42px;
  border: 1px solid #cbcbcb;
  border-radius: 10px;
  padding: 4px;
  background: #fff;
}

.style-grid {
  display: grid;
  gap: 14px;
  margin: 4px 0 14px;
}

.style-group h2 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: #4a4a4a;
}

.choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

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

.choice {
  border: 1px solid transparent;
  border-radius: 14px;
  background: #dddddd;
  color: #2e2e2e;
  font-weight: 700;
  font-size: 0.86rem;
  min-height: 54px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, transform 120ms ease;
}

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

.choice.active {
  background: var(--dark);
  color: #fff;
}

.logo-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

button {
  border: 1px solid #b8b8b8;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
}

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

.primary {
  background: var(--dark);
  color: #fff;
  border-color: #111;
}

.secondary,
.ghost {
  background: #fff;
  color: var(--dark);
}

.hint,
.status {
  margin: 10px 0 0;
  font-size: 0.88rem;
}

.hint {
  color: #555;
}

.status {
  min-height: 1.3em;
  color: #aa2b2b;
}

.panel-preview {
  display: grid;
  align-content: start;
  justify-items: center;
}

#qrCanvas {
  width: min(100%, 420px);
  height: auto;
  background: #fff;
  border: 0;
}

@media (max-width: 900px) {
  body {
    padding: 14px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

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

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