:root {
  --bg: #f4f4f5;
  --card: #ffffff;
  --border: #e4e4e7;
  --text: #18181b;
  --muted: #71717a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.page {
  width: 100%;
  max-width: 420px;
}

.card {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
}

header {
  text-align: left;
}

.logo {
  display: block;
  height: 29px;
  width: auto;
  margin: 0 auto 40px;
}

header h1 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--muted);
}

textarea,
select,
input[type="color"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

textarea {
  padding: 10px 12px;
  min-height: 72px;
  resize: vertical;
}

select {
  padding: 9px 12px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

input[type="color"] {
  height: 40px;
  padding: 3px;
  cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 7px;
}

textarea:focus,
select:focus,
input[type="color"]:focus {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.1);
}

.grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.row {
  display: grid;
  gap: 6px;
}

.row > label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.preview {
  margin-top: 20px;
  min-height: 232px;
  display: grid;
  place-items: center;
  padding: 16px;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 12px;
}

#output svg {
  width: 200px;
  height: 200px;
  display: block;
}

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

.actions {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

button {
  padding: 10px 0;
  border: 1px solid var(--text);
  border-radius: 10px;
  background: var(--text);
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

button:hover:not(:disabled) {
  background: #3f3f46;
  border-color: #3f3f46;
}

button:active:not(:disabled) {
  transform: scale(0.98);
}

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