.erc-check-wrap {
    max-width: 800px;
    margin: 40px auto;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1b1830;
}
.erc-check-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 8px;
    text-align: center;
    color: #1b1830;
}
.erc-check-sub {
    text-align: center;
    color: #7b7699;
    margin: 0 0 24px;
    font-size: 14px;
}

.erc-check-search {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.erc-check-search input {
    flex: 1;
    min-width: 180px;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #e5e1f3;
    border-radius: 12px;
    background: #fff;
}
.erc-check-search input:focus {
    outline: none;
    border-color: #6d28d9;
    box-shadow: 0 0 0 3px rgba(109,40,217,.15);
}
.erc-check-scan-btn, .erc-check-go-btn {
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 700;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    color: #fff;
    white-space: nowrap;
}
.erc-check-scan-btn { background: linear-gradient(135deg, #f59e0b, #db2777); }
.erc-check-go-btn { background: linear-gradient(120deg, #4c1d95, #6d28d9); }

.erc-check-status {
    padding: 14px 18px;
    border-radius: 12px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
}
.erc-check-status.is-loading { background: #f1ecfe; color: #4c1d95; }
.erc-check-status.is-ok { background: #e7f7f1; color: #046c4e; }
.erc-check-status.is-error { background: #fdeef4; color: #9d174d; }

.erc-check-card {
    display: flex;
    gap: 20px;
    background: #fff;
    border: 1px solid #e5e1f3;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px -20px rgba(27,24,48,.4);
    align-items: flex-start;
}
.erc-check-img {
    flex: 0 0 auto;
    width: 200px;
}
.erc-check-img img {
    width: 100%;
    max-height: 300px;
    border-radius: 10px;
    border: 1px solid #e5e1f3;
    object-fit: contain;
    background: #faf9ff;
    display: block;
}
.erc-check-noimg {
    width: 200px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    background: #faf9ff;
    border-radius: 10px;
    border: 1px solid #e5e1f3;
}
.erc-check-info {
    flex: 1;
    min-width: 0;
}
.erc-check-info h2 {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 800;
    color: #1b1830;
    line-height: 1.3;
    word-wrap: break-word;
}
.erc-check-meta {
    font-size: 13px;
    color: #7b7699;
    margin-bottom: 10px;
}
.erc-check-etat {
    font-size: 14px;
    margin-bottom: 8px;
}
.erc-check-code {
    font-size: 12px;
    color: #4a4568;
    margin-bottom: 4px;
}
.erc-check-code code {
    background: #f1ecfe;
    padding: 2px 8px;
    border-radius: 6px;
    font-family: ui-monospace, Menlo, monospace;
}

.erc-check-states {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 16px;
}
.erc-check-state {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1.5px solid #e5e1f3;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.erc-check-state-lbl {
    font-size: 12px;
    font-weight: 700;
    color: #4a4568;
}
.erc-check-state-val {
    font-size: 14px;
    font-weight: 800;
}
.erc-check-state.is-missing { border-color: #fca5a5; background: #fef2f2; }
.erc-check-state.is-missing .erc-check-state-val { color: #dc2626; }
.erc-check-state.is-good { border-color: #6ee7b7; background: #ecfdf5; }
.erc-check-state.is-good .erc-check-state-val { color: #059669; }
.erc-check-state.is-ok { border-color: #fcd34d; background: #fffbeb; }
.erc-check-state.is-ok .erc-check-state-val { color: #d97706; }
.erc-check-state.is-warn { border-color: #fdba74; background: #fff7ed; }
.erc-check-state.is-warn .erc-check-state-val { color: #c2410c; }

.erc-check-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(9,8,18,.92);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.erc-check-modal[hidden] { display: none; }
.erc-check-modal-shell {
    width: min(520px, 100%);
    background: #171331;
    border-radius: 18px;
    padding: 16px;
    color: #f4f1ff;
}
.erc-check-modal-shell header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 800;
}
.erc-check-modal-shell header button {
    background: rgba(139,92,246,.2);
    border: 1px solid rgba(167,139,250,.3);
    color: #f4f1ff;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
}
#erc-check-reader {
    height: 320px;
    background: #07060f;
    border-radius: 12px;
    overflow: hidden;
}
.erc-check-tip {
    text-align: center;
    font-size: 12px;
    color: #a9a2c9;
    margin: 10px 0;
}
.erc-check-manual {
    display: flex;
    gap: 8px;
}
.erc-check-manual input {
    flex: 1;
    padding: 11px;
    border-radius: 10px;
    border: 1.5px solid rgba(167,139,250,.3);
    background: rgba(255,255,255,.05);
    color: #f4f1ff;
    font-size: 15px;
}
.erc-check-manual button {
    padding: 11px 18px;
    border-radius: 10px;
    border: 0;
    background: linear-gradient(120deg, #f59e0b, #2dd4bf);
    color: #1b1830;
    font-weight: 800;
    cursor: pointer;
}
body.erc-check-lock { overflow: hidden; }

@media (max-width: 600px) {
    .erc-check-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .erc-check-img { width: 100%; max-width: 240px; }
    .erc-check-info h2 { font-size: 18px; }
    .erc-check-search { flex-direction: column; }
    .erc-check-scan-btn, .erc-check-go-btn { width: 100%; }
}