.y3dp-app{
  --y3dp-bg:#07111f;
  --y3dp-panel:#0c1828;
  --y3dp-text:#f8fbff;
  --y3dp-muted:#a9bbce;
  --y3dp-blue:#36a7ff;
  --y3dp-red:#ff3149;
  --y3dp-green:#39d98a;
  width:100%;
  max-width:980px;
  margin:0 auto;
  background:var(--y3dp-bg);
  color:var(--y3dp-text);
  border-radius:20px;
  overflow:hidden;
  box-shadow:0 20px 60px rgba(0,0,0,.26);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  -webkit-tap-highlight-color:transparent;
}
.y3dp-app *{box-sizing:border-box}
.y3dp-stage{
  position:relative;
  width:100%;
  height:min(68vh,720px);
  min-height:420px;
  background:#02060d;
  overflow:hidden;
  touch-action:none;
  user-select:none;
}
.y3dp-video,.y3dp-canvas{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
}
.y3dp-video{object-fit:cover;background:#000}
.y3dp-canvas{z-index:3;cursor:crosshair;touch-action:none}
.y3dp-topbar{
  position:absolute;z-index:5;left:14px;right:14px;top:max(14px,env(safe-area-inset-top));
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  pointer-events:none;
}
.y3dp-brand,.y3dp-status{
  background:rgba(3,11,20,.72);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  border:1px solid rgba(255,255,255,.13);border-radius:999px;padding:8px 12px;
  font-weight:800;font-size:13px;letter-spacing:.02em;
}
.y3dp-status{color:#d6e7f6;font-weight:700}
.y3dp-status.is-live{color:#baf6d9;border-color:rgba(57,217,138,.34)}
.y3dp-help{
  position:absolute;z-index:5;top:65px;left:50%;transform:translateX(-50%);
  max-width:calc(100% - 32px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  background:rgba(0,0,0,.58);border:1px solid rgba(255,255,255,.13);border-radius:999px;
  padding:8px 13px;font-size:13px;font-weight:700;pointer-events:none;
}
.y3dp-start{
  position:absolute;inset:0;z-index:8;display:grid;place-items:center;padding:22px;
  background:linear-gradient(180deg,rgba(2,8,14,.76),rgba(2,8,14,.9));
}
.y3dp-start.is-hidden{display:none}
.y3dp-start-card{
  width:min(420px,100%);padding:28px 24px;text-align:center;border-radius:22px;
  background:rgba(11,25,42,.94);border:1px solid rgba(255,255,255,.14);box-shadow:0 24px 70px rgba(0,0,0,.35)
}
.y3dp-start-icon{
  width:64px;height:64px;border-radius:18px;display:grid;place-items:center;margin:0 auto 14px;
  background:linear-gradient(145deg,#ff3149,#ff6d48);font-size:38px;font-weight:900
}
.y3dp-start-card h2{margin:0 0 10px;font-size:23px;color:#fff}
.y3dp-start-card p{margin:0 0 18px;color:#c2d1df;line-height:1.65;font-size:14px}
.y3dp-start-card .y3dp-note{margin:12px 0 0;font-size:11px;color:#8fa5b9}
.y3dp-primary{
  width:100%;border:0;border-radius:14px;padding:14px 16px;background:#fff;color:#07111f;
  font-size:16px;font-weight:900;cursor:pointer
}
.y3dp-primary:disabled{opacity:.55;cursor:wait}
.y3dp-crosshair{display:none}
.y3dp-panel{background:var(--y3dp-panel);padding:16px 16px calc(18px + env(safe-area-inset-bottom))}
.y3dp-angle-row{display:grid;grid-template-columns:54px 1fr 54px;align-items:center;gap:12px}
.y3dp-round{
  width:54px;height:54px;border-radius:50%;border:1px solid rgba(255,255,255,.14);
  background:#14243a;color:#fff;font-size:28px;font-weight:500;cursor:pointer
}
.y3dp-angle-readout{text-align:center;line-height:1}
.y3dp-angle-number{font-size:44px;font-weight:900;font-variant-numeric:tabular-nums;letter-spacing:-.04em}
.y3dp-degree{font-size:24px;font-weight:800;vertical-align:top}
.y3dp-angle-caption{display:block;margin-top:5px;color:var(--y3dp-muted);font-size:11px;font-weight:700;letter-spacing:.08em}
.y3dp-slider{width:100%;margin:15px 0 13px;accent-color:var(--y3dp-red)}
.y3dp-presets{display:grid;grid-template-columns:repeat(6,1fr);gap:7px}
.y3dp-presets button,.y3dp-actions button{
  border:1px solid rgba(255,255,255,.13);background:#132238;color:#eef6ff;border-radius:10px;
  min-height:40px;padding:7px 8px;font-weight:800;font-size:12px;cursor:pointer
}
.y3dp-presets button.is-active{background:#fff;color:#06101c;border-color:#fff}
.y3dp-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:12px}
.y3dp-actions button[data-level].is-on{border-color:rgba(57,217,138,.65);color:#caffdf;background:#123226}
.y3dp-legend{display:flex;justify-content:center;flex-wrap:wrap;gap:14px;margin-top:13px;color:#aebfd0;font-size:11px;font-weight:700}
.y3dp-legend i{display:inline-block;width:18px;height:3px;border-radius:3px;margin-right:5px;vertical-align:middle}
.y3dp-blue{background:var(--y3dp-blue)}
.y3dp-red{background:var(--y3dp-red)}
.y3dp-guide-text{text-align:center;color:#8298ad;font-size:11px;line-height:1.55;margin-top:8px}
@media(max-width:620px){
  .y3dp-app{border-radius:0;max-width:none}
  .y3dp-stage{height:62vh;min-height:390px}
  .y3dp-presets{grid-template-columns:repeat(3,1fr)}
  .y3dp-actions{grid-template-columns:repeat(2,1fr)}
  .y3dp-help{top:60px;font-size:12px}
}
@media(prefers-reduced-motion:reduce){.y3dp-app *{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
.y3dp-diagnostic{min-height:18px;margin:10px 0 0;color:#ffcf9f;font-size:11px;line-height:1.45;word-break:break-word}
@supports not (height: min(68vh, 720px)){
  .y3dp-stage{height:68vh;max-height:720px}
}
