:root {
    --fg-accent: #10b981;
    --fg-navy: #1e2a4a;
    --fg-border: #d1d5db;
}

/* .ic-wrap box model (max-width/padding/margin) is owned centrally by
   dev-tool.css's ".dev-tool-widget .ic-wrap" rule — not redefined here
   to avoid the two paddings stacking and misaligning tool content. */

.ic-note {
    font-size: 13px;
    color: #6b7280;
    margin-top: 16px;
    line-height: 1.6;
}

/* ==== ACTION BAR ==== */
.ic-actionbar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.ic-btn {
    background: var(--fg-navy);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 7px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.ic-btn:hover {
    background: #16213e;
}

.ic-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.ic-btn-outline {
    background: #fff;
    color: var(--fg-navy);
    border: 1px solid var(--fg-border);
}

.ic-btn-outline:hover {
    border-color: var(--fg-navy);
    background: #f9fafb;
}

.ic-btn-outline:disabled {
    color: #9ca3af;
    cursor: not-allowed;
    background: #fff;
    border-color: var(--fg-border);
}

/* ==== Dropzone ==== */
.fg-dropzone {
    border: 2px dashed var(--fg-border);
    border-radius: 10px;
    background: #f9fafb;
    padding: 40px 24px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
}

.fg-dropzone-icon {
    width: 36px;
    height: 36px;
    color: var(--fg-accent);
    margin-bottom: 10px;
}

.fg-dropzone.fg-dragover {
    border-color: var(--fg-accent);
    background: #ecfdf5;
}

/* ==== Preview grid ==== */
.fg-previews {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.fg-preview-item {
    background: #fff;
    border: 1px solid var(--fg-border);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}

.fg-preview-canvas-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    margin-bottom: 10px;
    background-image:
        linear-gradient(45deg, #eee 25%, transparent 25%),
        linear-gradient(-45deg, #eee 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #eee 75%),
        linear-gradient(-45deg, transparent 75%, #eee 75%);
    background-size: 12px 12px;
    background-position: 0 0, 0 6px, 6px -6px, -6px 0px;
    border-radius: 6px;
}

.fg-preview-canvas-wrap canvas {
    max-width: 64px;
    max-height: 64px;
    image-rendering: pixelated;
}

.fg-preview-label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--fg-navy);
    margin-bottom: 2px;
}

.fg-preview-sub {
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 10px;
}

.fg-dl-btn {
    background: none;
    border: 1px solid var(--fg-border);
    color: var(--fg-navy);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.fg-dl-btn:hover {
    background: var(--fg-accent);
    border-color: var(--fg-accent);
    color: #fff;
}

/* ==== HTML output panel ==== */
.fg-panel {
    background: #fff;
    border: 1px solid var(--fg-border);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 18px;
    display: flex;
    flex-direction: column;
}

.fg-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f9fafb;
    border-bottom: 1px solid var(--fg-border);
    font-size: 13px;
    font-weight: 700;
    color: var(--fg-navy);
}

.fg-copy-btn {
    background: none;
    border: 1px solid var(--fg-border);
    color: var(--fg-navy);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.fg-copy-btn:hover {
    background: var(--fg-accent);
    border-color: var(--fg-accent);
    color: #fff;
}

.fg-copy-btn.fg-copied {
    background: var(--fg-accent);
    border-color: var(--fg-accent);
    color: #fff;
}

.fg-textarea {
    min-height: 160px;
    border: none;
    resize: vertical;
    padding: 14px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 13px;
    line-height: 1.6;
    color: var(--fg-navy);
    background: #f9fafb;
}

.fg-textarea:focus {
    outline: none;
}

@media (max-width: 720px) {
    .ic-actionbar {
        flex-direction: column;
        align-items: stretch;
    }

    .ic-actionbar .ic-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}
