.instruction-scan-button,.instruction-space-button,.instruction-ai-button,.instruction-ai-usage-refresh,.instruction-scanner button,.scan-file-label {min-height:44px;padding:9px 14px;font:inherit;cursor:pointer;border:1px solid #b5c7d6;border-radius:8px;background:#f5f9fc;color:#163752;}
.instruction-scan-button,.auth-toolbar .instruction-scan-button {background:#163752;color:white;}
.dashboard-ai-usage {margin-top:24px;padding:16px 0;border-top:1px solid #dbe3eb;color:#596979;font-size:13px;line-height:1.6;overflow-wrap:anywhere;}
.dashboard-ai-usage .instruction-ai-usage-summary {margin:0 0 8px;}
.instruction-scan-outcome {margin:8px 12px;overflow-wrap:anywhere;}
.instruction-scan-outcome:empty {display:none;}
.instruction-scanner {width:min(620px,calc(100% - 20px));max-height:calc(100dvh - 32px);box-sizing:border-box;overflow-y:auto;padding:18px;border:1px solid #bac9d5;border-radius:14px;color:#163752;background:#fff;}
.instruction-scanner::backdrop {background:rgb(0 0 0 / 65%);}
.instruction-scanner [hidden] {display:none!important;}
.instruction-scanner header,.instruction-scanner footer,.scan-capture-actions {display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;}
.instruction-scanner h2 {font-size:20px;margin:0;}
.instruction-scanner header {position:sticky;top:-18px;padding:10px 0;background:white;z-index:2;}
.scan-help,.scan-status,.scan-review p,.scan-photo p {font-size:14px;line-height:1.6;overflow-wrap:anywhere;}
.scan-status {min-height:24px;}
.scan-window {position:relative;width:100%;aspect-ratio:4/3;background:#15242e;overflow:hidden;border-radius:10px;}
.scan-window video {width:100%;height:100%;object-fit:cover;display:block;}
.scan-preview-message {position:absolute;left:8px;right:8px;bottom:8px;margin:0;padding:8px;border-radius:6px;background:rgb(0 0 0 / 78%);color:white;font-size:13px;line-height:1.5;pointer-events:none;}
.scan-preview-message:empty {display:none;}
.scan-guide {position:absolute;left:18%;top:50%;width:64%;aspect-ratio:4;transform:translateY(-50%);border:2px solid #64e4bd;box-sizing:border-box;box-shadow:0 0 0 200px rgb(0 0 0 / 38%);pointer-events:none;}
.scan-guide::before,.scan-guide::after {position:absolute;color:#fff;font-size:12px;background:rgb(0 0 0 / 60%);padding:2px 6px;}
.scan-guide::before {content:'会社金型番号';top:-25px;left:0;}
.scan-guide::after {content:'英数字だけを枠内へ';bottom:-25px;right:0;}
.scan-capture-actions {margin:12px 0;justify-content:flex-start;}
.scan-file-label {display:inline-flex;align-items:center;}
.scan-file-label input {width:1px;height:1px;position:absolute;opacity:0;}
.scan-file-label:focus-within {outline:2px solid #1677ff;}
.scan-photo-preview {position:relative;line-height:0;max-width:320px;margin:12px auto;}
.scan-photo-preview img {width:100%;height:auto;}
.scan-photo-guide {position:absolute;left:0;width:100%;border:2px solid #168364;box-sizing:border-box;box-shadow:0 0 0 1000px rgb(0 0 0 / 10%);pointer-events:none;}
.scan-photo-preview {overflow:hidden;}
.instruction-scanner label {display:grid;gap:6px;margin:12px 0;}
.instruction-scanner input,.instruction-scanner select,.instruction-scanner textarea {width:100%;min-width:0;box-sizing:border-box;min-height:44px;padding:9px;font:inherit;border:1px solid #bac9d5;border-radius:6px;}
.instruction-scanner input[type=range] {padding:0;}
.instruction-scanner textarea {min-height:90px;resize:vertical;}
.instruction-scanner button:disabled {opacity:.55;cursor:wait;}
.scan-needs-check {padding:8px;border-left:3px solid #d89614;background:#fffbe6;border-radius:4px;}
.scan-quality-hint:not(:empty) {padding:8px;background:#f0f6fc;border-radius:6px;}
.scan-readout {padding:10px;margin:12px 0;border:1px solid #d89614;border-radius:8px;background:#fffbe6;overflow-wrap:anywhere;}
.scan-readout-label,.scan-copy-status {margin:4px 0;font-size:14px;line-height:1.5;}
.scan-readout-codes {display:flex;gap:8px;flex-wrap:wrap;}
.scan-readout-codes button {font-family:monospace;font-weight:700;user-select:all;}
.scan-review footer [type=submit] {background:#163752;color:white;}
.scan-review footer {margin-top:20px;position:sticky;bottom:-18px;padding:12px 0;background:white;z-index:2;}
