/* ============================================================
 * RobinGo · ar.css —— AR 全屏取景（相机画面之上叠 SLIPPY 风格控件）
 * ============================================================ */
.ar-body{
  background:var(--ink);
  max-width:none;
  overflow:hidden;
}

#arVideo, #arCanvas{
  position:fixed;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}
#arCanvas{ pointer-events:none; }

/* ---------------- 顶部 ---------------- */
.ar-top{
  position:fixed;
  top:calc(14px + env(safe-area-inset-top));
  left:14px;
  right:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  z-index:5;
}
.ar-close{
  height:38px;
  padding:0 16px;
  border:2px solid var(--carbon);
  border-radius:999px;
  background:var(--paper);
  color:var(--carbon);
  font-family:var(--font-title);
  font-size:12px;
  letter-spacing:.5px;
  box-shadow:var(--hard-sm);
  cursor:pointer;
}
.ar-close:active{ transform:translate(2px,2px); box-shadow:none; }

.ar-target{
  font-family:var(--font-title);
  font-size:12px;
  letter-spacing:.5px;
  color:var(--carbon);
  background:var(--paper);
  border:2px solid var(--carbon);
  box-shadow:var(--hard-sm);
  padding:8px 15px;
  border-radius:999px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* ---------------- 提示 ---------------- */
.ar-hint{
  position:fixed;
  bottom:118px;
  left:50%;
  transform:translateX(-50%);
  color:var(--paper);
  font-size:13px;
  font-weight:700;
  background:rgba(15,22,38,.82);
  border:2px solid rgba(244,233,212,.3);
  padding:9px 18px;
  border-radius:999px;
  white-space:nowrap;
  backdrop-filter:blur(8px);
  z-index:5;
}

/* ---------------- 领取按钮 ---------------- */
.ar-claim{
  position:fixed;
  left:50%;
  bottom:calc(34px + env(safe-area-inset-bottom));
  transform:translateX(-50%);
  height:54px;
  padding:0 44px;
  border:3px solid var(--carbon);
  border-radius:999px;
  background:var(--orange);
  color:var(--carbon);
  font-family:var(--font-title);
  font-size:16px;
  letter-spacing:1px;
  box-shadow:var(--hard);
  z-index:5;
  cursor:pointer;
}
.ar-claim:active{ transform:translateX(-50%) translateY(4px); box-shadow:none; }
.ar-claim:disabled{
  background:rgba(244,233,210,.35);
  color:rgba(20,16,9,.45);
  border-color:rgba(20,16,9,.35);
  box-shadow:none;
}

/* ---------------- 拍照兜底开关（没有摄像头/传感器时） ---------------- */
.ar-photo{
  position:fixed;
  top:calc(14px + env(safe-area-inset-top));
  left:50%;
  transform:translateX(-50%);
  height:38px;
  padding:0 18px;
  border:2px solid var(--carbon);
  border-radius:999px;
  background:var(--primary);
  color:#1a1408;
  font-family:var(--font-title);
  font-size:12px;
  letter-spacing:.5px;
  box-shadow:var(--hard-sm);
  z-index:20;
}
.ar-photo.hidden{ display:none; }
.no-cam-only{ display:none; }
.ar-body.no-cam .no-cam-only{ display:block; }

.ar-photo-sheet{
  position:fixed;
  inset:0;
  z-index:40;
  display:none;
  flex-direction:column;
  background:rgba(15,22,38,.92);
  padding:18px;
  gap:14px;
}
.ar-photo-sheet.open{ display:flex; }

.ar-photo-sheet .sheet-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  color:var(--paper);
  font-family:var(--font-title);
  font-size:13px;
}
.ar-photo-sheet .sheet-head button{
  height:34px;
  padding:0 14px;
  border:2px solid var(--carbon);
  border-radius:999px;
  background:var(--paper);
  color:var(--carbon);
  font-family:var(--font-title);
  font-size:11px;
}
.ar-photo-sheet .sheet-body{
  flex:1;
  min-height:0;
  display:flex;
  align-items:center;
  justify-content:center;
}
.ar-photo-sheet img{
  max-width:100%;
  max-height:100%;
  border:3px solid var(--carbon);
  box-shadow:var(--hard);
  background:#000;
}
.ar-photo-sheet .sheet-foot{
  display:flex;
  gap:12px;
}
.ar-photo-sheet .sheet-foot button{
  flex:1;
  height:52px;
  border:3px solid var(--carbon);
  border-radius:999px;
  font-family:var(--font-title);
  font-size:13px;
}
.ar-photo-sheet .sheet-foot .ok{ background:var(--primary); color:#1a1408; }
.ar-photo-sheet .sheet-foot .no{ background:var(--paper); color:var(--carbon); }
.pz{ position:fixed; inset:0; background:#000; z-index:30; display:none; }
.pz.open{ display:block; }
.pz video{ width:100%; height:100%; object-fit:cover; }
.pz .pz-btn{
  position:fixed;
  left:50%;
  bottom:calc(38px + env(safe-area-inset-bottom));
  transform:translateX(-50%);
  width:74px;
  height:74px;
  border-radius:50%;
  border:5px solid #fff;
  background:var(--primary);
  z-index:31;
}
.pz .pz-close{
  position:fixed;
  top:calc(14px + env(safe-area-inset-top));
  right:14px;
  height:38px;
  padding:0 16px;
  border:2px solid var(--carbon);
  border-radius:999px;
  background:var(--paper);
  color:var(--carbon);
  font-family:var(--font-title);
  font-size:12px;
  z-index:31;
}


/* ---------------- 无相机 / 无方向：纯列表领取模式 ---------------- */
.ar-body.no-cam #arVideo,
.ar-body.no-cam #arCanvas{ display:none; }
.ar-body.no-cam{
  background:
    radial-gradient(circle at 50% 22%, rgba(245,163,0,.20), transparent 62%),
    linear-gradient(180deg, #12203a 0%, #0f1626 60%, #0b1120 100%);
}
.ar-body.no-cam .ar-claim{
  bottom:calc(46px + env(safe-area-inset-bottom));
  height:60px;
  font-size:17px;
}
