/* FeeMath Product Photo Background Remover - tool styles. Uses the site variables from
   /assets/style.css with fallbacks. Pure ASCII. */
.bg-page { overflow-x: hidden; }
.bg-page *, .bg-page *::before, .bg-page *::after { box-sizing: border-box; }
.bg-page [hidden] { display: none !important; }
.bg-hero { padding-top: 24px; padding-bottom: 8px; }
.bg-hero .hx { margin: 6px 0 10px; line-height: 1.15; }
.bg-lead { color: var(--muted, #555); font-size: 1.05rem; max-width: 64ch; }
.bg-privacy { margin-top: 12px; }
.bg-app { display: grid; gap: 16px; padding-bottom: 24px; }
.bg-box { padding: 16px; border: 1px solid var(--line, #e3e3e3); border-radius: 14px; background: var(--surface, #fff); color: var(--ink, #111); box-shadow: var(--shadow, none); min-width: 0; }
.bg-h2 { font-size: 1.15rem; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.bg-h3 { font-size: 1.05rem; margin: 0 0 8px; }
.bg-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent, #2457ff); color: var(--accent-ink, #fff); font-size: .85rem; flex: none; }
.bg-plan { margin: 0; font-size: .92rem; color: var(--muted, #555); }
.bg-plan strong { color: var(--ink, #111); }
.bg-small { color: var(--muted, #555); font-size: .84rem; }
.bg-vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.bg-drop { display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; text-align: center; padding: 30px 14px; border: 2px dashed var(--line, #bbb); border-radius: 14px; background: var(--soft, #f6f7fb); cursor: pointer; }
.bg-drop span { color: var(--muted, #555); font-size: .88rem; max-width: 52ch; }
.bg-drop.is-over { border-color: var(--accent, #2457ff); }
.bg-drop:focus-within { outline: 3px solid var(--accent, #2457ff); outline-offset: 2px; }
.bg-msg { min-height: 1.2em; margin: 8px 0 0; font-size: .9rem; }
.bg-msg.is-warn { color: var(--bad, #b42318); }
.bg-msg.is-ok { color: var(--good, #137a3a); }

.bg-model { margin-top: 10px; }
.bg-model-t { margin: 0 0 6px; font-size: .9rem; }
.bg-bar { height: 10px; border-radius: 999px; background: var(--soft, #eef1ff); border: 1px solid var(--line, #ddd); overflow: hidden; }
.bg-bar span { display: block; height: 100%; width: 0; background: var(--grad, var(--accent, #2457ff)); transition: width .15s linear; }

.bg-main { display: grid; gap: 16px; grid-template-columns: 1fr; min-width: 0; }
@media (min-width: 900px) { .bg-main { grid-template-columns: 320px minmax(0, 1fr); align-items: start; } .bg-settings { position: sticky; top: 12px; } }

.bg-fs { border: 1px solid var(--rule, var(--line, #e3e3e3)); border-radius: 12px; padding: 10px 12px 12px; margin: 0 0 12px; min-width: 0; }
.bg-fs:last-child { margin-bottom: 0; }
.bg-fs legend { font-weight: 700; padding: 0 6px; font-size: .95rem; }
.bg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bg-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; min-height: 40px; border: 1px solid var(--line, #ccc); border-radius: 999px; cursor: pointer; font-size: .9rem; background: var(--bg, #fff); color: var(--ink, #111); }
.bg-chip small { color: var(--muted, #555); font-size: .75rem; }
.bg-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bg-chip:has(input:checked) { border-color: var(--accent, #2457ff); box-shadow: inset 0 0 0 1px var(--accent, #2457ff); background: var(--soft, #eef1ff); }
.bg-chip.is-on { border-color: var(--accent, #2457ff); box-shadow: inset 0 0 0 1px var(--accent, #2457ff); background: var(--soft, #eef1ff); }
.bg-chip:focus-within { outline: 3px solid var(--accent, #2457ff); outline-offset: 2px; }
.bg-chip.is-locked { opacity: .75; }
.bg-sw { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line, #bbb); flex: none; background: #e8f0ff; }
.bg-sw-white { background: #fff; }
.bg-sw-gray { background: #f2f2f2; }
.bg-sw-tr, .bg-checker { background-color: #fff; background-image: linear-gradient(45deg, #d6d6d6 25%, transparent 25%), linear-gradient(-45deg, #d6d6d6 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #d6d6d6 75%), linear-gradient(-45deg, transparent 75%, #d6d6d6 75%); background-size: 12px 12px; background-position: 0 0, 0 6px, 6px -6px, -6px 0; }
.bg-sw-tr { background-size: 8px 8px; background-position: 0 0, 0 4px, 4px -4px, -4px 0; }
.bg-lock { font-size: .7rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--accent, #2457ff); color: var(--accent, #2457ff); }
.bg-field { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; margin-top: 10px; min-width: 0; }
.bg-field > span { color: var(--muted, #555); }
.bg-field output { color: var(--ink, #111); font-weight: 600; }
.bg-field select, .bg-field input[type=color] { width: 100%; min-height: 42px; padding: 6px 10px; font: inherit; font-size: .95rem; color: var(--ink, #111); background: var(--bg, #fff); border: 1px solid var(--line, #ccc); border-radius: 10px; }
.bg-field input[type=color] { padding: 4px; cursor: pointer; }
.bg-field input[type=range] { width: 100%; accent-color: var(--accent, #2457ff); min-height: 30px; }
.bg-grid2 { display: grid; gap: 0 10px; grid-template-columns: 1fr; }
@media (min-width: 520px) and (max-width: 899px) { .bg-grid2 { grid-template-columns: 1fr 1fr; } }
.bg-check { display: flex; gap: 8px; align-items: center; font-size: .92rem; cursor: pointer; }
.bg-check input, .bg-radios input { width: 18px; height: 18px; flex: none; accent-color: var(--accent, #2457ff); }
.bg-radios { display: grid; gap: 10px; }
.bg-radios label { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; cursor: pointer; }
.bg-radios input { margin-top: 2px; }
.bg-radios span { color: var(--muted, #555); }
.bg-radios strong { color: var(--ink, #111); }
.bg-page select:focus, .bg-page input:focus-visible, .bg-page .btn:focus-visible, .bg-page summary:focus-visible { outline: 3px solid var(--accent, #2457ff); outline-offset: 2px; }

.bg-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bg-actions .btn { flex: 1 1 160px; justify-content: center; text-align: center; }
.bg-page .btn { min-height: 42px; cursor: pointer; }
.bg-page .btn[disabled] { opacity: .5; cursor: not-allowed; }
.bg-page .btn.bg-sm { min-height: 36px; padding: 4px 12px; font-size: .86rem; flex: 0 1 auto; }
.bg-empty { color: var(--muted, #555); padding: 24px 8px; text-align: center; border: 1px dashed var(--line, #ddd); border-radius: 12px; margin: 12px 0 0; }

.bg-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 14px; }
.bg-item { border: 1px solid var(--line, #e3e3e3); border-radius: 12px; padding: 10px; min-width: 0; }
.bg-item-h { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.bg-item-n { font-weight: 600; font-size: .92rem; overflow-wrap: anywhere; min-width: 0; }
.bg-st { font-size: .8rem; color: var(--muted, #555); }
.bg-st.is-err { color: var(--bad, #b42318); }
.bg-st.is-ok { color: var(--good, #137a3a); }
.bg-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bg-fig { margin: 0; min-width: 0; }
.bg-fig figcaption { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #555); margin-bottom: 4px; }
.bg-frame { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--rule, var(--line, #e3e3e3)); background: var(--soft, #f6f7fb); }
.bg-frame img, .bg-frame canvas { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; }
.bg-frame.bg-checker { background-color: #fff; }
.bg-spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line, #ccc); border-top-color: var(--accent, #2457ff); animation: bgspin .9s linear infinite; }
@keyframes bgspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .bg-spin { animation: none; } .bg-bar span { transition: none; } }
.bg-wait { font-size: .82rem; color: var(--muted, #555); padding: 8px; text-align: center; }
.bg-item-a { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bg-warn { font-size: .82rem; color: var(--bad, #b42318); margin: 6px 0 0; }
.bg-locked { font-size: .84rem; padding: 8px; text-align: center; }

.bg-upgrade { border: 2px solid var(--accent, #2457ff); background: var(--soft, #f6f7fb); }
.bg-upgrade.is-hot { box-shadow: 0 0 0 4px var(--accent, #2457ff); }
.bg-upgrade p { margin: 0 0 10px; }
.bg-next { margin: 0; }
.bg-seo { padding-top: 16px; padding-bottom: 32px; max-width: 860px; }
.bg-seo h2 { margin-top: 28px; }
.bg-seo li { margin-bottom: 6px; }
.bg-steps { padding-left: 1.3em; }
.bg-disclaimer { margin-top: 16px; }
