*{box-sizing:border-box}
html,body{margin:0;background:#0c1019;color:#f0f5fa;font:16px/1.45 system-ui,-apple-system,"PingFang SC",sans-serif}
a{color:inherit}a:focus-visible,button:focus-visible,canvas:focus-visible{outline:3px solid #8ee7ef;outline-offset:3px}
button{font:inherit;cursor:pointer}
.demo-credit{align-items:center;background:#111827ed;border:1px solid #c7e7ff33;border-radius:16px;color:#d1e1ef;display:flex;flex-wrap:wrap;gap:10px 14px;justify-content:center;max-width:calc(100% - 20px);padding:9px 12px;font-size:12px;z-index:3}
.demo-credit a{color:#bfe8ff;display:inline-flex;align-items:center;min-height:28px;text-decoration:underline;text-underline-offset:3px}
.demo-credit span{overflow-wrap:anywhere}
@media(max-width:440px){.demo-credit{gap:4px 10px;font-size:11px}.demo-credit span{max-width:170px}}

body{background:radial-gradient(ellipse at 50% 30%,#16234a,#0c1019 67%);min-height:100svh;padding:22px 16px calc(14px + env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:center;gap:12px}
.touch-lab{width:min(100%,620px);display:flex;flex-direction:column;flex:1;gap:14px}
h1{margin:0;font-size:clamp(32px,9vw,48px)}p{margin:5px 0 0;color:#b6cbe1;font-size:14px}
canvas{width:100%;height:clamp(320px,63svh,630px);display:block;touch-action:none;cursor:crosshair;background:radial-gradient(ellipse at 50% 40%,#252856,#0a1126 72%);border:1px solid #41466c;border-radius:22px}
.touch-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-bottom:4px}
button{background:#bfecf4;color:#132130;border:0;border-radius:999px;padding:0 16px;min-height:46px;font-weight:700;font-size:14px}
output{font-size:12px;color:#c4e6f2}
