:root {
  --muted: #a7a7b3;
  --border: rgba(255, 255, 255, .12);
  --accent: #6ea8fe;
  --danger: #ff6b6b;
  --ok: #3ddc97;
}

html,
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}
body{
  max-width: 900px;
  margin-inline: auto;
  padding: 16px;
}
h1,h2{
  color: #1b6abe
}
/* The app is NOT full-height so you can place text above/below it */
.app {
  max-width: 900px;
  margin: 16px auto;
  padding: 10px;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto auto;
  gap: 10px;
}

.toolbar {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 10px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

button,
input {
  background: var(--panel2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1;
}

button {
  cursor: pointer;
  user-select: none;
  border: 1px solid #999;
}

button.primary {
  border-color: rgba(110, 168, 254, .6);
}

button.danger {
  border-color: rgba(255, 107, 107, .6);
}

button.ok {
  background-color: rgb(0, 170, 96);
  color: #fff;
  width: 100%;
  max-width: 400px;
  margin: auto;
}

button.active {
  outline: 2px solid rgba(110, 168, 254, .75);
  outline-offset: 1px;
  background-color: #6ea8fe;
  color: #fff;
}

input[type="range"] {
  padding: 10px;
}

.hint {
  color: var(--muted);
  font-size: 12px;
}

#uploadResult{
  color: #454545;
}

.pill {
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
  font-size: 12px;
}

.spacer {
  flex: 1 1 auto;
}

/* Canvas container */
.stage {
  position: relative;
  background: #0f1118;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  touch-action: pan-y;
  /* allow vertical scroll by default */
  height: 50vh;
  /* max canvas height requirement */
  max-height: 50vh;
  min-height: 240px;
  /* optional: keeps it usable on tiny screens */
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.status {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

#uploadResult img{
  max-height: 3rem;
  max-width: 5rem;
  object-fit: contain;
}