*{box-sizing:border-box}
:root{
  color-scheme:dark;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
html,body{margin:0;background:#0a0a0a;color:#fff;min-height:100%}
body{padding:0}
button,input,select{font:inherit}
button{
  border:0;border-radius:12px;padding:12px 16px;background:#fff;color:#111;font-weight:700;cursor:pointer;
}
button:disabled{opacity:.45;cursor:not-allowed}
button.secondary{background:#242424;color:#fff;border:1px solid #3b3b3b}
.app{max-width:980px;margin:0 auto;padding:14px}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}
.topbar h1{font-size:22px;margin:0 0 4px}
.topbar p{margin:0;color:#a9a9a9;font-size:13px}
.viewer{
  position:relative;width:100%;aspect-ratio:3/4;max-height:72vh;overflow:hidden;border-radius:20px;background:#171717;
  border:1px solid #2d2d2d;
}
video,canvas{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
canvas{pointer-events:none}
.permission-card{
  position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(90%,420px);
  padding:22px;border-radius:18px;background:rgba(15,15,15,.88);backdrop-filter:blur(10px);text-align:center;border:1px solid #333;
}
.permission-card h2{margin-top:0}
.permission-card p{color:#c8c8c8;line-height:1.45}
.status{
  position:absolute;left:12px;bottom:12px;padding:8px 10px;border-radius:999px;background:rgba(0,0,0,.6);
  font-size:12px;color:#eee;backdrop-filter:blur(6px)
}
.controls{margin-top:14px;background:#141414;border:1px solid #2a2a2a;border-radius:18px;padding:14px}
.control-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.control-row label,.slider-grid label{display:flex;flex-direction:column;gap:7px;font-size:13px;color:#d6d6d6}
input[type=file],select{width:100%;background:#202020;color:#fff;border:1px solid #383838;border-radius:10px;padding:10px}
.slider-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin-top:14px}
input[type=range]{width:100%}
.actions{display:flex;gap:10px;margin-top:14px}
.hint{font-size:12px;color:#999;margin:12px 0 0;line-height:1.4}
@media(max-width:760px){
  .app{padding:0}
  .topbar{padding:12px 12px 0}
  .topbar p{display:none}
  .viewer{border-radius:0;aspect-ratio:9/13;max-height:70vh;border-left:0;border-right:0}
  .controls{border-radius:18px 18px 0 0;margin-top:0;border-left:0;border-right:0;border-bottom:0}
  .control-row{grid-template-columns:1fr}
  .slider-grid{grid-template-columns:1fr 1fr}
}

.toggle-label{
  justify-content:center;
  padding:8px 10px;
  border:1px solid #333;
  border-radius:10px;
  background:#1d1d1d;
}
.toggle-label input{width:20px;height:20px}
