.hj-morph { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: .8rem; font-weight: 600; }
.hj-morph .from { opacity: .75; text-decoration: line-through; text-decoration-color: rgba(255,255,255,.5); }
.hj-morph .arrow { color: var(--hj-cyan); animation: hj-nudge 1.6s ease-in-out infinite; }
.hj-morph .to { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; }
.hj-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
            padding: 34px 18px 28px; border-radius: 20px; cursor: pointer; outline: none;
            border: 2px dashed rgba(13,110,253,.45);
            background: linear-gradient(135deg, rgba(13,110,253,.06), rgba(124,58,237,.07));
            transition: border-color .2s, background .2s, transform .2s; }
.hj-drop:hover, .hj-drop:focus-visible { border-color: var(--hj-blue); background: linear-gradient(135deg, rgba(13,110,253,.11), rgba(124,58,237,.11)); }
.hj-drop:focus-visible { box-shadow: 0 0 0 4px rgba(13,110,253,.25); }
.hj-drop.over { border-style: solid; border-color: var(--hj-violet); transform: scale(1.01); background: linear-gradient(135deg, rgba(13,110,253,.16), rgba(124,58,237,.16)); }
.hj-drop-ico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 1.7rem; color: #fff; margin-bottom: 6px;
            background: linear-gradient(135deg, var(--hj-blue), var(--hj-violet)); box-shadow: 0 12px 26px rgba(13,110,253,.35); }
.hj-drop-t { font-size: 1.15rem; font-weight: 700; margin: 0; }
.hj-drop-s { font-size: .86rem; color: var(--text-muted); margin: 0; }
.hj-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.hj-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 16px; padding: 12px 14px; border-radius: 16px; background: var(--bg-soft); border: 1px solid var(--line); }
.hj-opt-l { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-right: 8px; }
.hj-seg { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(100,116,139,.15); }
.hj-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hj-seg label { margin: 0; padding: 6px 16px; border-radius: 9px; font-size: .88rem; font-weight: 600; cursor: pointer; color: var(--text-muted); transition: all .15s; }
.hj-seg input:checked + label { background: #fff; color: var(--hj-blue); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
body.dark-theme .hj-seg input:checked + label { background: #334155; color: #93c5fd; }
.hj-seg input:focus-visible + label { outline: 2px solid var(--hj-blue); outline-offset: 1px; }
.hj-q { display: inline-flex; align-items: center; gap: 10px; flex: 1; min-width: 200px; }
.hj-q input[type=range] { flex: 1; accent-color: var(--hj-blue); min-width: 100px; }
.hj-q output { min-width: 34px; font-weight: 700; font-size: .9rem; text-align: right; }
.hj-q[hidden] { display: none; }
.hj-bar { display: none; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.hj-bar.on { display: flex; }
.hj-sum { font-size: .9rem; font-weight: 600; margin: 0; }
.hj-sum small { color: var(--text-muted); font-weight: 500; }
.hj-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hj-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.hj-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--line); animation: hj-in .3s ease both; }
.hj-thumb { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: rgba(100,116,139,.18); color: var(--text-muted); font-size: 1.1rem; }
.hj-thumb canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.hj-meta { flex: 1; min-width: 0; }
.hj-name { font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.hj-info { font-size: .78rem; color: var(--text-muted); margin: 1px 0 0; display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: center; }
.hj-chip { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.hj-chip.wait { color: var(--text-muted); }
.hj-chip.work { color: var(--hj-blue); }
.hj-chip.done { color: var(--hj-green); }
.hj-chip.fail { color: #dc2626; }
.hj-chip.skip { color: #b45309; }
.hj-row-actions { display: flex; align-items: center; gap: 6px; }
.hj-x { border: 0; background: transparent; color: var(--text-muted); width: 32px; height: 32px; border-radius: 9px; cursor: pointer; }
.hj-x:hover { background: rgba(220,38,38,.12); color: #dc2626; }
.hj-alert { display: none; margin-top: 12px; padding: 10px 14px; border-radius: 12px; font-size: .86rem; background: rgba(245,158,11,.14); border: 1px solid rgba(245,158,11,.4); color: #92400e; }
body.dark-theme .hj-alert { color: #fcd34d; }
.hj-alert.on { display: block; }

/* ---------------- FileXL JFIF to JPG / PNG converter: extra rules ---------------- */
.hj-btn.ok { background: linear-gradient(135deg, #047857, #10b981); box-shadow: 0 10px 22px rgba(5,150,105,.28); }
.hj-btn.ok:hover { box-shadow: 0 14px 28px rgba(5,150,105,.4); }
.hj-btn[disabled] { opacity: .55; cursor: default; transform: none; }
.hj-opts [hidden] { display: none !important; }
.hj-opt-g { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 0; }
.jf-hint { flex: 1 1 100%; margin: 2px 0 0; font-size: .8rem; line-height: 1.5; color: var(--text-muted); }
.jf-hint i { color: var(--hj-blue); margin-right: 4px; }
.jf-tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: .7rem; font-weight: 700; background: rgba(13,110,253,.12); color: var(--hj-blue); }
body.dark-theme .jf-tag { color: #93c5fd; }
.jf-tag.same { background: rgba(5,150,105,.14); color: #047857; }
body.dark-theme .jf-tag.same { color: #6ee7b7; }
.jf-rate { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 14px; margin: 14px 0 0; font-size: .86rem; color: var(--text-muted); }
.jf-stars { color: #f59e0b; letter-spacing: 1px; font-size: 1rem; }
.jf-rate b { color: var(--text-main); }
.jf-rate .hj-btn { padding: 6px 14px; font-size: .82rem; }
/* The ad: ONE fixed-size unit directly under the converter, outside the tool card so nothing overlaps or clips it.
   320 x 100 on phones, 728 x 90 from tablet up. The section hides itself when the ad is not filled or cannot fit. */
.jf-adsec { margin: 22px 0 4px; }
.jf-adsec[hidden] { display: none; }
.jf-ad { max-width: 746px; margin: 0 auto; padding: 6px 0 8px; text-align: center; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--line); }
@media (min-width: 576px) { .jf-ad { padding: 6px 8px 8px; } }
.jf-ad-label { display: block; margin: 0 0 4px; font-size: 10px; line-height: 1.2; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); opacity: .8; }
.jf-ad .adsbygoogle { display: inline-block; width: 320px; height: 100px; max-width: 100%; }
@media (min-width: 800px) { .jf-ad .adsbygoogle { width: 728px; height: 90px; } }
@media (max-width: 575px) {
    .jf-adsec { margin-left: -16px; margin-right: -16px; }
    .jf-ad { border-radius: 0; border-left: 0; border-right: 0; }
    .hj-opts { gap: 10px; }
    .hj-q { min-width: 100%; }
    .hj-row { padding: 9px; gap: 10px; }
    .hj-thumb { flex-basis: 40px; width: 40px; height: 40px; }
    .hj-btn.sm .lbl { display: none; }
    .hj-bar-actions { width: 100%; }
    .hj-bar-actions .hj-btn { flex: 1; }
    .hj-drop { padding: 26px 12px 22px; }
}
@media (prefers-reduced-motion: reduce) { .hj-morph .arrow, .hj-row { animation: none; } }
@keyframes hj-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }
@keyframes hj-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
