:root {
  --bw: 463px; --bh: 662px; --t: 29px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ios-blue: #0a84ff; --ios-green: #30d158; --ios-red: #ff453a; --ios-orange: #ff9f0a; --ios-yellow: #ffd60a;
  --ios-pink: #ff375f; --ios-purple: #bf5af2; --ios-teal: #64d2ff; --ios-indigo: #5e5ce6;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #050506; color: #fff; font-family: var(--font); -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
img { -webkit-user-drag: none; user-drag: none; }
.svgi { display: inline-flex; width: 1em; height: 1em; }
.svgi svg { width: 100%; height: 100%; display: block; }

/* ---------- stage ---------- */
#stage {
  position: fixed; inset: 0; overflow: hidden;
  background:
    radial-gradient(1200px 700px at 50% 42%, #23252b 0%, #131418 45%, #08080a 100%);
}
#stage::before { /* soft studio floor glow */
  content: ""; position: absolute; left: 50%; bottom: -30%; width: 140%; height: 70%; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(90,110,160,.16), transparent 70%); pointer-events: none;
}
#scaler { position: absolute; left: 50%; top: 46%; width: 0; height: 0; transform: scale(var(--s, .9)); }
#tilt { position: absolute; left: 0; top: 0; width: 0; height: 0; perspective: 3800px; transform-style: preserve-3d; }

/* ---------- toolbar ---------- */
#toolbar {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: flex; gap: 4px; padding: 6px; border-radius: 22px; z-index: 10;
  background: rgba(40, 42, 50, .62); backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6);
  box-shadow: 0 0 0 .5px rgba(255,255,255,.14), 0 10px 30px rgba(0,0,0,.45);
}
#toolbar button {
  height: 38px; padding: 0 14px; border-radius: 16px; display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: #e8eaf0; transition: background .2s, transform .15s;
}
#toolbar button:hover { background: rgba(255,255,255,.12); }
#toolbar button:active { transform: scale(.94); }
#toolbar button.on { background: rgba(255,255,255,.2); }
#toolbar .sep { width: 1px; margin: 8px 3px; background: rgba(255,255,255,.14); }
#toolbar .svgi { font-size: 17px; }
#hint {
  position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: 9; font-size: 12.5px; letter-spacing: .02em;
  color: rgba(255,255,255,.55); background: rgba(255,255,255,.06); padding: 7px 14px; border-radius: 99px; pointer-events: none;
  transition: opacity .6s; white-space: nowrap;
}
#hint kbd { font: inherit; background: rgba(255,255,255,.14); border-radius: 5px; padding: 1px 6px; margin: 0 1px; }
@media (max-width: 900px) { #hint { display: none; } #toolbar button span.lbl { display: none; } }
