.mih-wrap {
    max-width: 720px;
    margin: 2rem auto;
    font-family: inherit;
}

.mih-card {
    padding: 28px;
    border: 1px solid rgba(127, 127, 127, 0.25);
    border-radius: 18px;
    background: var(--mih-bg, #fff);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.mih-heading h2 {
    margin: 0 0 6px;
    font-size: 1.7rem;
}

.mih-heading p {
    margin: 0 0 20px;
    opacity: 0.72;
}

.mih-dropzone {
    display: flex;
    min-height: 170px;
    padding: 24px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px dashed rgba(80, 80, 80, 0.3);
    border-radius: 14px;
    cursor: pointer;
    text-align: center;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.mih-dropzone:hover,
.mih-dropzone.is-dragging {
    border-color: currentColor;
    background: rgba(127, 127, 127, 0.06);
    transform: translateY(-1px);
}

.mih-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.mih-dropzone-title {
    font-size: 1.15rem;
    font-weight: 700;
}

.mih-dropzone-subtitle,
.mih-filename {
    font-size: .95rem;
    opacity: .7;
}

.mih-filename {
    margin-top: 4px;
    font-weight: 600;
    word-break: break-all;
}

.mih-preview-wrap,
.mih-result-preview {
    margin-top: 18px;
    text-align: center;
}

.mih-preview,
.mih-result-preview {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 360px;
    margin: 0 auto;
    border-radius: 12px;
    object-fit: contain;
}

.mih-upload-button,
.mih-copy-button {
    border: 0;
    border-radius: 10px;
    padding: 12px 18px;
    background: #171717;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.mih-upload-button {
    width: 100%;
    margin-top: 18px;
}

.mih-upload-button:disabled {
    opacity: .55;
    cursor: wait;
}

.mih-status {
    margin-top: 12px;
    min-height: 1.4em;
    font-weight: 600;
}

.mih-result {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid rgba(127, 127, 127, 0.25);
}

.mih-success-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
}

.mih-url-label {
    display: block;
    margin: 18px 0 7px;
    font-weight: 700;
}

.mih-url-row {
    display: flex;
    gap: 8px;
}

.mih-url {
    min-width: 0;
    flex: 1;
    padding: 11px 12px;
    border: 1px solid rgba(127, 127, 127, 0.35);
    border-radius: 10px;
    font: inherit;
}

.mih-copy-status {
    min-height: 1.4em;
    margin: 8px 0 0;
    font-weight: 700;
}

@media (max-width: 580px) {
    .mih-card {
        padding: 20px;
    }

    .mih-url-row {
        flex-direction: column;
    }

    .mih-copy-button {
        width: 100%;
    }
}


.mih-command-fields {
    margin-top: 20px;
}

.mih-field {
    display: block;
}

.mih-field > span {
    display: block;
    margin: 0 0 7px;
    font-weight: 700;
}

.mih-field input,
.mih-command {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid rgba(127, 127, 127, 0.35);
    border-radius: 10px;
    background: #fff;
    color: inherit;
    font: inherit;
    box-sizing: border-box;
}

.mih-field input:focus,
.mih-url:focus,
.mih-command:focus {
    outline: 2px solid currentColor;
    outline-offset: 1px;
}

.mih-dimensions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.mih-command-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.mih-command {
    min-height: 68px;
    flex: 1;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    line-height: 1.45;
}

@media (max-width: 580px) {
    .mih-dimensions {
        grid-template-columns: 1fr;
    }

    .mih-command-row {
        flex-direction: column;
    }
}
