/* Clean, clinic-friendly UI */
:root{
  --bg:#f6f6f6;
  --card:#ffffff;
  --text:#111;
  --muted:#555;
  --border:#e2e2e2;
  --primary:#111;
  --primaryText:#fff;
  --radius:16px;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
}
.topbar{
  position:sticky; top:0; z-index:10;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px 16px;
  background:rgba(246,246,246,0.9);
  backdrop-filter:saturate(180%) blur(12px);
  border-bottom:1px solid var(--border);
}
.brand-title{font-weight:800; font-size:18px;}
.brand-sub{color:var(--muted); font-size:12px; margin-top:2px;}
.container{max-width:980px; margin:0 auto; padding:14px 14px 40px;}
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:14px;
  margin-bottom:12px;
  box-shadow:0 1px 0 rgba(0,0,0,0.03);
}
.card.subtle{background:#fbfbfb}
.row{display:flex; gap:10px; flex-wrap:wrap}
.field{flex:1; min-width:220px}
label{display:block; font-size:12px; color:var(--muted); margin:2px 0 6px}
input{
  width:100%;
  padding:11px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  font-size:15px;
  outline:none;
  background:#fff;
}
input:focus{border-color:#bdbdbd}

.seg{
  display:flex; gap:8px;
  border:1px solid var(--border);
  padding:6px;
  border-radius:14px;
  background:#fff;
}
.segBtn{
  flex:1;
  padding:10px 12px;
  border-radius:12px;
  border:0;
  background:transparent;
  font-weight:800;
  font-size:14px;
}
.segActive{
  background:#111;
  color:#fff;
}

.hint{margin-top:10px; font-size:12px; color:var(--muted); line-height:1.35}
.captureHeader{display:flex; align-items:flex-start; justify-content:space-between; gap:10px;}
.stepTitle{font-weight:800; font-size:18px;}
.stepHint{color:var(--muted); font-size:13px; margin-top:2px; line-height:1.3}
.pill{padding:6px 10px; border-radius:999px; background:#111; color:#fff; font-weight:700; font-size:12px;}
.previewWrap{
  position:relative; margin-top:12px; border-radius:18px; overflow:hidden;
  background:#000; border:1px solid var(--border);
}
video{width:100%; display:block; aspect-ratio:3/4; object-fit:cover;}
.overlay{position:absolute; inset:0; pointer-events:none;}
.overlayHud{position:absolute; left:10px; top:10px; right:10px; display:flex; align-items:center; justify-content:space-between; gap:10px;}
.overlayLine{flex:1; height:1px; background:rgba(255,255,255,0.25);}
.overlayText{
  padding:8px 10px; border-radius:999px; background:rgba(17,17,17,0.65);
  color:#fff; font-weight:800; font-size:12px; text-align:center; min-width:200px;
}
.overlayGuide{
  position:absolute; left:50%; top:52%;
  transform:translate(-50%,-50%);
  width:72%; height:82%;
  border:3px solid rgba(255,255,255,0.75);
  border-radius:999px;
}
.eyeLine{position:absolute; left:10%; right:10%; top:34%; height:2px; background:rgba(255,255,255,0.75);}
.centerLine{position:absolute; top:10%; bottom:10%; left:50%; width:2px; background:rgba(255,255,255,0.35);}

.yawCue{
  position:absolute;
  top:46%;
  transform:translateY(-50%);
  padding:6px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  color:#111;
  background:rgba(255,255,255,0.85);
  display:none;
}
.yawCue.yawLeft{left:8%;}
.yawCue.yawRight{right:8%;}
.overlayGuide.showYawLeft .yawLeft{display:block;}
.overlayGuide.showYawRight .yawRight{display:block;}
.overlayGuide.yawLeftFrame{transform:translate(-52%,-50%);}
.overlayGuide.yawRightFrame{transform:translate(-48%,-50%);}

.countdown{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-size:64px; font-weight:900; color:#fff;
  text-shadow:0 4px 24px rgba(0,0,0,0.5);
  background:rgba(0,0,0,0.15);
}
.btnRow{display:flex; gap:10px; margin-top:12px; flex-wrap:wrap}
.btn{
  border:1px solid var(--border); background:#fff; color:#111;
  padding:12px 14px; border-radius:14px;
  font-size:15px; font-weight:700;
  flex:1; min-width:160px;
}
.btn.primary{background:var(--primary); color:var(--primaryText); border-color:var(--primary);}
.btn.ghost{background:transparent;}
.btn.small{padding:8px 10px; min-width:auto; flex:0}
.gridHeader{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:16px;}
.gridTitle{font-weight:800}
.thumbGrid{margin-top:10px; display:grid; grid-template-columns:repeat(3,1fr); gap:10px;}
.thumbCard{border:1px solid var(--border); border-radius:14px; overflow:hidden; background:#fff; cursor:pointer;}
.thumbCard img{width:100%; aspect-ratio:3/4; object-fit:cover; display:block;}
.thumbMeta{padding:8px 10px; display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:12px;}
.badge{padding:4px 8px; border-radius:999px; background:#f1f1f1; font-weight:800;}
.smallText{color:var(--muted); font-size:13px; margin-top:10px; line-height:1.4}
@media (max-width:520px){
  .thumbGrid{grid-template-columns:repeat(2,1fr);}
  .btn{min-width:140px;}
}
