:root {
  color-scheme: dark;
  --shell-bg: #10151f;
  --shell-panel: #18202e;
  --shell-line: #2b3646;
  --shell-text: #e8edf5;
  --shell-muted: #9aa8bd;
  --shell-accent: #4f8ff0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--shell-bg);
  color: var(--shell-text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.shell-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.shell-header h1 {
  margin: 0 0 6px;
  font-size: 26px;
  letter-spacing: -0.01em;
}

.shell-header p {
  margin: 0 0 24px;
  color: var(--shell-muted);
  max-width: 62ch;
}

.shell-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 20px;
  align-items: start;
}

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

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

.shell-card h2 {
  margin: 0 0 14px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--shell-muted);
}

#preview {
  width: 100%;
  height: 360px;
  display: block;
  border-radius: 8px;
  background: #10151f;
  border: 1px solid var(--shell-line);
}

.shell-field {
  display: block;
  margin-bottom: 14px;
}

.shell-field span {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  color: var(--shell-muted);
}

.shell-field input[type="text"],
.shell-field input[type="number"] {
  width: 100%;
  padding: 8px 10px;
  border-radius: 7px;
  border: 1px solid var(--shell-line);
  background: #0e1420;
  color: var(--shell-text);
  font: inherit;
}

.shell-row {
  display: flex;
  gap: 10px;
}

.shell-row .shell-field { flex: 1; }

.shell-parts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin-bottom: 16px;
}

.shell-parts label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.shell-colours {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.shell-colour {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.shell-colour input[type="color"] {
  width: 44px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--shell-line);
  border-radius: 6px;
  background: none;
  cursor: pointer;
}

.shell-button {
  width: 100%;
  padding: 11px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--shell-accent);
  color: #06101f;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.shell-button:disabled {
  opacity: 0.55;
  cursor: progress;
}

#status {
  margin: 12px 0 0;
  min-height: 20px;
  font-size: 13px;
  color: var(--shell-muted);
}

.shell-note {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--shell-muted);
}

.shell-download {
  display: inline-block;
  margin-top: 12px;
  padding: 9px 14px;
  border-radius: 8px;
  background: #1d3b6b;
  color: var(--shell-text);
  font-weight: 600;
  text-decoration: none;
}

.shell-download[hidden] { display: none; }

.shell-note code {
  background: #0e1420;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12px;
}
