:root{
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    color: #202938;
    background: #f4f6fb;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    padding: 28px 16px 48px;
}
main {
    max-width: 1050px;
    margin: auto;
}
.hero {
    margin-bottom: 22px;
}
h1 {
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    margin: 0 0 8px;
}
.muted {
    color: #667085;
}
.panel {
    background: white;
    border: 1px solid #e1e6ef;
    border-radius: 16px;
    padding: 20px;
    margin: 16px 0;
    box-shadow: 0 5px 20px #15264a08;
}
.drop {
    border: 2px dashed #9aa8bd;
    border-radius: 14px;
    padding: 36px 18px;
    text-align: center;
    background: #fafbfe;
    cursor: pointer;
    transition: .15s;
}
.drop.drag {
    border-color: #3859d6;
    background: #eef2ff;
}
.drop strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 6px;
}
button,
select,
input {
    font: inherit;
}
button,
.file-button {
    border: 0;
    border-radius: 10px;
    padding: 10px 15px;
    background: #344fc4;
    color: white;
    cursor: pointer;
    font-weight: 650;
}
button.secondary {
    background: #eef1f7;
    color: #283247;
}
button:disabled {
    opacity: .45;
    cursor: not-allowed;
}
.controls {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.field label {
    font-size: .9rem;
    font-weight: 650;
}
.field select,
.field input[type=number] {
    width: 100%;
    padding: 9px;
    border: 1px solid #ccd4e1;
    border-radius: 9px;
    background: white;
}
.inline {
    display: flex;
    align-items: center;
    gap: 8px;
}
.inline input[type=checkbox] {
    width: 17px;
    height: 17px;
}
input[type=range] {
    width: 100%;
    accent-color: #344fc4;
}
.range-label {
    display: flex;
    justify-content: space-between;
    font-size: .9rem;
}
.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.status {
    margin: 12px 0 0;
    min-height: 1.4em;
    color: #475467;
}
.list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.card {
    border: 1px solid #e0e5ed;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    min-width: 0;
}
.preview {
    height: 155px;
    background:
        linear-gradient(45deg, #edf0f5 25%, transparent 25%),
        linear-gradient(-45deg, #edf0f5 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #edf0f5 75%),
        linear-gradient(-45deg, transparent 75%, #edf0f5 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
    display: grid;
    place-items: center;
}
.preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.card-body {
    padding: 11px;
}
.filename {
    font-weight: 650;
    overflow-wrap: anywhere;
    font-size: .92rem;
}
.meta {
    font-size: .8rem;
    color: #667085;
    margin-top: 5px;
    overflow-wrap: anywhere;
}
.card-actions {
    display: flex;
    gap: 7px;
    margin-top: 10px;
}
.card-actions button {
    padding: 7px 9px;
    font-size: .83rem;
    flex: 1;
}
.badge {
    display: inline-block;
    font-size: .75rem;
    border-radius: 6px;
    padding: 3px 7px;
    background: #edf2ff;
    color: #344fc4;
    margin-top: 7px;
}
.notice {
    font-size: .88rem;
    line-height: 1.6;
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px;
    color: #475467;
}
footer {
    font-size: .82rem;
    color: #667085;
    text-align: center;
    margin-top: 22px;
}
@media (max-width: 760px) {
    .controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 430px) {
    body {
        padding: 18px 10px;
    }
    .panel {
        padding: 14px;
    }
    .controls {
        grid-template-columns: 1fr;
    }
}