:root {
  color-scheme: dark;
  --bg: #0b0b0f;
  --panel: #14141b;
  --text: #f3f3f7;
  --muted: #9a9aab;
  --accent: #ff5c8a;
  --hot: rgba(0, 200, 255, 0.28);
  --hot-border: rgba(0, 220, 255, 0.95);
  --ok: #5dffa8;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  user-select: none; touch-action: none;
}
.app {
  min-height: 100%; max-width: 520px; margin: 0 auto;
  display: flex; flex-direction: column; padding: 10px 12px 18px;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 4px 2px 10px;
}
.title { font-weight: 700; letter-spacing: 0.02em; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.chip {
  border: 1px solid #333348; background: #1b1b27; color: var(--text);
  border-radius: 999px; padding: 6px 12px; font-size: 12px; cursor: pointer;
}
.chip[aria-pressed="true"] { border-color: var(--hot-border); color: #b9f3ff; }
.ver { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stage-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center;
  min-height: 0;
}
#stage {
  position: relative; width: 100%;
  aspect-ratio: 768 / 1024;
  max-height: min(72vh, 820px);
  background: #101018; border-radius: 18px; overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  touch-action: none;
}
#stageCanvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block;
}
#hotDebug {
  position: absolute; inset: 0; pointer-events: none; z-index: 5;
}
.hot-zone {
  position: absolute; border: 1.5px dashed var(--hot-border);
  background: var(--hot); border-radius: 10px;
  display: flex; align-items: flex-start; justify-content: flex-start;
  padding: 3px 5px; font-size: 10px; color: #e8fbff; font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  overflow: hidden;
}
.hot-zone.drag { border-style: solid; background: rgba(255, 92, 138, 0.22); border-color: rgba(255,120,160,0.95); }
.hot-zone.hold { border-style: solid; background: rgba(255, 180, 80, 0.28); border-color: rgba(255, 190, 90, 0.95); }
.hot-zone.disabled { opacity: 0.35; filter: grayscale(0.4); }
.hot-zone.z-hips_private { background: rgba(180, 40, 120, 0.28); border-color: rgba(255, 100, 180, 0.9); }
.hot-zone.z-chest { background: rgba(255, 100, 140, 0.25); }
.hot-zone.z-calf_foot { background: rgba(100, 220, 180, 0.22); border-color: rgba(120, 240, 200, 0.85); }

.react-flash {
  position: absolute; inset: 0; z-index: 8; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; color: #fff;
  text-shadow: 0 4px 18px rgba(255,92,138,0.8);
  background: radial-gradient(circle at center, rgba(255,92,138,0.18), transparent 55%);
  animation: flash 700ms ease-out;
}
.react-flash.sticky {
  animation: none;
  opacity: 1;
  background: radial-gradient(circle at 50% 28%, rgba(255,160,90,0.28), transparent 50%);
}
.react-flash.c-pink { background: radial-gradient(circle at center, rgba(255,120,180,0.22), transparent 55%); }
.react-flash.c-rose { background: radial-gradient(circle at 50% 38%, rgba(255,80,120,0.28), transparent 50%); }
.react-flash.c-violet { background: radial-gradient(circle at 50% 18%, rgba(180,120,255,0.25), transparent 50%); }
.react-flash.c-amber { background: radial-gradient(circle at 50% 48%, rgba(255,180,60,0.22), transparent 50%); }
.react-flash.c-cyan { background: radial-gradient(circle at center, rgba(80,220,255,0.2), transparent 55%); }
.react-flash.c-coral { background: radial-gradient(circle at 50% 62%, rgba(255,120,100,0.24), transparent 50%); }
.react-flash.c-mint { background: radial-gradient(circle at 50% 82%, rgba(100,255,200,0.2), transparent 50%); }
.react-flash.c-deep { background: radial-gradient(circle at 50% 58%, rgba(160,40,100,0.32), transparent 50%); }
.react-flash.c-warm { background: radial-gradient(circle at 50% 28%, rgba(255,150,80,0.3), transparent 50%); }

@keyframes flash {
  0% { opacity: 0; transform: scale(0.96); }
  20% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; }
}
.finger-dot {
  position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border-radius: 50%; background: rgba(255,92,138,0.85);
  box-shadow: 0 0 0 6px rgba(255,92,138,0.2); z-index: 9; pointer-events: none;
}
.hud { padding: 12px 4px 0; }
.hud-row {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 12px; color: var(--muted); margin-bottom: 8px;
}
.hud-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.bar {
  height: 8px; border-radius: 999px; background: #232333; overflow: hidden;
}
.bar-fill {
  height: 100%; width: 0%; background: linear-gradient(90deg, #ff7aa8, #ff5c8a);
  transition: width 40ms linear;
}
.hint { margin: 10px 0 4px; font-size: 13px; line-height: 1.45; color: #d7d7e2; }
.honest { margin: 0; font-size: 11px; line-height: 1.4; color: #7f7f93; }

.react-hud {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  z-index: 10; pointer-events: none;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(20,20,28,0.78); color: #fff;
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  white-space: nowrap;
  animation: hudIn 700ms ease-out;
}
.react-hud.sticky {
  animation: none;
  opacity: 1;
  background: rgba(60, 30, 10, 0.85);
  border: 1px solid rgba(255,180,90,0.55);
}
.react-hud.c-deep { background: rgba(40,10,28,0.85); }
.react-hud.c-rose { background: rgba(50,10,24,0.82); }
.react-hud.c-warm { background: rgba(60,30,10,0.85); border: 1px solid rgba(255,180,90,0.45); }
@keyframes hudIn {
  0% { opacity: 0; transform: translateX(-50%) translateY(6px); }
  15% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; }
}
