* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #07060f; color: #e8e6ff;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }
#cam { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

#hud { position: fixed; top: max(16px, env(safe-area-inset-top)); left: 0; right: 0; text-align: center; pointer-events: none; }
#brand { font-weight: 800; letter-spacing: .5em; font-size: 15px; opacity: .85; padding-left: .5em; }
#brand span { color: #7cf3ff; }
#hint { margin-top: 6px; font-size: 12px; opacity: .45; letter-spacing: .05em; }

#bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(18px, env(safe-area-inset-bottom));
  display: flex; gap: 8px; padding: 6px; border-radius: 999px;
  background: rgba(20, 18, 40, .55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .08); }
#bar button { border: 0; border-radius: 999px; padding: 9px 15px; font-size: 13px; font-weight: 600;
  color: #e8e6ff; background: rgba(255, 255, 255, .06); cursor: pointer; white-space: nowrap; font-family: inherit; }
#bar button:hover { background: rgba(255, 255, 255, .14); }
#bar button.on { background: #7cf3ff; color: #07060f; }
#bar button.rec { background: #ff3b6b; color: #fff; }

#arTip { position: fixed; left: 50%; transform: translateX(-50%); top: calc(max(16px, env(safe-area-inset-top)) + 34px);
  font-size: 12px; padding: 7px 14px; border-radius: 999px; background: rgba(0, 0, 0, .45);
  border: 1px solid rgba(255, 255, 255, .1); white-space: nowrap; }
#recDot { position: fixed; top: max(16px, env(safe-area-inset-top)); right: 18px; color: #ff3b6b; font-weight: 700; font-size: 13px;
  animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
#toast { position: fixed; top: 40%; left: 50%; transform: translate(-50%, -50%); padding: 10px 18px; border-radius: 10px;
  background: rgba(0, 0, 0, .7); font-size: 14px; max-width: 86vw; text-align: center; }
#loading { position: fixed; inset: 0; display: grid; place-items: center; font-size: 13px; letter-spacing: .3em; opacity: .6;
  pointer-events: none; transition: opacity .6s; }
#intro { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px;
  background: #050410; z-index: 10; transition: opacity .7s ease, visibility .7s; text-align: center; }
#intro.done { opacity: 0; visibility: hidden; }
#intro .ring { width: 86px; height: 86px; border-radius: 50%; border: 2px solid rgba(124, 243, 255, .25);
  border-top-color: #7cf3ff; animation: spin 1s linear infinite; margin-bottom: 12px;
  box-shadow: 0 0 40px rgba(124, 243, 255, .25); }
#intro .k { font-weight: 800; letter-spacing: .6em; font-size: 13px; opacity: .6; padding-left: .6em; }
#intro .t { font-size: 18px; letter-spacing: .1em; }
#intro .t b { color: #7cf3ff; font-size: 22px; text-shadow: 0 0 18px rgba(124, 243, 255, .6); }
#intro .s { font-size: 12px; letter-spacing: .25em; opacity: .5; font-family: ui-monospace, monospace; }
@keyframes spin { to { transform: rotate(360deg); } }

#owner { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(max(18px, env(safe-area-inset-bottom)) + 60px);
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 999px; font-size: 12px;
  color: #e8e6ff; text-decoration: none; white-space: nowrap;
  background: rgba(20, 18, 40, .55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(124, 243, 255, .25); }
#owner b { color: #7cf3ff; }
#owner .cta { background: linear-gradient(90deg, #7cf3ff, #b36bff); color: #07060f; font-weight: 700;
  padding: 5px 11px; border-radius: 999px; }
#owner:not([href]) .cta { display: none; }
#owner:not([href]) { padding-right: 14px; }

[hidden] { display: none !important; }
body.clean #hud, body.clean #bar, body.clean #arTip, body.clean #owner { display: none; }
body.ar #owner { display: none; }

/* AR 手势：手部光点、状态提示、首次引导 */
#handViz { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; display: none; }
body.ar #handViz { display: block; }
#arTip[data-s="hand"] { color: #ffd36b; }
#arTip[data-s="pinched"] { color: #7dff9a; }
#arTip[data-s="failed"] { color: #ff8a8a; }
#arGuide { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 30;
  width: min(88vw, 420px); padding: 22px 22px 18px; border-radius: 18px;
  background: rgba(14, 10, 30, 0.92); border: 1px solid rgba(124, 243, 255, 0.35);
  box-shadow: 0 0 40px rgba(124, 243, 255, 0.15); color: #e8e6ff; font-size: 14px; line-height: 1.65; }
#arGuide h3 { margin: 0 0 10px; font-size: 17px; color: #7cf3ff; letter-spacing: 1px; }
#arGuide ol { margin: 0; padding-left: 20px; }
#arGuide li { margin: 4px 0; }
#arGuide b { color: #ffd36b; font-weight: 600; }
#arGuide p { margin: 10px 0 14px; font-size: 12px; opacity: 0.7; }
#arGuide button { width: 100%; padding: 10px; border: 0; border-radius: 12px; font-size: 15px;
  background: linear-gradient(90deg, #7cf3ff, #b36bff); color: #0b0820; font-weight: 700; }
