*{box-sizing:border-box}
:root{
  --bg:#050816;
  --panel:#0f172a;
  --panel2:#111a33;
  --text:#f8fafc;
  --muted:#a8b2c7;
  --line:rgba(148,163,184,.20);
  --cyan:#27d7f2;
  --blue:#4d8cff;
  --violet:#9b5cff;
  --green:#4ade80;
}
body{
  margin:0;
  min-height:100vh;
  color:var(--text);
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:
    radial-gradient(circle at 15% 0%,rgba(55,98,255,.18),transparent 30%),
    radial-gradient(circle at 100% 20%,rgba(155,92,255,.14),transparent 30%),
    linear-gradient(180deg,#050816,#081021 55%,#050816);
}
body:before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:
    linear-gradient(rgba(255,255,255,.015) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.015) 1px,transparent 1px);
  background-size:42px 42px;
}
button,.fileButton{font:inherit}
.app{
  width:min(1120px,calc(100% - 28px));
  margin:0 auto;
  padding:26px 0 36px;
  position:relative;
  z-index:1;
}
.hero{
  display:grid;
  grid-template-columns:auto 1fr;
  align-items:center;
  gap:24px;
  padding:12px 0 28px;
}
.brand img{
  width:clamp(120px,15vw,190px);
  max-height:135px;
  object-fit:contain;
  filter:drop-shadow(0 18px 38px rgba(63,126,255,.22));
}
.eyebrow,.sectionLabel{
  color:#7dd3fc;
  font-size:12px;
  font-weight:900;
  letter-spacing:.14em;
  text-transform:uppercase;
}
.hero h1{
  margin:6px 0 8px;
  font-size:clamp(34px,5vw,62px);
  line-height:1;
  letter-spacing:-.05em;
}
.hero p{
  margin:0;
  max-width:700px;
  color:#cbd5e1;
  font-size:17px;
  line-height:1.6;
}
.valueStrip{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:18px;
}
.valueStrip span{
  padding:8px 12px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(15,23,42,.62);
  color:#dbeafe;
  font-size:13px;
  font-weight:800;
}
.guide,.captureCard,.analysisProgress,.results{
  border:1px solid var(--line);
  border-radius:24px;
  background:linear-gradient(180deg,rgba(15,23,42,.90),rgba(8,14,30,.94));
  box-shadow:0 24px 70px rgba(0,0,0,.28);
}
.guide{
  display:grid;
  grid-template-columns:1.25fr .75fr;
  gap:24px;
  padding:24px;
  margin-bottom:18px;
}
.guide h2,.captureHeader h2,.analysisProgress h2,.resultHero h2{
  margin:5px 0 9px;
  font-size:clamp(24px,3.5vw,36px);
  letter-spacing:-.035em;
}
.guide p,.guide li,.photoMessage,.summaryText,.disclaimer{
  color:#b9c3d6;
  line-height:1.6;
}
.guide ul{margin:16px 0 0;padding-left:20px}
.posePreview{
  min-height:330px;
  display:grid;
  place-items:center;
  border:1px solid rgba(125,211,252,.18);
  border-radius:20px;
  background:
    radial-gradient(circle at center,rgba(56,189,248,.10),transparent 54%),
    rgba(2,6,23,.52);
  position:relative;
}
.posePreview>span{
  position:absolute;
  bottom:14px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(15,23,42,.78);
  color:#bae6fd;
  font-size:12px;
  font-weight:900;
}
.person{position:relative;width:120px;height:270px}
.head{position:absolute;top:4px;left:42px;width:38px;height:46px;border-radius:50%;background:linear-gradient(135deg,var(--cyan),var(--violet))}
.torso{position:absolute;top:52px;left:30px;width:62px;height:104px;border-radius:24px 24px 12px 12px;background:linear-gradient(180deg,#263a64,#18233f)}
.arm,.leg{position:absolute;border-radius:999px;background:#283754}
.leftArm{top:62px;left:13px;width:18px;height:110px;transform:rotate(6deg)}
.rightArm{top:62px;right:12px;width:18px;height:110px;transform:rotate(-6deg)}
.leftLeg{top:151px;left:35px;width:20px;height:102px;transform:rotate(2deg)}
.rightLeg{top:151px;right:35px;width:20px;height:102px;transform:rotate(-2deg)}
.shoe{position:absolute;top:246px;width:34px;height:12px;border-radius:10px;background:#536184}
.leftShoe{left:25px}.rightShoe{right:25px}
.captureCard{padding:24px;margin-bottom:18px}
.captureHeader{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:16px;
}
.statusPill{
  padding:7px 10px;
  border-radius:999px;
  border:1px solid rgba(125,211,252,.22);
  background:rgba(56,189,248,.08);
  color:#bae6fd;
  font-size:12px;
  font-weight:800;
}
.cameraArea{
  position:relative;
  overflow:hidden;
  min-height:560px;
  border:1px solid #334155;
  border-radius:20px;
  background:#020617;
}
.cameraArea video,.cameraArea canvas{
  width:100%;
  height:100%;
  min-height:560px;
  object-fit:contain;
  display:block;
}
#photoCanvas{display:none}
.cameraArea.hasPhoto #photoCanvas{display:block}
.cameraArea.hasPhoto video{display:none}
.cameraOverlay{
  position:absolute;
  inset:0;
  pointer-events:none;
  display:grid;
  place-items:center;
}
.bodyFrame{
  width:min(42%,300px);
  height:82%;
  border:2px solid rgba(74,222,128,.72);
  border-radius:42% 42% 18% 18% / 14% 14% 8% 8%;
  box-shadow:0 0 28px rgba(74,222,128,.12);
}
.cameraOverlay span{
  position:absolute;
  bottom:16px;
  padding:8px 11px;
  border-radius:999px;
  background:rgba(2,6,23,.78);
  color:#dbeafe;
  font-size:12px;
  font-weight:800;
}
.hidden{display:none}
.buttonRow{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:14px;
}
button,.fileButton{
  border:1px solid rgba(148,163,184,.24);
  border-radius:13px;
  padding:11px 14px;
  background:#17223a;
  color:#f8fafc;
  cursor:pointer;
  font-weight:800;
  transition:transform .18s ease,border-color .18s ease,filter .18s ease;
}
button:hover:not(:disabled),.fileButton:hover{
  transform:translateY(-1px);
  border-color:#38bdf8;
}
button:disabled{opacity:.45;cursor:not-allowed}
.fileButton input{display:none}
.photoMessage{margin:12px 0}
.analyzeBtn{
  width:100%;
  min-height:54px;
  margin-top:6px;
  border:0;
  background:linear-gradient(90deg,#22c55e,#38bdf8 60%,#8b5cf6);
  color:#04111e;
  font-size:16px;
}
.analysisProgress{padding:24px;margin-bottom:18px}
.progressTrack{height:10px;border-radius:999px;background:#263449;overflow:hidden}
#progressFill{
  width:0;height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#22c55e,#38bdf8,#8b5cf6);
  transition:width .45s ease;
}
.analysisProgress ul{display:grid;gap:9px;margin:16px 0 0;padding-left:20px;color:#94a3b8}
.analysisProgress li.done{color:#bbf7d0}
.results{padding:24px}
.resultHero{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:24px;
  padding-bottom:20px;
  border-bottom:1px solid var(--line);
}
.resultHero p{max-width:680px}
.scoreRing{
  width:132px;
  height:132px;
  flex:0 0 auto;
  border-radius:50%;
  display:grid;
  place-items:center;
  align-content:center;
  border:8px solid rgba(56,189,248,.20);
  background:
    radial-gradient(circle,rgba(56,189,248,.13),transparent 62%),
    #0b1327;
  box-shadow:0 0 34px rgba(139,92,246,.16);
}
.scoreRing strong{font-size:44px;line-height:1}
.scoreRing span{color:#94a3b8;font-size:12px}
.scoreGrid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin:18px 0;
}
.scoreCard{
  padding:16px;
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(15,23,42,.66);
}
.scoreTop{display:flex;justify-content:space-between;gap:10px}
.scoreTop strong{font-size:15px}
.scoreTop span{color:#e9d5ff;font-weight:900}
.miniTrack{height:7px;margin-top:12px;border-radius:999px;background:#263449;overflow:hidden}
.miniTrack div{height:100%;border-radius:inherit;background:linear-gradient(90deg,#22c55e,#38bdf8,#8b5cf6)}
.scoreCard p{margin:10px 0 0;color:#94a3b8;font-size:13px;line-height:1.45}
.adviceGrid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:16px}
.adviceGrid article{
  padding:18px;border:1px solid var(--line);border-radius:18px;background:rgba(15,23,42,.56)
}
.adviceGrid h3{margin:0 0 10px}.adviceGrid ul{margin:0;padding-left:20px;color:#cbd5e1;line-height:1.65}
.resultActions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}
.disclaimer{font-size:12px;margin:18px 0 0}
footer{
  display:flex;justify-content:center;gap:10px;flex-wrap:wrap;
  padding:24px 0 0;color:#7f8aa0;font-size:13px
}
footer a{color:#94a3b8;text-decoration:none}footer a:hover{color:#fff}
[hidden]{display:none!important}
@media(max-width:760px){
  .app{width:min(100% - 16px,1120px);padding-top:10px}
  .hero{grid-template-columns:auto 1fr;gap:12px}
  .brand img{width:82px;max-height:68px}
  .hero h1{font-size:34px}
  .hero p{font-size:14px}
  .guide{grid-template-columns:1fr;padding:16px}
  .posePreview{min-height:280px}
  .captureCard,.analysisProgress,.results{padding:16px;border-radius:20px}
  .captureHeader{flex-direction:column}
  .cameraArea,.cameraArea video,.cameraArea canvas{min-height:520px}
  .scoreGrid{grid-template-columns:1fr}
  .adviceGrid{grid-template-columns:1fr}
  .resultHero{align-items:flex-start}
  .scoreRing{width:108px;height:108px}
}
@media(max-width:460px){
  .hero{align-items:flex-start}
  .brand img{width:68px;max-height:58px}
  .hero h1{font-size:28px}
  .valueStrip span{font-size:12px;padding:7px 9px}
  .cameraArea,.cameraArea video,.cameraArea canvas{min-height:460px}
  .resultHero{flex-direction:column}
}


.backBtn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-radius:12px;
  background:rgba(15,23,42,.8);
  border:1px solid rgba(148,163,184,.2);
  color:#fff;
  text-decoration:none;
  font-weight:700;
  margin-bottom:20px;
}

.backBtn:hover{
  border-color:#38bdf8;
}


.statusPill{
  position:relative;
}

.statusPill:not(:empty)::before{
  content:"";
  display:inline-block;
  width:9px;
  height:9px;
  margin-right:7px;
  border-radius:50%;
  border:2px solid rgba(186,230,253,.28);
  border-top-color:#7dd3fc;
  vertical-align:-1px;
  animation:statusSpin .75s linear infinite;
}

.statusPill[data-ready="true"]::before{
  animation:none;
  border-color:#4ade80;
  background:#4ade80;
}

@keyframes statusSpin{
  to{transform:rotate(360deg)}
}
