:root {
  --bg: #08080a;
  --card: #121215;
  --card-hi: #1a1a1f;
  --ink: #f5f4f2;
  --soft: rgba(245, 244, 242, 0.5);
  --line: rgba(255, 255, 255, 0.09);
  --g: linear-gradient(135deg, #ff7a59, #7a4dff); /* the gradient being edited: the script rewrites it */
  --g-flat: linear-gradient(90deg, #ff7a59, #7a4dff);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 16px;
}

.ge {
  width: min(340px, 100%);
  padding: 13px 14px 14px;
  border-radius: 26px;
  background: linear-gradient(180deg, var(--card-hi), var(--card));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px var(--line), 0 30px 60px -30px rgba(0, 0, 0, 0.9);
}
.ge__head { display: flex; align-items: center; gap: 8px; height: 32px; }
.ge__title { flex: 1; font-size: 15px; font-weight: 680; font-stretch: 108%; letter-spacing: -0.008em; }
.ge__angle { font-size: 13px; font-weight: 600; }
.ge__angle b { display: inline-block; min-width: 1.900em; text-align: right; font-weight: 640; }
.ge__angle i { margin-left: 2px; font-style: normal; font-weight: 480; color: var(--soft); }
.ge__dial {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(120% 120% at 30% 20%, #34343b, #1c1c21);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 0 0 1px rgba(255, 255, 255, 0.08), 0 6px 12px -4px rgba(0, 0, 0, 0.8);
  cursor: grab;
  outline: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.ge__dial:focus-visible { box-shadow: 0 0 0 2px #000, 0 0 0 4px #ffffff; }
/* the hand is turned by the script; its mark is the child, so the two transforms never meet */
.ge__hand { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; }
.ge__hand::after { content: ""; position: absolute; left: 50%; top: 4px; width: 3px; height: 9px; margin-left: -1.500px; border-radius: 2px; background: #ffffff; }

.ge__view { position: relative; height: clamp(84px, 25vh, 122px); margin-top: 8px; }
.ge__paint { position: absolute; inset: 0; border-radius: 16px; background: var(--g); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.ge__glow { position: absolute; inset: 22% 6% -8%; border-radius: 30px; background: var(--g); filter: blur(22px); opacity: 0.55; }

.ge__bar { position: relative; height: 40px; margin: 12px 9px 0; touch-action: none; }
.ge__strip { position: absolute; left: -9px; right: -9px; top: 0; height: 12px; border-radius: 999px; background: var(--g-flat); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
.stop {
  position: absolute;
  top: 9px;
  width: 30px;
  height: 31px;
  margin-left: -15px;
  border: 0;
  background: none;
  cursor: grab;
  outline: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.stop__body {
  position: absolute;
  left: 6px;
  top: 7px;
  width: 18px;
  height: 20px;
  border-radius: 6px;
  background: var(--c);
  box-shadow: 0 0 0 2px #ffffff, 0 4px 10px -2px rgba(0, 0, 0, 0.7);
}
.stop__body::before { content: ""; position: absolute; left: 50%; top: -7px; width: 2px; height: 6px; margin-left: -1px; border-radius: 1px; background: #ffffff; }
.stop__pct {
  position: absolute;
  left: 50%;
  top: 31px;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 620;
  color: var(--soft);
  white-space: nowrap;
  pointer-events: none;
  transition: color 0.2s ease;
}
.stop.is-on .stop__pct { color: var(--ink); }
.stop:focus-visible .stop__body { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(255, 255, 255, 0.4); }

.ge__presets { display: flex; gap: 6px; margin-top: 14px; }
.preset {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 28px;
  min-width: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  color: var(--soft);
  font: inherit;
  font-size: 12px;
  font-weight: 580;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}
.preset i { flex: none; width: 16px; height: 10px; border-radius: 4px; background: var(--p); }
.preset.is-on { color: var(--ink); background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); }
.preset:focus-visible { box-shadow: inset 0 0 0 2px #ffffff; }

.ge__code {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 6px 8px 11px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.38);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.ge__code code {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10.500px;
  line-height: 15px;
  color: var(--soft);
  overflow-wrap: anywhere;
}
.ge__code code b { font-weight: 500; color: var(--ink); }
.ge__copy {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.ge__copy svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.500; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.ge__tick { stroke-dasharray: 1; stroke-dashoffset: 1; stroke-width: 2; }
.ge__copy:focus-visible { box-shadow: 0 0 0 2px #ffffff; }

.ghost {
  position: fixed;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
  fill: #ffffff;
  stroke: #14151a;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.6));
  opacity: 0;
  visibility: hidden;
  z-index: 5;
}

@media (hover: hover) {
  .preset:hover { color: var(--ink); }
  .ge__copy:hover { background: rgba(255, 255, 255, 0.12); }
}

/* larger on a desktop-sized window, so the piece fills the frame; the phone box and the narrow Playground stay as they are */
@media (min-width: 700px) and (min-height: 500px) { .ge { zoom: 1.25; } }
@media (min-width: 1100px) and (min-height: 760px) { .ge { zoom: 1.6; } }
