:root {
  color-scheme: light dark;
  font: 16px/1.45 system-ui, sans-serif;
  color: var(--tg-theme-text-color, #dcebf4);
  background: var(--tg-theme-bg-color, #12222d);
  --accent: #a6f2cd;
  --ink: #12362a;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 680px; padding: 22px 20px max(24px, env(safe-area-inset-bottom)); margin: auto; }
h1 { font-size: clamp(26px, 7vw, 36px); line-height: 1.1; margin: 8px 0; }
p { margin: 10px 0 16px; }
.eyebrow { color: var(--tg-theme-hint-color, #a6d1e0); font-size: 12px; font-weight: 700; letter-spacing: .12em; }
#side { letter-spacing: 0; font-size: 13px; margin-left: 10px; }
#stage {
  position: relative;
  width: fit-content;
  max-width: calc(100% - 12px);
  margin: 20px auto 14px;
  touch-action: none;
  user-select: none;
  isolation: isolate;
}
#photo { display: block; max-width: 100%; max-height: 62vh; width: auto; height: auto; }
#stage svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#outline { fill: #a6f2cd25; stroke: var(--accent); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.handle {
  position: absolute; transform: translate(-50%, -50%);
  width: 44px; height: 44px; padding: 0; border-radius: 50%;
  border: 2px solid #12362a; background: var(--accent); color: var(--ink);
  box-shadow: 0 1px 5px #0006; font-weight: 800; touch-action: none; cursor: grab;
}
button:focus-visible { outline: 3px solid #5a96ec; outline-offset: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions button {
  border: 1px solid currentColor; border-radius: 10px; padding: 9px 12px;
  min-height: 44px; background: none; color: inherit; font: inherit; font-weight: 600;
}
#save { flex: 1; background: var(--accent); color: var(--ink); }
#save:disabled { opacity: .6; }
.footnote, #status { font-size: 14px; }
