:root {
  color-scheme: dark;
  --ink: #f7f1df;
  --muted: #9fb1b7;
  --line: rgba(255, 255, 255, 0.14);
  --panel: rgba(8, 13, 18, 0.72);
  --accent: #76f7c6;
  --accent-2: #ffce63;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #05080c;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.app {
  position: relative;
  width: 100vw;
  height: 100vh;
  background:
    radial-gradient(circle at 12% 18%, rgba(118, 247, 198, 0.18), transparent 28rem),
    radial-gradient(circle at 80% 80%, rgba(255, 206, 99, 0.16), transparent 32rem),
    linear-gradient(135deg, #05080c 0%, #0f151a 55%, #08090e 100%);
}

#stage {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

.panel {
  position: absolute;
  left: clamp(14px, 3vw, 34px);
  bottom: clamp(14px, 3vw, 34px);
  width: min(440px, calc(100vw - 28px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px) saturate(1.25);
}

.brand {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
}

.mark {
  width: 42px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  background:
    radial-gradient(circle at 52% 47%, #fff9cf 0 8%, transparent 9%),
    conic-gradient(from 130deg, #76f7c6, #69a7ff, #ff6f91, #ffce63, #76f7c6);
  box-shadow: 0 0 28px rgba(118, 247, 198, 0.34);
}

h1,
p {
  margin: 0;
}

h1 {
  font-size: 1.25rem;
  line-height: 1.1;
  letter-spacing: 0;
}

p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.toolbar,
.actions {
  display: flex;
  gap: 8px;
}

.toolbar {
  margin-top: 18px;
}

.icon-button,
.actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.icon-button {
  width: 40px;
  font-weight: 800;
}

.icon-button:hover,
.actions button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
}

.icon-button.is-active {
  border-color: color-mix(in srgb, var(--accent), white 12%);
  background: color-mix(in srgb, var(--accent), transparent 78%);
}

.controls {
  display: grid;
  gap: 13px;
  margin-top: 18px;
}

label {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.actions {
  margin-top: 18px;
}

.actions button {
  flex: 1 1 0;
  padding: 0 12px;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .panel {
    padding: 14px;
  }

  .brand {
    grid-template-columns: 36px 1fr;
  }

  .mark {
    width: 36px;
  }

  .actions {
    flex-wrap: wrap;
  }

  .actions button {
    flex-basis: calc(50% - 4px);
  }

  #save {
    flex-basis: 100%;
  }
}
