:root {
  --bg: #0f1115;
  --panel: #1a1d24;
  --text: #e6e6e6;
  --muted: #8a8f99;
  --accent: #7c5cff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.card {
  width: min(720px, 92vw);
  background: var(--panel);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

h1 {
  margin: 0 0 4px;
  font-size: 28px;
}

.subtitle {
  margin: 0 0 24px;
  color: var(--muted);
}

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

.prompt {
  flex: 1;
  min-width: 0;
  font: inherit;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #2a2f3a;
  background: #22262f;
  color: var(--text);
}

.prompt::placeholder {
  color: var(--muted);
}

button {
  font: inherit;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid #2a2f3a;
  background: #22262f;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

button:disabled {
  opacity: 0.5;
  cursor: default;
}

button.primary {
  background: var(--accent);
  border-color: transparent;
  font-weight: 600;
}

button.play {
  background: #2ecc71;
  border-color: transparent;
  color: #052b14;
  font-weight: 600;
}

button.play:disabled {
  opacity: 0.4;
}

.status {
  color: var(--muted);
  min-height: 1.2em;
  margin: 6px 0 2px;
}

strudel-editor {
  display: block;
  width: 100%;
  min-height: 220px;
}

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

.source a {
  color: var(--muted);
  text-decoration: underline;
}

@media (max-width: 560px) {
  .card {
    padding: 20px;
    border-radius: 14px;
  }

  h1 {
    font-size: 24px;
  }

  .subtitle {
    margin-bottom: 18px;
  }

  .controls {
    flex-wrap: wrap;
    gap: 10px;
  }

  .prompt {
    flex: 1 1 100%;
  }

  .controls button {
    flex: 1 1 0;
    padding: 12px 8px;
    gap: 6px;
    justify-content: center;
  }

  .controls button svg {
    display: none;
  }

  strudel-editor {
    min-height: 180px;
  }
}
