.tmr-detector {
    max-width: 860px;
    margin: 1.5rem auto;
    font: inherit;
}

.tmr-detector .tmr-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    color: #111827;
}

.tmr-detector h2,
.tmr-detector h3 {
    margin: 0 0 .75rem;
    color: #111827;
    font-weight: 500;
}

.tmr-detector h2 {
    font-size: 1.25rem;
    font-style: italic;
}

.tmr-detector h3 {
    margin-top: 1.25rem;
    font-size: 1.15rem;
    font-style: italic;
}

.tmr-detector p,
.tmr-detector label,
.tmr-detector .tmr-help {
    color: #374151;
}

.tmr-detector form {
    display: grid;
    gap: .75rem;
    margin-top: .75rem;
}

.tmr-detector .tmr-row {
    display: grid;
    gap: .5rem;
}

@media (min-width: 640px) {
    .tmr-detector .tmr-row {
        grid-template-columns: 180px 1fr;
        align-items: center;
    }
}

.tmr-detector input[type='file'],
.tmr-detector input[type='text'] {
    width: 100%;
    box-sizing: border-box;
    padding: .6rem .7rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #111827;
}

.tmr-detector input[type='file'] {
    padding: .45rem .6rem;
}

.tmr-detector .tmr-help {
    font-size: .9rem;
}

.tmr-detector code {
    background: #f3f4f6;
    color: #111827;
    padding: .1rem .35rem;
    border-radius: 6px;
    word-break: break-all;
}

.tmr-detector .tmr-actions {
    display: flex;
    gap: .5rem;
    align-items: center;
    margin-top: .25rem;
}

.tmr-detector .tmr-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem .9rem;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
}

.tmr-detector .tmr-btn-primary {
    background: #111827;
    color: #fff;
}

.tmr-detector .tmr-btn-primary[disabled] {
    opacity: .7;
    cursor: not-allowed;
}

.tmr-detector .tmr-btn-secondary {
    background: #f3f4f6;
    color: #111827;
}

.tmr-detector .tmr-alert {
    margin-top: .9rem;
    padding: .75rem .9rem;
    border-radius: 8px;
}

.tmr-detector .tmr-alert-error {
    background: #fef2f2;
    color: #991b1b;
}

.tmr-detector .tmr-alert-warn {
    background: #fffbeb;
    color: #92400e;
}

.tmr-detector .tmr-alert-ok {
    background: #ecfdf5;
    color: #065f46;
}

.tmr-detector .tmr-preview {
    margin-top: 1rem;
}

.tmr-detector .tmr-preview iframe {
    width: 100%;
    height: 420px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #1f2937;
}

.tmr-detector .tmr-table-wrap {
    overflow-x: auto;
}

.tmr-detector .tmr-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: #fff;
    color: #000;
}

.tmr-detector .tmr-table th,
.tmr-detector .tmr-table td {
    border: 1px solid #e5e7eb;
    padding: .55rem .6rem;
    text-align: left;
    vertical-align: top;
    color: #000;
}

.tmr-detector .tmr-table thead th,
.tmr-detector .tmr-table tbody th {
    background: #f9fafb;
    font-weight: 600;
}