.grfi-tool { color: #263238; }
.grfi-upload-area { margin-bottom: 18px; }
.grfi-file { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.grfi-upload {
    display: flex; min-height: 150px; padding: 24px; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    border: 2px dashed #9bb8dc; border-radius: 12px; background: #f4f8ff; color: #173d70; cursor: pointer; text-align: center;
    transition: border-color .18s ease, background .18s ease;
}
.grfi-upload:hover, .grfi-upload.is-dragging { border-color: #0047ab; background: #eaf2ff; }
.grfi-upload strong { font-size: 16px; }
.grfi-upload small { color: #64748b; }
.grfi-upload-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: #0047ab; color: #fff; font-size: 27px; line-height: 1; }
.grfi-workspace[hidden] { display: none !important; }
.grfi-toolbar { display: flex; flex-wrap: wrap; gap: 14px; margin: 18px 0; }
.grfi-control-group { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 12px; border: 1px solid #dbe4f0; border-radius: 9px; background: #f8fafc; }
.grfi-group-label { width: 100%; color: #475569; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.grfi-control-group .goodietools-button { padding: 9px 13px; }
.grfi-control-group .goodietools-button span { font-size: 13px; }
.grfi-preview-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 20px 0 9px; }
.grfi-dimensions { color: #64748b; font-size: 13px; }
.grfi-preview-wrap { display: flex; align-items: center; justify-content: center; min-height: 240px; max-height: 680px; padding: 18px; overflow: auto; border: 1px solid #dbe4f0; border-radius: 10px; background-color: #f1f5f9; background-image: linear-gradient(45deg,#e2e8f0 25%,transparent 25%),linear-gradient(-45deg,#e2e8f0 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e2e8f0 75%),linear-gradient(-45deg,transparent 75%,#e2e8f0 75%); background-size: 20px 20px; background-position: 0 0,0 10px,10px -10px,-10px 0; }
.grfi-canvas { display: block; max-width: 100%; max-height: 640px; width: auto; height: auto; object-fit: contain; box-shadow: 0 3px 16px rgba(15,23,42,.16); }
.grfi-bottom-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 14px; margin-top: 18px; }
.grfi-format-label { display: flex; min-width: 180px; flex-direction: column; gap: 7px; font-weight: 600; }
.grfi-format-label select { min-height: 42px; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; }
.grfi-main-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.grfi-privacy-note { margin: 12px 0 0; color: #64748b; font-size: 12px; }
.grfi-status { min-height: 1.5em; margin: 12px 0 0; color: #475569; }
@media (max-width: 600px) {
    .grfi-control-group { width: 100%; }
    .grfi-control-group .goodietools-button { flex: 1 1 auto; }
    .grfi-bottom-controls { align-items: stretch; }
    .grfi-format-label { width: 100%; }
    .grfi-main-actions { width: 100%; }
    .grfi-main-actions .goodietools-button { flex: 1; }
}
