.scanner-page .scanner-stage {
    overflow: hidden;
}

.scanner-video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #0f1318;
}

#scannerVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.scanner-debug-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.scanner-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: grid;
    place-items: center;
    z-index: 3;
}

.scanner-guide {
    width: 68%;
    aspect-ratio: 63 / 88;
    border: 2px solid rgba(255, 255, 255, 0.75);
    border-radius: 12px;
    box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.28);
}

.scanner-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.scanner-status {
    font-size: 0.92rem;
    color: #4a5568;
}

.scanner-result-card {
    min-height: 100%;
}

.scanner-best-match {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.scanner-best-image {
    width: 96px;
    height: 128px;
    border-radius: 8px;
    border: 1px solid #dde2e8;
    object-fit: cover;
    background: #f5f6f7;
}

.scanner-debug-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.scanner-debug-grid canvas {
    width: 100%;
    height: auto;
    border: 1px solid #d8dde4;
    border-radius: 6px;
    background: #0f1318;
}

.scanner-debug-label {
    font-size: 0.78rem;
    color: #5e6b7a;
    margin-bottom: 4px;
}
