/* Card camera: shared by the Centering Tool and AI Grading. */
body.nstcam-open { overflow: hidden !important; }
.nstcam-overlay[hidden] { display: none !important; }
.nstcam-overlay, .nstcam-overlay * { box-sizing: border-box; }
.nstcam-overlay { position: fixed; inset: 0; z-index: 2147483646; display: flex; justify-content: center; align-items: center; background: rgba(3, 5, 13, .96); color: #f6f4ff; font-family: inherit; padding: max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)); }
.nstcam-panel { width: min(100%, 560px); max-height: 100%; display: flex; flex-direction: column; min-height: 0; background: #10111e; border: 1px solid #39304f; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 90px #0008; }
.nstcam-header { display:flex; align-items: flex-start; justify-content:space-between; gap: 12px; padding: 12px 14px 8px; }
.nstcam-header strong { font-size: clamp(16px, 3.8vw, 21px); font-weight: 800; color: #f7f4ff; }
.nstcam-header p { margin: 3px 0 0; color: #bdb4d5; font-size: 11px; line-height: 1.35; }
.nstcam-iconbtn { background: #252238; color:#f5efff; border: 1px solid #53456e; border-radius: 13px; cursor: pointer; min-width: 44px; min-height: 44px; font-size: 26px; line-height: 1; display: inline-grid; place-items:center; padding: 0 10px; }
.nstcam-iconbtn.is-on { background: #6240ab; }
.nstcam-iconbtn:hover, .nstcam-shutter:hover { border-color: #b28bff; }
.nstcam-status { display:flex; align-items:center; justify-content:center; gap:8px; margin: 0 12px 8px; padding: 7px 10px; background: #2e1c29; border: 1px solid #a24a62; border-radius: 10px; color: #ffc8d4; font-size: 12px; line-height:1.3; font-weight: 650; text-align: center; }
.nstcam-dot { width: 10px; height: 10px; border-radius:50%; background: #f05f76; flex: 0 0 auto; }
.nstcam-status[data-state="blue"] { color:#c2e6ff; background:#142840; border-color:#327ec6; }
.nstcam-status[data-state="blue"] .nstcam-dot { background:#3998ef; }
.nstcam-status[data-state="green"] { color:#cbffdd; background:#142e25; border-color:#3dbc70; }
.nstcam-status[data-state="green"] .nstcam-dot { background:#3fd27e; }
.nstcam-viewport { position: relative; aspect-ratio: 3 / 4; width:100%; flex:1 1 auto; min-height: 150px; max-height: min(64vh, 670px); overflow: hidden; background: #03050a; }
.nstcam-viewport video { width:100%; height:100%; object-fit:cover; display:block; }
.nstcam-guide { position:absolute; border: 2px dashed #fa5f78; border-radius:10px; box-shadow:0 0 0 100vmax #02030b20; pointer-events:none; transition: border-color .17s; }
.nstcam-guide .nstcam-corner { position:absolute; width:26px; height:26px; border-color:#fa5f78; border-style:solid; pointer-events:none; }
.nstcam-guide .tl { left:-3px; top:-3px; border-width:4px 0 0 4px; border-radius:9px 0 0 0; }
.nstcam-guide .tr { right:-3px; top:-3px; border-width:4px 4px 0 0; border-radius:0 9px 0 0; }
.nstcam-guide .bl { left:-3px; bottom:-3px; border-width:0 0 4px 4px; border-radius:0 0 0 9px; }
.nstcam-guide .br { right:-3px; bottom:-3px; border-width:0 4px 4px 0; border-radius:0 0 9px 0; }
.nstcam-fixedplus, .nstcam-foundplus { position:absolute; font-size: 52px; font-family:Arial,sans-serif; font-weight:300; line-height:1; transform:translate(-50%,-50%); text-shadow: 0 1px 4px #000; pointer-events: none; }
.nstcam-fixedplus { top:50%;left:50%;color:white; }
.nstcam-foundplus {color:#fa5f78; z-index: 2; }
.nstcam-viewport[data-state="blue"] .nstcam-guide { border-color:#47a3f5; }
.nstcam-viewport[data-state="blue"] .nstcam-guide .nstcam-corner { border-color:#47a3f5; }
.nstcam-viewport[data-state="blue"] .nstcam-foundplus { color:#47a3f5; }
.nstcam-viewport[data-state="green"] .nstcam-guide { border-color:#47dc92; }
.nstcam-viewport[data-state="green"] .nstcam-guide .nstcam-corner { border-color:#47dc92; }
.nstcam-viewport[data-state="green"] .nstcam-foundplus { color:#47dc92; }
.nstcam-tips { padding: 7px 12px 0; display:flex; flex-direction:column; gap:2px; }
.nstcam-tips span { color: #d9cdf1; font-size: 11px; font-weight: 600; }
.nstcam-tips small { color: #9994b5; font-size: 10px; line-height:1.35; }
.nstcam-actions { display:flex; justify-content: space-around; align-items:center; gap:14px; padding: 9px 20px 13px; }
.nstcam-shutter { width:67px; height:67px; flex:0 0 auto; border: 4px solid white; background: transparent; border-radius:50%; padding:5px; display: grid; place-items:center; cursor:pointer; }
.nstcam-shutter > span { display:block; width:100%; height:100%; background:white; border-radius:50%; }
.nstcam-shutter:disabled { opacity:.45; cursor: wait; }
.nstcam-btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; border:1px solid #6b4eb0; border-radius:10px; background:#613cba; color:#fff; padding:12px 16px; min-height:44px; font:inherit; font-weight:700; cursor:pointer; }
.nstcam-btn-secondary { background:#262039; }
.nst-centering .nstcam-entry, .nst-analyzer .nstcam-entry { display:flex; gap:10px; flex-wrap:wrap; justify-content:center; margin:12px 0 0; }
.nst-centering .nstcam-entry .nstcam-btn, .nst-analyzer .nstcam-entry .nstcam-btn { min-width:145px; }
.nst-a-second .nstcam-entry { justify-content:flex-start; margin: 8px 0 0; }
@media(max-width: 620px) {
    .nstcam-overlay { padding: 0; }
    .nstcam-panel { width: 100%; height: 100%; max-height: 100%; border: 0; border-radius: 0; }
    .nstcam-header { padding: max(8px, env(safe-area-inset-top)) 14px 7px; }
    .nstcam-viewport { flex:1 1 auto; max-height: none; min-height: 170px; aspect-ratio: auto; }
    .nstcam-tips { padding-top: 7px; }
    .nstcam-actions { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
    .nstcam-shutter { width: 64px; height:64px; }
}
@media(max-height: 630px) and (orientation: landscape) {
    .nstcam-panel { max-width: 700px; }
    .nstcam-header p,.nstcam-tips small { display:none; }
    .nstcam-actions { padding:5px; }
    .nstcam-shutter { width:51px;height:51px; }
}

/* 1.36.1: native high-resolution still-photo option and source resolution notice. */
.nstcam-quality { display:block; color:#d8c7fa !important; font-size:10px; }
.nstcam-hires { display:flex; flex-direction:column; align-items:center; gap:5px; padding:0 12px max(12px, env(safe-area-inset-bottom)); }
.nstcam-hires .nstcam-btn { font-size:12px; padding:9px 15px; min-height:40px; max-width:100%; }
.nstcam-hires small { color:#a8a3c1; font-size:10px; line-height:1.35; text-align:center; }
@media(max-width:620px) { .nstcam-actions { padding-bottom:8px; } .nstcam-hires { padding-bottom:max(10px, env(safe-area-inset-bottom)); } }

/* 1.36.2 – framing, hardware zoom, original-resolution crop review */
.nstcam-closer { color:#dccaff; font-size:11px; line-height:1.45; }
.nstcam-camera-zoom[hidden],.nstcam-crop-overlay[hidden] { display:none !important; }
.nstcam-camera-zoom { display:flex; align-items:center; gap:12px; padding:8px 16px 0; }
.nstcam-camera-zoom label { white-space:nowrap; font-size:12px; font-weight:650; }
.nstcam-camera-zoom input { flex:1 1 auto; min-width:0; accent-color:#9965f4; }
.nstcam-camera-zoom output { font-size:12px; min-width:32px; text-align:right; }
.nstcam-crop-overlay { position:fixed;inset:0;z-index:2147483647;display:flex;align-items:center;justify-content:center;background:rgba(2,3,9,.97);padding:env(safe-area-inset-top) max(5px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(5px, env(safe-area-inset-left));color:#fff; }
.nstcam-crop-overlay,.nstcam-crop-overlay *{box-sizing:border-box}
.nstcam-crop-panel{display:flex;flex-direction:column;min-height:0;max-height:100%;width:min(100%,640px);padding:12px;gap:9px;border:1px solid #47385e;border-radius:16px;background:#161527;font-family:inherit}
.nstcam-crop-head{display:flex;justify-content:space-between;align-items:start;gap:10px}
.nstcam-crop-head strong{font-weight:800;font-size:18px;color:#fff}
.nstcam-crop-head p{margin:5px 0 0;color:#c7bbdd;font-size:12px;line-height:1.4}
.nstcam-crop-photo-wrap{flex:1 1 auto;min-height:100px;overflow:auto;display:flex;align-items:center;justify-content:center;background:#06070d;border-radius:11px;padding:5px}
.nstcam-crop-photo{position:relative;display:inline-block;line-height:0;max-width:100%;max-height:100%;touch-action:none;}
.nstcam-crop-photo img{display:block;width:auto;height:auto;max-width:100%;max-height:49vh;object-fit:contain;border-radius:3px}
.nstcam-crop-frame{position:absolute;border:3px solid #b07dff;box-shadow:0 0 0 200vw #0008,0 0 10px #0008;border-radius:5px;touch-action:none;cursor:grab;z-index:1;}
.nstcam-crop-frame:active{cursor:grabbing}
.nstcam-crop-frame::before,.nstcam-crop-frame::after{content:'';position:absolute;left:50%;top:0;height:100%;width:1px;background:#ffffff45;pointer-events:none}
.nstcam-crop-frame::after{left:0;top:50%;height:1px;width:100%}
.nstcam-crop-frame span{display:block;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:22px;line-height:1;color:#fff;text-shadow:0 1px 4px #000;pointer-events:none}
.nstcam-crop-details{display:flex;flex-direction:column;gap:3px}
.nstcam-crop-details label{font-size:12px;font-weight:700}
.nstcam-crop-details input{width:100%;accent-color:#9965f4;min-height:30px}
.nstcam-crop-details small{font-size:11px;color:#b3e1ca;line-height:1.35}
.nstcam-crop-details small.is-low{color:#ffd79e}
.nstcam-crop-buttons{display:flex;flex-wrap:wrap;gap:8px}
.nstcam-crop-buttons .nstcam-btn{flex:1 1 175px;font-size:12px;min-height:43px;padding:9px 10px}
@media(max-width:620px){.nstcam-crop-panel{border:none;border-radius:0;width:100%;height:100%;max-height:100%;gap:8px}.nstcam-crop-photo img{max-height:52vh}.nstcam-crop-buttons .nstcam-btn{flex:1 1 120px;font-size:11px}}
