:root {
  --bg: #ffffff;
  --board: #f5f5f8;
  --ink: #17181d;
  --soft: rgba(23, 24, 29, 0.55);
  --line: rgba(23, 24, 29, 0.08);
  --accent: #2f7df6;
}

*, *::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 14px;
}

.al { position: relative; width: min(296px, 100%); display: grid; gap: 12px; justify-items: center; }

/* the artboard: a pale sheet ruled with a faint grid, where the three objects live */
.al__board { position: relative; width: 100%; height: min(168px, 44vh); border-radius: 20px; background: linear-gradient(var(--line) 1px, transparent 1px) 0 -1px / 100% 24px, linear-gradient(90deg, var(--line) 1px, transparent 1px) -1px 0 / 24px 100%, var(--board); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.al__obj { position: absolute; left: 0; top: 0; will-change: transform; }
.al__obj i { display: block; width: 100%; height: 100%; border-radius: 9px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 12px -8px rgba(23, 24, 29, 0.45); }
.al__obj--a { width: 62px; height: 38px; }
.al__obj--a i { background: var(--accent); }
.al__obj--b { width: 40px; height: 58px; }
.al__obj--b i { background: var(--ink); }
.al__obj--c { width: 30px; height: 30px; }
.al__obj--c i { border-radius: 50%; background: color-mix(in srgb, var(--accent) 42%, #ffffff); }

/* the selection box around the three, with its four handles */
.al__box { position: absolute; left: 0; top: 0; width: 10px; height: 10px; box-shadow: 0 0 0 1px var(--accent); pointer-events: none; }
.al__box b { position: absolute; width: 7px; height: 7px; margin: -3.500px; background: #ffffff; box-shadow: 0 0 0 1px var(--accent); }
.al__box b:nth-child(1) { left: 0; top: 0; }
.al__box b:nth-child(2) { left: 100%; top: 0; }
.al__box b:nth-child(3) { left: 0; top: 100%; }
.al__box b:nth-child(4) { left: 100%; top: 100%; }
.al__guide { position: absolute; left: 0; top: 0; width: 100%; height: 1px; background: #ff3d8b; opacity: 0; pointer-events: none; }
.al__guide.is-vertical { width: 1px; height: 100%; }

.al__bar { display: flex; align-items: center; gap: 1px; padding: 4px; border-radius: 15px; background: #ffffff; box-shadow: 0 0 0 1px var(--line), 0 14px 22px -16px rgba(23, 24, 29, 0.5), 0 3px 6px -3px rgba(23, 24, 29, 0.14); }
.al__btn { width: 29px; height: 30px; border: 0; border-radius: 10px; background: transparent; color: var(--soft); cursor: pointer; outline: none; display: grid; place-items: center; transition: background-color 0.2s ease, color 0.2s ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.al__btn svg { width: 16px; height: 16px; fill: currentColor; stroke: currentColor; stroke-width: 1.300; stroke-linecap: round; stroke-linejoin: round; }
.al__btn rect { stroke: none; }
.al__btn--mix svg { fill: none; }
.al__btn.is-on { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.al__btn:focus-visible { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--ink); }
@media (hover: hover) { .al__btn:hover { background: rgba(23, 24, 29, 0.06); color: var(--ink); } .al__btn.is-on:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); } }
.al__sep { width: 1px; height: 16px; margin: 0 3px; background: var(--line); }

.al__note { height: 17px; margin-top: -2px; overflow: hidden; font-size: 12.500px; line-height: 17px; font-weight: 580; color: var(--soft); text-align: center; }
.al__note span { display: block; }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #17181d; stroke: #ffffff; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(23, 24, 29, 0.3)); z-index: 5; }
