/* ============================================================
   Favicon Generator - layout (2026-09-29, Icon Resizer family)
   Loaded AFTER custom_styles.css and stylef.css. stylef.css still
   styles the crop box, options, overlay and guide components; this
   file owns the page layout: upload card, two-column editor, cards,
   sticky action bar, result card, related tools and content.
   Scoped under .fvg. Site blue accent, no gradients, no 4px side borders.
   ============================================================ */

.fvg {
    --fvg-accent: #3399cc;
    --fvg-accent-strong: #237a9f;
    --fvg-accent-soft: rgba(51, 153, 204, 0.10);
    --fvg-accent-line: rgba(51, 153, 204, 0.45);
    --fvg-go: var(--primary-btn, #237a9f);
    --fvg-go-hover: #1b6283;
    --fvg-dl: #2b8557;
    --fvg-dl-hover: #1f6b45;
    --fvg-card: var(--bg-elevated, #fff);
    --fvg-sunk: var(--card-tertiary, #f1f5f9);
    --fvg-line: var(--border-color, #e2e8f0);
    --fvg-text-1: var(--text-primary, #1e293b);
    --fvg-text-2: var(--text-secondary, #555);
    --fvg-muted: var(--text-muted, #64748b);
    --fvg-checker: var(--checker-color, #e5e7eb);
}
[data-theme="dark"] .fvg {
    --fvg-accent: #60a5fa;
    --fvg-accent-strong: #93c5fd;
    --fvg-accent-soft: rgba(96, 165, 250, 0.14);
    --fvg-accent-line: rgba(96, 165, 250, 0.5);
    --fvg-sunk: #172033;
    --fvg-checker: #334155;
}

.fvg.tool-container { max-width: 1000px; padding: 2rem; }
.fvg [hidden] { display: none !important; }
.fvg button { width: auto; }
.fvg .faq-question { width: 100%; }
@media (max-width: 600px) {
    html.fvg-editing .back-to-top-wrapper { display: none; }
}

/* ---------- title ---------- */
.fvg .fvg-title-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--fvg-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
[data-theme="dark"] .fvg .fvg-title-icon { color: #0f172a; }
.fvg .fvg-title-icon svg { width: 30px; height: 30px; display: block; }
.fvg .tool-title { color: var(--fvg-accent); font-size: 2rem; }
.fvg .tool-description { max-width: 800px; }
.fvg .tool-description a { color: var(--fvg-accent-strong); font-weight: 500; }
[data-theme="dark"] .fvg .tool-description a { color: var(--fvg-accent); }
.fvg .tool-description code,
.fvg .fvg-info code {
    font-size: 0.85em;
    padding: 0.1em 0.35em;
    border-radius: 5px;
    background: var(--fvg-sunk);
    color: var(--fvg-text-1);
}

/* ---------- error ---------- */
.fvg .error-message {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    text-align: left;
    margin: 0 0 1rem;
    line-height: 1.55;
}
.fvg .error-message svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }

/* ---------- upload ---------- */
.fvg .fvg-upload {
    background: var(--fvg-card);
    border: 1px solid var(--fvg-line);
    border-radius: 20px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}
.fvg .fvg-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 2.6rem 1.25rem 2.2rem;
    border: 2px dashed var(--fvg-accent-line);
    border-radius: 14px;
    background: var(--fvg-sunk);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}
.fvg .fvg-drop:hover,
.fvg .fvg-drop:focus-visible,
.fvg .fvg-drop.dragover { border-color: var(--fvg-accent); background: var(--fvg-accent-soft); outline: none; }
.fvg .fvg-drop-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--fvg-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.4rem;
}
[data-theme="dark"] .fvg .fvg-drop-icon { color: #0f172a; }
.fvg .fvg-drop-icon svg { width: 30px; height: 30px; }
.fvg .fvg-drop-title { font-size: 1.3rem; font-weight: 700; color: var(--fvg-text-1); }
.fvg .fvg-drop-sub { font-size: 0.925rem; color: var(--fvg-muted); }
.fvg .fvg-drop-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem; margin-top: 0.8rem; }
.fvg .fvg-drop-chips span {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--fvg-line);
    background: var(--fvg-card);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--fvg-muted);
}
.fvg .fvg-upload-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    padding: 0.8rem 0.25rem 0;
}
.fvg .fvg-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.2rem;
    background: none;
    border: none;
    color: var(--fvg-accent-strong);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}
[data-theme="dark"] .fvg .fvg-link-btn { color: var(--fvg-accent); }
.fvg .fvg-link-btn:hover { text-decoration: underline; }
.fvg .fvg-link-btn svg { width: 16px; height: 16px; }
.fvg .fvg-upload-note { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: var(--fvg-muted); }
.fvg .fvg-upload-note svg { width: 15px; height: 15px; color: #339966; }

/* ---------- editor ---------- */
.fvg .fvg-editor {
    background: var(--fvg-sunk);
    border: 1px solid var(--fvg-line);
    border-radius: 20px;
    padding: 1rem;
}
.fvg .fvg-filebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.875rem;
    padding: 0.55rem 0.6rem 0.55rem 0.9rem;
    background: var(--fvg-card);
    border: 1px solid var(--fvg-line);
    border-radius: 12px;
}
.fvg .fvg-filebar .file-info { min-width: 0; flex-wrap: wrap; margin: 0; padding: 0; border: none; background: none; box-shadow: none; border-radius: 0; }
.fvg .file-info #fileName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.fvg .file-meta { background: var(--fvg-sunk); }
.fvg .btn-text { color: var(--fvg-accent-strong); }
[data-theme="dark"] .fvg .btn-text { color: var(--fvg-accent); }
.fvg .btn-text:hover { background: var(--fvg-accent-soft); }

.fvg .fvg-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 0.875rem;
    align-items: start;
}
.fvg .fvg-col-main,
.fvg .fvg-col-side { min-width: 0; }
.fvg .fvg-card {
    background: var(--fvg-card);
    border: 1px solid var(--fvg-line);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    min-width: 0;
}
.fvg .fvg-card + .fvg-card,
.fvg .fvg-card + .fvg-ad { margin-top: 0.875rem; }
.fvg .fvg-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem 0.75rem;
    margin-bottom: 0.8rem;
}
.fvg .fvg-h {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--fvg-text-1);
}
.fvg .fvg-h svg { width: 17px; height: 17px; color: var(--fvg-accent); }

/* mode + background pills */
.fvg .fit-options,
.fvg .bg-options { gap: 0.4rem; }
.fvg .fit-option,
.fvg .bg-option {
    flex-direction: row;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 0.5rem;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    background: var(--fvg-card);
    color: var(--fvg-text-2);
}
.fvg .fit-option:hover,
.fvg .bg-option:hover { border-color: var(--fvg-accent-line); }
.fvg .fit-option.active,
.fvg .bg-option.active { border-color: var(--fvg-accent); background: var(--fvg-accent-soft); color: var(--fvg-accent-strong); }
[data-theme="dark"] .fvg .fit-option.active,
[data-theme="dark"] .fvg .bg-option.active { color: var(--fvg-accent); }
.fvg .bg-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fvg .bg-option { flex-direction: column; }
.fvg .bg-swatch { width: 22px; height: 22px; border-radius: 6px; }
[data-theme="dark"] .fvg .bg-swatch.black { border-color: #64748b; }
.fvg .bg-option input.fvg-color {
    display: block;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid var(--fvg-line);
    border-radius: 6px;
    background: none;
    cursor: pointer;
}
.fvg .bg-option input.fvg-color::-webkit-color-swatch-wrapper { padding: 0; }
.fvg .bg-option input.fvg-color::-webkit-color-swatch { border: none; border-radius: 5px; }
.fvg .option-hint { margin: 0.5rem 0 0; font-size: 0.78rem; line-height: 1.5; color: var(--fvg-muted); }
.fvg .option-hint a { color: var(--fvg-accent-strong); }
.fvg .option-label { margin-bottom: 0.45rem; }
.fvg .option-label small { font-weight: 400; color: var(--fvg-muted); }

/* crop area */
.fvg .crop-area-wrapper {
    margin-top: 0.8rem;
    min-height: 260px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--fvg-line);
    background-color: var(--fvg-card);
    background-image:
        linear-gradient(45deg, var(--fvg-checker) 25%, transparent 25%),
        linear-gradient(-45deg, var(--fvg-checker) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, var(--fvg-checker) 75%),
        linear-gradient(-45deg, transparent 75%, var(--fvg-checker) 75%);
    background-size: 14px 14px;
    background-position: 0 0, 0 7px, 7px -7px, -7px 0;
}
.fvg .crop-canvas-container canvas { max-width: none; border-radius: 2px; }
.fvg .crop-box { border-color: var(--fvg-accent); touch-action: none; }
.fvg .crop-handle { border-color: var(--fvg-accent); width: 14px; height: 14px; }
.fvg .crop-handle.nw, .fvg .crop-handle.ne, .fvg .crop-handle.n { top: -7px; }
.fvg .crop-handle.sw, .fvg .crop-handle.se, .fvg .crop-handle.s { bottom: -7px; }
.fvg .crop-handle.nw, .fvg .crop-handle.sw, .fvg .crop-handle.w { left: -7px; }
.fvg .crop-handle.ne, .fvg .crop-handle.se, .fvg .crop-handle.e { right: -7px; }
.fvg .crop-controls { margin-top: 0.75rem; padding-top: 0; gap: 0.5rem; flex-wrap: wrap; }
.fvg .btn-small { background: var(--fvg-card); }
.fvg .btn-small:hover { border-color: var(--fvg-accent-line); color: var(--fvg-text-1); }

/* padding slider */
.fvg .fvg-field + .fvg-field { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--fvg-line); }
.fvg .fvg-field-row { display: flex; align-items: center; justify-content: space-between; }
.fvg .fvg-field-row .option-label { margin: 0; }
.fvg .fvg-val { font-size: 0.8rem; font-weight: 700; color: var(--fvg-accent-strong); }
[data-theme="dark"] .fvg .fvg-val { color: var(--fvg-accent); }
.fvg .fvg-range { width: 100%; margin: 0.5rem 0 0; accent-color: var(--fvg-accent); }

/* preview */
.fvg .preview-grid { gap: 0.4rem; align-items: stretch; }
.fvg .preview-item {
    padding: 0.5rem 0.25rem;
    border: 1px solid var(--fvg-line);
    border-radius: 8px;
    background: var(--fvg-sunk);
    justify-content: flex-end;
}
.fvg .preview-item canvas { background: none; image-rendering: auto; }
.fvg .preview-item[data-size="64"] canvas { width: 64px; height: 64px; }
.fvg .preview-item[data-size="48"] canvas { width: 48px; height: 48px; }
.fvg .preview-item[data-size="32"] canvas { width: 32px; height: 32px; }
.fvg .preview-item[data-size="16"] canvas { width: 16px; height: 16px; }
.fvg .fvg-tabs-demo { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.8rem; }
.fvg .fvg-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.7rem;
    border-radius: 10px 10px 0 0;
    font-size: 0.8rem;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.fvg .fvg-tab span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fvg .fvg-tab svg { width: 13px; height: 13px; opacity: 0.6; }
.fvg .fvg-tab canvas { width: 16px; height: 16px; flex-shrink: 0; }
.fvg .fvg-tab-light { background: #fff; color: #1f2937; border: 1px solid #dadce0; border-bottom-color: #fff; box-shadow: inset 0 -1px 0 #dadce0; }
.fvg .fvg-tab-dark { background: #35363a; color: #e8eaed; border: 1px solid #202124; }
.fvg .fvg-home {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.8rem;
    padding: 0.7rem 0.8rem;
    border-radius: 12px;
    background: #1e3a5f;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
}
.fvg .fvg-home canvas { width: 48px; height: 48px; border-radius: 12px; background: #fff; }

/* package */
.fvg .package-options { gap: 0.25rem; }
.fvg .package-option {
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.55rem 0.4rem;
    border-radius: 8px;
    font-size: 0.85rem;
}
.fvg .package-option:hover { background: var(--fvg-sunk); }
.fvg .package-option input[type="checkbox"] { width: 17px; height: 17px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--fvg-accent-strong); }
.fvg .package-option strong { display: block; color: var(--fvg-text-1); font-weight: 600; }
.fvg .package-option small { display: block; font-size: 0.76rem; color: var(--fvg-muted); }
.fvg .fvg-manifest { margin-top: 0.6rem; }
.fvg .fvg-input {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--fvg-line);
    border-radius: 8px;
    background: var(--fvg-card);
    color: var(--fvg-text-1);
    font: inherit;
    font-size: 0.875rem;
}
.fvg .fvg-input:focus { outline: 2px solid var(--fvg-accent-line); border-color: var(--fvg-accent); }
.fvg .fvg-ad { min-width: 0; }

/* ---------- sticky action bar ---------- */
.fvg .fvg-actionbar {
    position: sticky;
    bottom: 12px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.875rem;
    padding: 0.7rem 0.75rem 0.7rem 1.1rem;
    background: var(--fvg-card);
    border: 1px solid var(--fvg-line);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
}
.fvg .fvg-summary { display: flex; flex-direction: column; min-width: 0; }
.fvg .fvg-summary strong { font-size: 0.95rem; color: var(--fvg-text-1); }
.fvg .fvg-summary span { font-size: 0.78rem; color: var(--fvg-muted); }
.fvg .fvg-actionbar-btns { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.fvg .fvg-btn-ghost { background: none; border: 1px solid transparent; color: var(--fvg-muted); box-shadow: none; }
.fvg .fvg-btn-ghost:hover { color: var(--fvg-text-1); border-color: var(--fvg-line); background: var(--fvg-sunk); }
.fvg .fvg-go {
    background: var(--fvg-go);
    color: #fff;
    min-height: 46px;
    font-weight: 700;
}
.fvg .fvg-go:hover:not(:disabled) { background: var(--fvg-go-hover); color: #fff; box-shadow: none; }
.fvg .fvg-go:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- overlay ---------- */
.fvg .processing-spinner { border-top-color: var(--fvg-accent); }
/* ConvertICO ring logo as the loader (same rings as the header .brand__icon) */
.fvg .fvg-loader {
    display: block;
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    overflow: visible;
    --cico-outer: #f2534e; --cico-outer-soft: #f8d3d1;
    --cico-mid: #31ae77; --cico-mid-soft: #d0e7dd;
    --cico-inner: #2b9edb;
}
[data-theme="dark"] .fvg .fvg-loader { --cico-outer-soft: rgba(242, 83, 78, 0.22); --cico-mid-soft: rgba(49, 174, 119, 0.22); }
.fvg .fvg-loader circle { fill: none; stroke-width: 72; transform-box: fill-box; transform-origin: center; }
.fvg .fvg-loader .bp { stroke: var(--cico-outer-soft); }
.fvg .fvg-loader .gp { stroke: var(--cico-mid-soft); }
.fvg .fvg-loader .b { stroke: var(--cico-outer); stroke-linecap: round; stroke-dasharray: 35.3 100; animation: fvgSpinL 1.3s linear infinite; }
.fvg .fvg-loader .g { stroke: var(--cico-mid); stroke-linecap: round; stroke-dasharray: 75.8 100; animation: fvgSpinR 2.1s linear infinite; }
.fvg .fvg-loader .r { stroke: var(--cico-inner); animation: fvgBreathe 1.3s ease-in-out infinite; }
@keyframes fvgSpinL { from { transform: rotate(117deg); } to { transform: rotate(-243deg); } }
@keyframes fvgSpinR { from { transform: rotate(36deg); } to { transform: rotate(396deg); } }
@keyframes fvgBreathe { 50% { transform: scale(0.9); } }
@media (prefers-reduced-motion: reduce) {
    .fvg .fvg-loader .b { animation-duration: 4s; }
    .fvg .fvg-loader .g { animation-duration: 6s; }
    .fvg .fvg-loader .r { animation: none; }
}
.fvg .progress-fill { background: var(--fvg-accent); }

/* ---------- result ---------- */
.fvg .fvg-result {
    background: var(--fvg-card);
    border: 1px solid var(--fvg-line);
    border-radius: 20px;
    padding: 1.4rem;
    box-shadow: var(--shadow-sm);
}
.fvg .fvg-result-head { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1.1rem; }
.fvg .fvg-result-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #339966;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
[data-theme="dark"] .fvg .fvg-result-icon { background: #4ade80; color: #0f172a; }
.fvg .fvg-result-icon svg { width: 24px; height: 24px; }
.fvg .fvg-result-title { margin: 0; font-size: 1.2rem; font-weight: 700; color: var(--fvg-text-1); }
.fvg .fvg-result-meta { margin: 0.15rem 0 0; font-size: 0.85rem; color: var(--fvg-muted); }
.fvg .download-section { justify-content: flex-start; margin-bottom: 1.2rem; }
.fvg .fvg-btn-download { background: var(--fvg-dl); color: #fff; min-height: 46px; font-weight: 700; }
.fvg .fvg-btn-download:hover { background: var(--fvg-dl-hover); color: #fff; }
.fvg .btn-secondary { color: var(--fvg-text-2); background: var(--fvg-sunk); border-color: var(--fvg-line); }
.fvg .btn-secondary:hover { color: var(--fvg-text-1); border-color: var(--fvg-accent-line); }
.fvg .generated-files { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.5rem; margin-bottom: 1.2rem; }
.fvg .file-card {
    gap: 0.35rem;
    padding: 0.75rem 0.5rem;
    border: 1px solid var(--fvg-line);
    border-radius: 10px;
    background: var(--fvg-sunk);
}
.fvg .fvg-file-thumb {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background-color: var(--fvg-card);
    background-image:
        linear-gradient(45deg, var(--fvg-checker) 25%, transparent 25%),
        linear-gradient(-45deg, var(--fvg-checker) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, var(--fvg-checker) 75%),
        linear-gradient(-45deg, transparent 75%, var(--fvg-checker) 75%);
    background-size: 10px 10px;
    background-position: 0 0, 0 5px, 5px -5px, -5px 0;
}
.fvg .fvg-file-thumb canvas { image-rendering: auto; }
.fvg .fvg-file-thumb svg { width: 26px; height: 26px; color: var(--fvg-accent); }
.fvg .file-card .fvg-file-name { font-size: 0.74rem; font-weight: 600; color: var(--fvg-text-1); }
.fvg .file-card .fvg-file-meta { font-size: 0.7rem; color: var(--fvg-muted); }
.fvg .code-section { margin-bottom: 0; }
.fvg .code-block { background: var(--fvg-sunk); color: var(--fvg-text-1); border-color: var(--fvg-line); white-space: pre; }

/* ---------- related, guide nav, content ---------- */
.fvg .related-tools { margin-top: 1.5rem; }
.fvg .related-link svg { width: 16px; height: 16px; }
.fvg .guide-toc { margin: 1.5rem 0 0; background: var(--fvg-card); border-color: var(--fvg-line); }
.fvg .toc-toggle { width: 100%; color: var(--fvg-text-1); }
.fvg .toc-toggle:hover { background: var(--fvg-sunk); }
.fvg .toc-label svg { color: var(--fvg-accent); }
.fvg .toc-link { background: var(--fvg-sunk); border-color: var(--fvg-line); color: var(--fvg-text-2); }
.fvg .toc-link:hover { background: var(--fvg-accent-strong); border-color: var(--fvg-accent-strong); color: #fff; transform: none; }
.fvg .fvg-info { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 1.25rem; }
.fvg .fvg-info .info-card { background: var(--fvg-card); border: 1px solid var(--fvg-line); box-shadow: none; scroll-margin-top: 90px; }
.fvg .fvg-info .info-card h2 svg { width: 22px; height: 22px; color: var(--fvg-accent); }
.fvg .fvg-info p { margin: 0 0 0.8rem; line-height: 1.7; color: var(--fvg-text-2); }
.fvg .fvg-info p:last-child { margin-bottom: 0; }
.fvg .fvg-info a { color: var(--fvg-accent-strong); font-weight: 500; }
[data-theme="dark"] .fvg .fvg-info a { color: var(--fvg-accent); }
.fvg .fvg-steps { margin: 0 0 1rem; padding: 0; list-style: none; counter-reset: fvg; display: flex; flex-direction: column; gap: 0.7rem; }
.fvg .fvg-steps li { counter-increment: fvg; position: relative; padding-left: 2.4rem; line-height: 1.6; color: var(--fvg-text-2); }
.fvg .fvg-steps li::before {
    content: counter(fvg);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 50%;
    background: var(--fvg-accent);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
[data-theme="dark"] .fvg .fvg-steps li::before { color: #0f172a; }
.fvg .fvg-steps strong,
.fvg .fvg-list strong { color: var(--fvg-text-1); }
.fvg .fvg-list { margin: 0 0 1rem; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.6rem; line-height: 1.6; color: var(--fvg-text-2); }
.fvg .fvg-table-wrap { overflow-x: auto; margin: 0.4rem 0 1rem; border: 1px solid var(--fvg-line); border-radius: 10px; }
.fvg .fvg-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.fvg .fvg-table th,
.fvg .fvg-table td { padding: 0.6rem 0.8rem; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--fvg-line); }
.fvg .fvg-table tr:last-child td { border-bottom: none; }
.fvg .fvg-table th { background: var(--fvg-sunk); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--fvg-muted); }
.fvg .fvg-table td { color: var(--fvg-text-2); }
.fvg .fvg-table td:first-child { font-weight: 600; color: var(--fvg-text-1); white-space: nowrap; }
.fvg .fvg-table-center th:not(:first-child),
.fvg .fvg-table-center td:not(:first-child) { text-align: center; }
.fvg .fvg-table svg { width: 18px; height: 18px; vertical-align: middle; }
.fvg .support-yes { color: #339966; }
.fvg .support-no { color: #e64e4e; }
.fvg .support-partial { color: #b45309; }
[data-theme="dark"] .fvg .support-yes { color: #4ade80; }
[data-theme="dark"] .fvg .support-partial { color: #fbbf24; }
.fvg .priority-tag.essential { background: rgba(51, 153, 102, 0.12); color: #2b8557; }
.fvg .priority-tag.recommended { background: var(--fvg-accent-soft); color: var(--fvg-accent-strong); }
[data-theme="dark"] .fvg .priority-tag.essential { color: #4ade80; }
[data-theme="dark"] .fvg .priority-tag.recommended { color: var(--fvg-accent); }
.fvg .format-card,
.fvg .appearance-item { background: var(--fvg-sunk); border-color: var(--fvg-line); }
.fvg .format-card > p { color: var(--fvg-text-2); }
.fvg .format-pro { color: #2b8557; }
.fvg .format-con { color: #c23b3b; }
[data-theme="dark"] .fvg .format-pro { color: #4ade80; }
[data-theme="dark"] .fvg .format-con { color: #f87171; }
.fvg .format-header svg,
.fvg .code-example-header svg,
.fvg .code-header svg { color: var(--fvg-accent); }
.fvg .appearance-icon { background: var(--fvg-accent-soft); color: var(--fvg-accent); }
.fvg .appearance-content p { color: var(--fvg-text-2); }
.fvg .guide-note { background: var(--fvg-accent-soft); border-color: var(--fvg-accent-line); color: var(--fvg-text-2); }
.fvg .guide-note > svg { color: var(--fvg-accent); }
.fvg .faq-question svg { width: 20px; height: 20px; }


/* ---------- v2: text source, shape, Apple + SVG options ---------- */
.fvg .fvg-upload-actions { display: inline-flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
.fvg .btn-text { width: auto; }
.fvg .fvg-card-head .btn-text { padding: 4px 8px; font-size: 0.8rem; }

.fvg .fvg-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0.4rem; }
.fvg .fvg-seg button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 0.5rem;
    border: 1px solid var(--fvg-line);
    border-radius: 10px;
    background: var(--fvg-card);
    color: var(--fvg-text-2);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}
.fvg .fvg-seg button:hover { border-color: var(--fvg-accent-line); }
.fvg .fvg-seg button.active { border-color: var(--fvg-accent); background: var(--fvg-accent-soft); color: var(--fvg-accent-strong); }
[data-theme="dark"] .fvg .fvg-seg button.active { color: var(--fvg-accent); }
.fvg .fvg-shape-ic { width: 16px; height: 16px; border: 2px solid currentColor; flex-shrink: 0; }
.fvg .fvg-shape-ic.rd { border-radius: 5px; }
.fvg .fvg-shape-ic.ci { border-radius: 50%; }
.fvg .fvg-card .fvg-field:first-of-type { margin-top: 0; }

.fvg .fvg-text-grid { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 1rem; align-items: start; }
.fvg .fvg-text-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border-radius: 12px;
    border: 1px solid var(--fvg-line);
    background-color: var(--fvg-card);
    background-image:
        linear-gradient(45deg, var(--fvg-checker) 25%, transparent 25%),
        linear-gradient(-45deg, var(--fvg-checker) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, var(--fvg-checker) 75%),
        linear-gradient(-45deg, transparent 75%, var(--fvg-checker) 75%);
    background-size: 14px 14px;
    background-position: 0 0, 0 7px, 7px -7px, -7px 0;
}
.fvg .fvg-text-stage canvas { width: 150px; height: 150px; }
.fvg .fvg-text-fields { min-width: 0; }
.fvg .fvg-input-big { font-size: 1.25rem; font-weight: 700; padding: 0.5rem 0.75rem; }
.fvg .fvg-emoji-row { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.5rem; }
.fvg .fvg-emoji-row button {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--fvg-line);
    border-radius: 8px;
    background: var(--fvg-card);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}
.fvg .fvg-emoji-row button:hover { border-color: var(--fvg-accent); background: var(--fvg-accent-soft); }
.fvg .fvg-field-inline { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.fvg .fvg-field-inline .option-label { margin: 0; }
.fvg .fvg-color-lg {
    width: 44px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--fvg-line);
    border-radius: 8px;
    background: none;
    cursor: pointer;
}
.fvg .fvg-color-lg::-webkit-color-swatch-wrapper { padding: 2px; }
.fvg .fvg-color-lg::-webkit-color-swatch { border: none; border-radius: 6px; }

/* sub-options under a package checkbox */
.fvg .fvg-sub {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 0 0 0.35rem 2.05rem;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    background: var(--fvg-sunk);
    border: 1px solid var(--fvg-line);
}
.fvg .fvg-sub-label { font-size: 0.76rem; font-weight: 700; color: var(--fvg-text-1); }
.fvg .fvg-sub-hint { font-size: 0.72rem; line-height: 1.45; color: var(--fvg-muted); }
.fvg .fvg-mini-seg { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.fvg .fvg-mini-seg button,
.fvg .fvg-mini-color {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0.2rem 0.65rem;
    border: 1px solid var(--fvg-line);
    border-radius: 8px;
    background: var(--fvg-card);
    color: var(--fvg-text-2);
    font: inherit;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
}
.fvg .fvg-mini-color { padding: 0.2rem 0.35rem; }
.fvg .fvg-mini-seg .active { border-color: var(--fvg-accent); background: var(--fvg-accent-soft); color: var(--fvg-accent-strong); }
[data-theme="dark"] .fvg .fvg-mini-seg .active { color: var(--fvg-accent); }
.fvg .fvg-mini-color input,
.fvg .fvg-check input[type="color"] {
    width: 26px;
    height: 22px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}
.fvg .fvg-mini-color input::-webkit-color-swatch-wrapper,
.fvg .fvg-check input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.fvg .fvg-mini-color input::-webkit-color-swatch,
.fvg .fvg-check input[type="color"]::-webkit-color-swatch { border: 1px solid var(--fvg-line); border-radius: 5px; }
.fvg .fvg-check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--fvg-text-2); cursor: pointer; }
.fvg .fvg-check input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--fvg-accent-strong); }
.fvg .fvg-badge {
    display: inline-block;
    margin-left: 0.3rem;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    background: var(--fvg-accent-soft);
    color: var(--fvg-accent-strong);
    font-size: 0.66rem;
    font-style: normal;
    font-weight: 700;
    vertical-align: 1px;
}
[data-theme="dark"] .fvg .fvg-badge { color: var(--fvg-accent); }
.fvg .package-option.is-disabled { opacity: 0.55; cursor: not-allowed; }
.fvg .fvg-file-thumb img { display: block; }

@media (max-width: 600px) {
    .fvg .fvg-text-grid { grid-template-columns: minmax(0, 1fr); }
    .fvg .fvg-text-stage { max-width: 200px; margin: 0 auto; width: 100%; }
    .fvg .fvg-sub { margin-left: 0; }
    .fvg .fvg-shape-seg button { flex-direction: column; gap: 0.3rem; }
}


/* ---------- Favicon Checker hand-off (result card) ---------- */
.fvg .fvg-check-card {
    margin: 1.2rem 0 0;
    padding: 1rem 1.1rem;
    border: 1px solid var(--fvg-line);
    border-radius: 14px;
    background: var(--fvg-sunk);
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.fvg .fvg-check-card.is-next { border-color: var(--fvg-accent); background: var(--fvg-accent-soft); box-shadow: 0 0 0 3px var(--fvg-accent-soft); }
.fvg .fvg-check-head { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.8rem; }
.fvg .fvg-check-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--fvg-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
[data-theme="dark"] .fvg .fvg-check-icon { color: #0f172a; }
.fvg .fvg-check-icon svg { width: 20px; height: 20px; }
.fvg .fvg-check-title { margin: 0; font-size: 1rem; font-weight: 700; color: var(--fvg-text-1); }
.fvg .fvg-check-sub { margin: 0.15rem 0 0; font-size: 0.82rem; line-height: 1.5; color: var(--fvg-muted); }
.fvg .fvg-check-sub a { color: var(--fvg-accent-strong); font-weight: 600; }
[data-theme="dark"] .fvg .fvg-check-sub a { color: var(--fvg-accent); }
.fvg .fvg-check-row { display: flex; gap: 0.5rem; }
.fvg .fvg-check-row .fvg-input { flex: 1; min-width: 0; min-height: 46px; font-size: 0.95rem; }
.fvg .fvg-check-row .fvg-go { flex-shrink: 0; }
.fvg .fvg-check-error { margin: 0.5rem 0 0; font-size: 0.8rem; color: #c23b3b; }
[data-theme="dark"] .fvg .fvg-check-error { color: #f87171; }
.fvg .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 600px) {
    .fvg .fvg-check-row { flex-direction: column; }
    .fvg .fvg-check-row .fvg-go { justify-content: center; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .fvg .fvg-layout { grid-template-columns: minmax(0, 1fr); }
    .fvg .formats-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .fvg.tool-container { padding: 1rem; }
    .fvg .tool-title { font-size: 1.6rem; }
    .fvg .fvg-title-icon { width: 46px; height: 46px; border-radius: 13px; }
    .fvg .fvg-title-icon svg { width: 24px; height: 24px; }
    .fvg .fvg-editor { padding: 0.6rem; border-radius: 16px; }
    .fvg .fvg-upload { padding: 0.8rem; }
    .fvg .fvg-drop { padding: 2rem 0.8rem 1.8rem; }
    .fvg .fvg-drop-title { font-size: 1.1rem; }
    .fvg .fvg-card { padding: 0.85rem; }
    .fvg .file-info #fileName { max-width: 160px; }
    .fvg .fvg-filebar { padding: 0.45rem 0.5rem 0.45rem 0.75rem; }
    .fvg .crop-area-wrapper { min-height: 200px; padding: 8px; }
    .fvg .bg-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fvg .fvg-actionbar { bottom: 8px; padding: 0.6rem; flex-wrap: wrap; }
    .fvg .fvg-summary { display: none; }
    .fvg .fvg-actionbar-btns { width: 100%; }
    .fvg .fvg-actionbar-btns .fvg-go { flex: 1; justify-content: center; }
    .fvg .fvg-actionbar-btns .fvg-btn-ghost span { display: none; }
    .fvg .fvg-result { padding: 1rem; }
    .fvg .download-section .btn { flex: 1 1 100%; justify-content: center; }
    .fvg .appearances-grid { grid-template-columns: minmax(0, 1fr); }
    .fvg .fvg-table td:first-child { white-space: normal; }
}
