/* ============================================================
   ConvertICO image viewer kit - scoped under .tfv / .tfv-* (2026-10-11)
   Shared header, footer, FAQ and related pills come from custom_styles.css.
   Accent: blue #3399cc (viewers). Single colours, no gradients,
   no thick side borders. Light default, dark via [data-theme="dark"].
   ============================================================ */
.tfv {
    --tfv-accent: #3399cc;
    --tfv-accent-strong: #237a9f;
    --tfv-accent-soft: rgba(51, 153, 204, 0.09);
    --tfv-accent-line: rgba(51, 153, 204, 0.45);
    --tfv-go: #237a9f;
    --tfv-go-hover: #1b6183;
    --tfv-card: var(--bg-elevated, #fff);
    --tfv-sunk: var(--card-tertiary, #f1f5f9);
    --tfv-open: var(--card-secondary, #f8f9fa);
    --tfv-line: var(--border-color, #e2e8f0);
    --tfv-text-1: var(--text-primary, #1e293b);
    --tfv-text-2: var(--text-secondary, #555);
    --tfv-muted: var(--text-muted, #64748b);
    --tfv-ok: #2f855a;
    --tfv-ok-soft: rgba(51, 153, 102, 0.1);
    --tfv-ok-line: rgba(51, 153, 102, 0.35);
    --tfv-warn: #b45309;
    --tfv-warn-soft: rgba(217, 119, 6, 0.08);
    --tfv-warn-line: rgba(217, 119, 6, 0.35);
    --tfv-red: #c23b3b;
    --tfv-red-soft: rgba(230, 78, 78, 0.08);
    --tfv-red-line: rgba(230, 78, 78, 0.35);
    --tfv-checker: #e5e7eb;
    --tfv-checker-bg: #fff;
    --tfv-stage: #eef2f6;
    --tfv-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
[data-theme="dark"] .tfv {
    --tfv-accent: #60a5fa;
    --tfv-accent-strong: #93c5fd;
    --tfv-accent-soft: rgba(96, 165, 250, 0.12);
    --tfv-accent-line: rgba(96, 165, 250, 0.45);
    --tfv-go: #2563eb;
    --tfv-go-hover: #1d4ed8;
    --tfv-sunk: #172033;
    --tfv-open: #1a2438;
    --tfv-ok: #4ade80;
    --tfv-ok-soft: rgba(74, 222, 128, 0.1);
    --tfv-ok-line: rgba(74, 222, 128, 0.35);
    --tfv-warn: #fbbf24;
    --tfv-warn-soft: rgba(251, 191, 36, 0.08);
    --tfv-warn-line: rgba(251, 191, 36, 0.35);
    --tfv-red: #f87171;
    --tfv-red-soft: rgba(248, 113, 113, 0.1);
    --tfv-red-line: rgba(248, 113, 113, 0.4);
    --tfv-checker: #334155;
    --tfv-checker-bg: #1e293b;
    --tfv-stage: #0f1726;
}

.tfv.tool-container { max-width: 1100px; margin: 0 auto; padding: 2rem; }
.tfv-root [hidden], .tfv [hidden] { display: none !important; }
.tfv .tfv-main { background: none; border: none; box-shadow: none; border-radius: 0; overflow: visible; padding: 0; }
.tfv button { font: inherit; }
.tfv code { font-family: var(--tfv-mono); font-size: 0.86em; padding: 0.05rem 0.35rem; border-radius: 5px; background: var(--tfv-sunk); }
.tfv kbd { display: inline-block; padding: 0.05rem 0.4rem; border-radius: 5px; border: 1px solid var(--tfv-line); border-bottom-width: 2px; background: var(--tfv-card); font: 600 0.78em var(--tfv-mono); color: var(--tfv-text-1); }
.tfv .tfv-muted { color: var(--tfv-muted); }
.tfv .tfv-mono { font-family: var(--tfv-mono); }
.tfv .tfv-small { font-size: 0.8rem; margin: 0.6rem 0 0; color: var(--tfv-muted); }
.tfv .tfv-small a, .tfv .tfv-link { color: var(--tfv-accent-strong); font-weight: 600; }
[data-theme="dark"] .tfv .tfv-small a, [data-theme="dark"] .tfv .tfv-link { color: var(--tfv-accent); }
.tfv :focus-visible { outline: 3px solid var(--tfv-accent-line); outline-offset: 2px; }

/* backgrounds */
.tfv .tfv-bg-checker {
    background-color: var(--tfv-checker-bg);
    background-image: linear-gradient(45deg, var(--tfv-checker) 25%, transparent 25%), linear-gradient(-45deg, var(--tfv-checker) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--tfv-checker) 75%), linear-gradient(-45deg, transparent 75%, var(--tfv-checker) 75%);
    background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.tfv .tfv-bg-white { background: #fff; }
.tfv .tfv-bg-dark { background: #111827; }
.tfv .tfv-bg-gray { background: var(--tfv-stage); }

/* ---------- title ---------- */
.tfv .tool-header { text-align: center; margin-bottom: 1.75rem; }
.tfv .tfv-title-row { display: flex; align-items: center; justify-content: center; gap: 0.9rem; margin-bottom: 0.9rem; }
.tfv .tfv-title-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--tfv-accent); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
[data-theme="dark"] .tfv .tfv-title-icon { color: #0b1e33; }
.tfv .tfv-title-icon svg { width: 30px; height: 30px; display: block; }
.tfv .tool-title { margin: 0; font-size: 2rem; font-weight: 700; color: var(--tfv-accent); line-height: 1.2; }
.tfv .tool-description { max-width: 800px; margin: 0 auto; font-size: 1.05rem; line-height: 1.65; color: var(--tfv-text-2); }
.tfv .tool-description a { color: var(--tfv-accent-strong); font-weight: 500; }
[data-theme="dark"] .tfv .tool-description a { color: var(--tfv-accent); }

/* ---------- error / notice ---------- */
.tfv .tfv-error { display: flex; align-items: flex-start; gap: 0.7rem; margin: 0 0 1rem; padding: 0.9rem 1rem; border-radius: 12px; border: 1px solid var(--tfv-red-line); background: var(--tfv-red-soft); color: var(--tfv-text-1); }
.tfv .tfv-error > svg { width: 20px; height: 20px; color: #e64e4e; flex-shrink: 0; margin-top: 2px; }
.tfv .tfv-error > div { flex: 1; min-width: 0; }
.tfv .tfv-error p { margin: 0; font-size: 0.92rem; line-height: 1.55; overflow-wrap: anywhere; }
.tfv .tfv-error p + p { margin-top: 0.4rem; color: var(--tfv-muted); font-size: 0.86rem; }
.tfv .tfv-error a { color: var(--tfv-red); font-weight: 600; }
.tfv .tfv-note { display: flex; align-items: flex-start; gap: 0.6rem; margin: 0.75rem 0 0; padding: 0.7rem 0.9rem; border-radius: 12px; border: 1px solid var(--tfv-accent-line); background: var(--tfv-accent-soft); font-size: 0.88rem; line-height: 1.55; color: var(--tfv-text-2); }
.tfv .tfv-note.is-warn { border-color: var(--tfv-warn-line); background: var(--tfv-warn-soft); }
.tfv .tfv-note > svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--tfv-accent); }
.tfv .tfv-note.is-warn > svg { color: var(--tfv-warn); }
.tfv .tfv-note a { color: var(--tfv-accent-strong); font-weight: 600; }
[data-theme="dark"] .tfv .tfv-note a { color: var(--tfv-accent); }
.tfv .tfv-note > div { min-width: 0; overflow-wrap: anywhere; }
.tfv .tfv-x { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex-shrink: 0; border: none; border-radius: 8px; background: none; color: var(--tfv-muted); cursor: pointer; padding: 0; margin: 0; }
.tfv .tfv-x:hover { background: rgba(100, 116, 139, 0.12); color: var(--tfv-text-1); }
.tfv .tfv-x svg { width: 17px; height: 17px; }

/* ---------- cards / headings ---------- */
.tfv .tfv-card { background: var(--tfv-card); border: 1px solid var(--tfv-line); border-radius: 20px; padding: 1.25rem; box-shadow: var(--shadow-sm); margin-bottom: 1.25rem; min-width: 0; }
.tfv .tfv-h { display: flex; align-items: center; gap: 0.45rem; margin: 0 0 0.75rem; font-size: 1rem; font-weight: 700; color: var(--tfv-text-1); }
.tfv .tfv-h svg { width: 18px; height: 18px; color: var(--tfv-accent); flex-shrink: 0; }
.tfv .tfv-caption { display: inline-flex; align-items: center; gap: 0.35rem; margin: 0 0 0.45rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tfv-muted); }
.tfv .tfv-caption svg { width: 14px; height: 14px; }

/* ---------- buttons ---------- */
.tfv .tfv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; width: auto; min-height: 44px; padding: 0.6rem 1.1rem; margin: 0; border-radius: 12px; border: 1px solid transparent; font-size: 0.95rem; font-weight: 700; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background 0.15s, border-color 0.15s, color 0.15s; box-sizing: border-box; }
.tfv .tfv-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.tfv .tfv-go { background: var(--tfv-go); color: #fff; border-color: var(--tfv-go); }
.tfv .tfv-go:hover:not(:disabled) { background: var(--tfv-go-hover); color: #fff; }
.tfv .tfv-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.tfv .tfv-btn-lg { min-height: 50px; padding: 0.65rem 1.4rem; font-size: 1rem; }
.tfv .tfv-btn-sm { min-height: 36px; padding: 0.4rem 0.8rem; font-size: 0.85rem; border-radius: 10px; }
.tfv .tfv-btn-sm svg { width: 16px; height: 16px; }
.tfv .tfv-btn-ghost { background: var(--tfv-sunk); color: var(--tfv-text-2); border-color: var(--tfv-line); }
.tfv .tfv-btn-ghost:hover:not(:disabled) { color: var(--tfv-text-1); border-color: var(--tfv-accent-line); }
.tfv .tfv-text-btn { display: inline-flex; align-items: center; gap: 0.35rem; width: auto; padding: 0.35rem 0.55rem; margin: 0; border: none; border-radius: 8px; background: none; color: var(--tfv-accent-strong); font-size: 0.84rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
[data-theme="dark"] .tfv .tfv-text-btn { color: var(--tfv-accent); }
.tfv .tfv-text-btn:hover { background: var(--tfv-accent-soft); }
.tfv .tfv-text-btn svg { width: 15px; height: 15px; }
.tfv .tfv-seg-btn { display: inline-flex; align-items: center; gap: 0.4rem; width: auto; min-height: 36px; padding: 0.35rem 0.85rem; margin: 0; border-radius: 999px; border: 1px solid var(--tfv-line); background: var(--tfv-card); color: var(--tfv-text-2); font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.tfv .tfv-seg-btn svg { width: 15px; height: 15px; color: var(--tfv-accent); }
.tfv .tfv-seg-btn:hover { border-color: var(--tfv-accent-line); color: var(--tfv-text-1); }
.tfv .tfv-chip { display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; width: auto; min-height: 34px; padding: 0.3rem 0.55rem; margin: 0; border-radius: 9px; border: 1px solid var(--tfv-line); background: var(--tfv-card); color: var(--tfv-text-2); font-size: 0.8rem; font-weight: 700; cursor: pointer; min-width: 0; white-space: nowrap; box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; }
.tfv .tfv-chip:hover { border-color: var(--tfv-accent-line); }
.tfv .tfv-chip.is-active { border-color: var(--tfv-accent); background: var(--tfv-accent-soft); color: var(--tfv-accent-strong); }
[data-theme="dark"] .tfv .tfv-chip.is-active { color: var(--tfv-accent); }
.tfv .tfv-chip svg { width: 15px; height: 15px; flex-shrink: 0; }
.tfv .tfv-swatch { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; border: 1px solid var(--tfv-line); background-size: 6px 6px; }
.tfv .tfv-chip-color input[type="color"] { width: 18px; height: 18px; padding: 0; margin: 0; border: 1px solid var(--tfv-line); border-radius: 4px; background: none; cursor: pointer; }
.tfv .tfv-quick { display: grid; gap: 0.35rem; }
.tfv .tfv-quick > * { min-width: 0; }
.tfv .tfv-quick-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tfv .tfv-quick-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tfv .tfv-quick-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tfv .tfv-quick-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tfv .tfv-tag { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.05rem 0.45rem; border-radius: 999px; background: var(--tfv-sunk); border: 1px solid var(--tfv-line); font-size: 0.72rem; font-weight: 700; color: var(--tfv-text-2); white-space: nowrap; }
.tfv .tfv-input { height: 36px; padding: 0 0.6rem; margin: 0; border-radius: 9px; border: 1px solid var(--tfv-line); background: var(--input-bg, #fff); color: var(--tfv-text-1); font: 0.85rem var(--tfv-mono); box-sizing: border-box; min-width: 0; }
.tfv .tfv-input:focus { outline: none; border-color: var(--tfv-accent); box-shadow: 0 0 0 3px var(--tfv-accent-soft); }

/* ---------- upload ---------- */
.tfv .tfv-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem; text-align: center; min-height: 190px; padding: 1.5rem 1.25rem; border-radius: 16px; border: 2px dashed var(--tfv-accent-line); background: var(--tfv-accent-soft); cursor: pointer; color: var(--tfv-muted); font-size: 0.86rem; line-height: 1.5; transition: border-color 0.15s, background 0.15s; box-sizing: border-box; margin: 0; }
.tfv .tfv-drop:hover, .tfv .tfv-drop.is-drag { border-color: var(--tfv-accent); background: rgba(51, 153, 204, 0.14); }
.tfv .tfv-drop:focus-within { outline: 3px solid var(--tfv-accent-soft); }
.tfv .tfv-drop strong { font-size: 1.08rem; color: var(--tfv-text-1); }
.tfv .tfv-drop-link { color: var(--tfv-accent-strong); text-decoration: underline; text-underline-offset: 3px; }
[data-theme="dark"] .tfv .tfv-drop-link { color: var(--tfv-accent); }
.tfv .tfv-drop-icon { width: 58px; height: 58px; border-radius: 16px; display: flex; align-items: center; justify-content: center; margin-bottom: 0.35rem; background: var(--tfv-card); color: var(--tfv-accent); border: 1px solid var(--tfv-line); }
.tfv .tfv-drop-icon svg { width: 28px; height: 28px; }
.tfv .tfv-badges-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem; margin-top: 0.35rem; }
.tfv .tfv-fmt { display: inline-flex; padding: 0.1rem 0.5rem; border-radius: 6px; background: var(--tfv-card); border: 1px solid var(--tfv-line); font: 700 0.72rem var(--tfv-mono); color: var(--tfv-text-2); }
.tfv .tfv-samples { margin-top: 1rem; }
.tfv .tfv-sample-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tfv .tfv-under { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.6rem; margin-top: 1rem; }
.tfv .tfv-pill { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.22rem 0.65rem; border-radius: 999px; background: var(--tfv-sunk); border: 1px solid var(--tfv-line); font-size: 0.78rem; font-weight: 600; color: var(--tfv-text-2); }
.tfv .tfv-pill svg { width: 14px; height: 14px; color: var(--tfv-accent); }
.tfv .tfv-recent { margin-top: 1rem; padding-top: 0.85rem; border-top: 1px solid var(--tfv-line); }
.tfv .tfv-recent-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.tfv .tfv-recent-head .tfv-caption { margin: 0; }
.tfv .tfv-recent-list { list-style: none; margin: 0.4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; }
.tfv .tfv-recent-list button { display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; width: 100%; padding: 0.5rem 0.7rem; margin: 0; border-radius: 10px; border: 1px solid var(--tfv-line); background: var(--tfv-sunk); cursor: pointer; text-align: left; min-width: 0; }
.tfv .tfv-recent-list button:hover { border-color: var(--tfv-accent-line); }
.tfv .tfv-recent-name { font-size: 0.85rem; font-weight: 700; color: var(--tfv-text-1); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tfv .tfv-recent-meta { font-size: 0.74rem; color: var(--tfv-muted); }

/* drop overlay */
.tfv .tfv-dropover { position: fixed; inset: 0; z-index: 10004; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, 0.45); pointer-events: none; }
.tfv .tfv-dropover > div { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; padding: 2rem 2.5rem; border-radius: 20px; border: 2px dashed var(--tfv-accent); background: var(--tfv-card); color: var(--tfv-muted); text-align: center; }
.tfv .tfv-dropover svg { width: 40px; height: 40px; color: var(--tfv-accent); }
.tfv .tfv-dropover strong { font-size: 1.2rem; color: var(--tfv-text-1); }

/* ---------- busy (logo loader) ---------- */
.tfv .tfv-prog { display: flex; align-items: center; gap: 0.9rem; padding: 1rem 1.1rem; }
.tfv .tfv-prog-text { font-size: 0.92rem; color: var(--tfv-text-2); min-width: 0; overflow-wrap: anywhere; flex: 1; }
.tfv .tfv-prog-bar { height: 6px; border-radius: 99px; background: var(--tfv-sunk); overflow: hidden; margin-top: 0.4rem; }
.tfv .tfv-prog-bar > span { display: block; height: 100%; width: 0; background: var(--tfv-accent); transition: width 0.2s; }
.tfv .tfv-loader { display: block; width: 40px; height: 40px; flex-shrink: 0; overflow: visible; --cico-outer: #f2534e; --cico-outer-soft: #f8d3d1; --cico-mid: #31ae77; --cico-mid-soft: #d0e7dd; --cico-inner: #2b9edb; }
[data-theme="dark"] .tfv .tfv-loader { --cico-outer-soft: rgba(242, 83, 78, 0.22); --cico-mid-soft: rgba(49, 174, 119, 0.22); }
.tfv .tfv-loader circle { fill: none; stroke-width: 72; transform-box: fill-box; transform-origin: center; }
.tfv .tfv-loader .bp { stroke: var(--cico-outer-soft); }
.tfv .tfv-loader .gp { stroke: var(--cico-mid-soft); }
.tfv .tfv-loader .b { stroke: var(--cico-outer); stroke-linecap: round; stroke-dasharray: 35.3 100; animation: tfvSpinL 1.3s linear infinite; }
.tfv .tfv-loader .g { stroke: var(--cico-mid); stroke-linecap: round; stroke-dasharray: 75.8 100; animation: tfvSpinR 2.1s linear infinite; }
.tfv .tfv-loader .r { stroke: var(--cico-inner); animation: tfvBreathe 1.3s ease-in-out infinite; }
@keyframes tfvSpinL { from { transform: rotate(117deg); } to { transform: rotate(-243deg); } }
@keyframes tfvSpinR { from { transform: rotate(36deg); } to { transform: rotate(396deg); } }
@keyframes tfvBreathe { 50% { transform: scale(0.9); } }
@media (prefers-reduced-motion: reduce) {
    .tfv .tfv-loader .b { animation-duration: 4s; }
    .tfv .tfv-loader .g { animation-duration: 6s; }
    .tfv .tfv-loader .r { animation: none; }
}

/* ---------- file strip ---------- */
.tfv .tfv-files { display: flex; align-items: stretch; gap: 0.45rem; flex-wrap: wrap; margin: 0 0 1rem; padding-bottom: 0.85rem; border-bottom: 1px solid var(--tfv-line); }
.tfv .tfv-fcard { display: flex; align-items: center; min-width: 0; max-width: 260px; border-radius: 12px; border: 1px solid var(--tfv-line); background: var(--tfv-sunk); }
.tfv .tfv-fcard.is-active { border-color: var(--tfv-accent); background: var(--tfv-accent-soft); }
.tfv .tfv-fcard-main { display: flex; align-items: center; gap: 0.55rem; min-width: 0; width: auto; padding: 0.4rem 0.35rem 0.4rem 0.5rem; margin: 0; border: none; background: none; cursor: pointer; text-align: left; color: var(--tfv-text-2); }
.tfv .tfv-fcard-thumb { width: 32px; height: 32px; flex-shrink: 0; border-radius: 6px; object-fit: cover; background: var(--tfv-card); display: flex; align-items: center; justify-content: center; color: var(--tfv-accent); overflow: hidden; }
.tfv .tfv-fcard-thumb svg { width: 18px; height: 18px; }
.tfv .tfv-fcard-text { display: flex; flex-direction: column; min-width: 0; }
.tfv .tfv-fcard-text strong { font-size: 0.84rem; color: var(--tfv-text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tfv .tfv-fcard-text span { font-size: 0.72rem; color: var(--tfv-muted); white-space: nowrap; }
.tfv .tfv-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background: var(--tfv-ok); }
.tfv .tfv-dot.is-warn, .tfv .tfv-dot.is-medium { background: #d97706; }
.tfv .tfv-dot.is-fail, .tfv .tfv-dot.is-high { background: #e64e4e; }
.tfv .tfv-fcard-x { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; margin: 0 0.25rem 0 0; border: none; border-radius: 7px; background: none; color: var(--tfv-muted); cursor: pointer; flex-shrink: 0; }
.tfv .tfv-fcard-x:hover { background: rgba(100, 116, 139, 0.14); color: var(--tfv-text-1); }
.tfv .tfv-fcard-x svg { width: 15px; height: 15px; }
.tfv .tfv-fcard-add { display: inline-flex; align-items: center; gap: 0.3rem; width: auto; padding: 0.4rem 0.8rem; margin: 0; border-radius: 12px; border: 1px dashed var(--tfv-line); background: none; color: var(--tfv-accent-strong); font-size: 0.82rem; font-weight: 600; cursor: pointer; }
[data-theme="dark"] .tfv .tfv-fcard-add { color: var(--tfv-accent); }
.tfv .tfv-fcard-add:hover { border-style: solid; border-color: var(--tfv-accent); background: var(--tfv-accent-soft); }
.tfv .tfv-fcard-add svg { width: 15px; height: 15px; }

/* ---------- file head ---------- */
.tfv .tfv-filehead { display: flex; align-items: center; gap: 0.85rem; flex-wrap: wrap; }
.tfv .tfv-thumb-wrap { width: 60px; height: 60px; border-radius: 14px; border: 1px solid var(--tfv-line); display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; background: var(--tfv-sunk); color: var(--tfv-accent); }
.tfv .tfv-thumb-wrap canvas, .tfv .tfv-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tfv .tfv-thumb-wrap svg { width: 26px; height: 26px; }
.tfv .tfv-filetext { flex: 1 1 220px; min-width: 0; }
.tfv .tfv-filetext strong { display: block; font-size: 1.05rem; color: var(--tfv-text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tfv .tfv-filetext span { display: block; font-size: 0.82rem; color: var(--tfv-muted); overflow-wrap: anywhere; }
.tfv .tfv-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tfv .tfv-badge { display: inline-flex; align-items: center; gap: 0.35rem; width: auto; padding: 0.28rem 0.7rem; margin: 0; border-radius: 999px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; border: 1px solid var(--tfv-accent-line); background: var(--tfv-accent-soft); color: var(--tfv-accent-strong); }
[data-theme="dark"] .tfv .tfv-badge { color: var(--tfv-accent); }
.tfv .tfv-badge svg { width: 15px; height: 15px; }
.tfv .tfv-badge.is-pass, .tfv .tfv-badge.is-low { background: var(--tfv-ok-soft); border-color: var(--tfv-ok-line); color: var(--tfv-ok); }
.tfv .tfv-badge.is-warn, .tfv .tfv-badge.is-medium { background: var(--tfv-warn-soft); border-color: var(--tfv-warn-line); color: var(--tfv-warn); }
.tfv .tfv-badge.is-fail, .tfv .tfv-badge.is-high { background: var(--tfv-red-soft); border-color: var(--tfv-red-line); color: var(--tfv-red); }
.tfv button.tfv-badge { cursor: pointer; }
.tfv .tfv-stats { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.8rem; }
.tfv .tfv-stat { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.22rem 0.6rem; border-radius: 999px; background: var(--tfv-sunk); border: 1px solid var(--tfv-line); font-size: 0.78rem; color: var(--tfv-text-2); max-width: 100%; box-sizing: border-box; }
.tfv .tfv-stat svg { width: 14px; height: 14px; color: var(--tfv-accent); flex-shrink: 0; }
.tfv .tfv-stat strong { color: var(--tfv-text-1); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- toolbar / segs ---------- */
.tfv .tfv-toolbar { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; }
.tfv .tfv-toolbar .tfv-optsbtn { margin-left: auto; }
.tfv .tfv-segs { display: inline-flex; flex-wrap: wrap; padding: 0.2rem; gap: 0.2rem; border-radius: 10px; background: var(--tfv-sunk); border: 1px solid var(--tfv-line); max-width: 100%; box-sizing: border-box; }
.tfv .tfv-segs button { display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; width: auto; min-height: 34px; padding: 0.2rem 0.7rem; margin: 0; border: none; border-radius: 8px; background: none; color: var(--tfv-muted); font-size: 0.84rem; font-weight: 700; cursor: pointer; min-width: 0; white-space: nowrap; }
.tfv .tfv-segs button svg { width: 16px; height: 16px; flex-shrink: 0; }
.tfv .tfv-segs button:hover { color: var(--tfv-text-1); }
.tfv .tfv-segs button.is-active { background: var(--tfv-card); color: var(--tfv-accent-strong); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
[data-theme="dark"] .tfv .tfv-segs button.is-active { color: var(--tfv-accent); background: #26334a; }
.tfv .tfv-segs-sm button { min-height: 30px; padding: 0.15rem 0.55rem; font-size: 0.8rem; }
.tfv .tfv-segs .tfv-count { font-size: 0.7rem; font-weight: 800; padding: 0 0.35rem; border-radius: 99px; background: var(--tfv-accent-soft); color: var(--tfv-accent-strong); }

/* ---------- options (collapsed rows) ---------- */
.tfv .tfv-adv { border: 1px solid var(--tfv-line); border-radius: 12px; overflow: hidden; background: var(--tfv-card); margin-top: 0.75rem; }
.tfv .tfv-adv-row + .tfv-adv-row { border-top: 1px solid var(--tfv-line); }
.tfv .tfv-adv-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; width: 100%; min-height: 52px; box-sizing: border-box; padding: 0.55rem 1rem; margin: 0; border: none; background: none; cursor: pointer; text-align: left; color: var(--tfv-text-1); font-weight: 400; }
.tfv .tfv-adv-left { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.tfv .tfv-adv-left > svg { width: 18px; height: 18px; color: var(--tfv-accent); flex-shrink: 0; }
.tfv .tfv-adv-text { display: flex; flex-direction: column; min-width: 0; }
.tfv .tfv-adv-title { font-size: 0.9rem; font-weight: 700; }
.tfv .tfv-adv-hint { font-size: 0.76rem; color: var(--tfv-muted); line-height: 1.35; }
.tfv .tfv-adv-right { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.tfv .tfv-adv-value { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0.2rem 0.55rem; border-radius: 999px; background: var(--tfv-accent-soft); color: var(--tfv-accent-strong); font-size: 0.76rem; font-weight: 700; }
[data-theme="dark"] .tfv .tfv-adv-value { color: var(--tfv-accent); }
.tfv .tfv-chevron { width: 17px; height: 17px; color: var(--tfv-muted); transition: transform 0.2s; }
.tfv .tfv-adv-row.open .tfv-chevron { transform: rotate(180deg); }
.tfv .tfv-adv-row.open .tfv-adv-head, .tfv .tfv-adv-row.open .tfv-adv-body { background: var(--tfv-open); }
.tfv .tfv-adv-body { padding: 0.2rem 1rem 1rem; }
.tfv .tfv-switch-text { font-size: 0.74rem; font-weight: 800; color: var(--tfv-muted); min-width: 26px; text-align: right; }
/* switch - beats the global .tool-container checkbox rules */
.tool-container.tfv input[type="checkbox"].tfv-switch {
    -webkit-appearance: none !important; appearance: none !important; position: relative; flex-shrink: 0;
    width: 40px !important; height: 22px !important; margin: 0 !important; padding: 0 !important;
    border: none !important; border-radius: 999px !important; background: #cbd5e1 !important; box-shadow: none !important; cursor: pointer; transition: background 0.2s;
}
[data-theme="dark"] .tool-container.tfv input[type="checkbox"].tfv-switch { background: #475569 !important; }
.tool-container.tfv input[type="checkbox"].tfv-switch::after, .tool-container.tfv input[type="checkbox"].tfv-switch:checked::after {
    content: '' !important; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
    background: #fff; transform: none !important; transition: left 0.2s; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); font-size: 0; line-height: 0; border: none;
}
.tool-container.tfv input[type="checkbox"].tfv-switch:checked { background: var(--tfv-go) !important; }
.tool-container.tfv input[type="checkbox"].tfv-switch:checked::after { left: 21px; }
.tool-container.tfv input[type="checkbox"].tfv-switch:focus-visible { outline: 3px solid var(--tfv-accent-line); outline-offset: 2px; }
.tool-container.tfv input[type="checkbox"].tfv-switch:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- panels ---------- */
.tfv .tfv-panels { position: relative; margin-top: 0.85rem; border: 1px solid var(--tfv-line); border-radius: 14px; background: var(--tfv-card); padding: 1rem; min-width: 0; }
.tfv .tfv-panels.is-full { position: fixed; inset: 10px; z-index: 10000; margin: 0; overflow: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); }
body.tfv-noscroll { overflow: hidden; }
.tfv .tfv-full-btn { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; margin: 0; border-radius: 8px; border: 1px solid var(--tfv-line); background: var(--tfv-card); color: var(--tfv-muted); cursor: pointer; z-index: 3; }
.tfv .tfv-full-btn:hover { color: var(--tfv-text-1); border-color: var(--tfv-accent-line); }
.tfv .tfv-full-btn svg { width: 16px; height: 16px; }
.tfv .tfv-pane { min-width: 0; }

/* ---------- image stage (zoom / pan) ---------- */
.tfv .tfv-stagebar { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.6rem; padding-right: 2.4rem; }
.tfv .tfv-zoomgrp { display: inline-flex; align-items: center; gap: 0.2rem; padding: 0.2rem; border-radius: 10px; background: var(--tfv-sunk); border: 1px solid var(--tfv-line); }
.tfv .tfv-ibtn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; margin: 0; border: none; border-radius: 8px; background: none; color: var(--tfv-text-2); cursor: pointer; flex-shrink: 0; }
.tfv .tfv-ibtn:hover { background: var(--tfv-card); color: var(--tfv-text-1); }
.tfv .tfv-ibtn.is-active { background: var(--tfv-card); color: var(--tfv-accent-strong); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
[data-theme="dark"] .tfv .tfv-ibtn.is-active { color: var(--tfv-accent); background: #26334a; }
.tfv .tfv-ibtn svg { width: 17px; height: 17px; }
.tfv .tfv-ibtn:disabled { opacity: 0.4; cursor: not-allowed; }
.tfv .tfv-zoomval { min-width: 3.6em; text-align: center; font: 700 0.8rem var(--tfv-mono); color: var(--tfv-text-2); background: none; border: none; cursor: pointer; padding: 0.3rem 0.2rem; margin: 0; }
.tfv .tfv-stage { position: relative; height: 560px; max-height: 70vh; min-height: 280px; overflow: hidden; border-radius: 12px; border: 1px solid var(--tfv-line); touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.tfv .tfv-stage.is-grab { cursor: grabbing; }
.tfv .tfv-stage.is-pick { cursor: crosshair; }
.tfv .tfv-stage canvas { position: absolute; left: 0; top: 0; display: block; }
.tfv .tfv-panels.is-full .tfv-stage { height: calc(100vh - 210px); max-height: none; }
.tfv .tfv-stage-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; padding: 1rem; text-align: center; color: var(--tfv-muted); font-size: 0.9rem; pointer-events: none; }
.tfv .tfv-stage-msg svg { width: 30px; height: 30px; color: var(--tfv-accent); }
.tfv .tfv-readout { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.55rem; min-height: 36px; font-size: 0.82rem; color: var(--tfv-text-2); }
.tfv .tfv-readout .tfv-mono { font-size: 0.8rem; }
.tfv .tfv-readout strong { color: var(--tfv-text-1); }
.tfv .tfv-swatch-big { width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--tfv-line); overflow: hidden; flex-shrink: 0; background-color: #fff; background-image: linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(-45deg, transparent 75%, #ccc 75%); background-size: 8px 8px; background-position: 0 0, 0 4px, 4px -4px, -4px 0; }
.tfv .tfv-swatch-big span { display: block; width: 100%; height: 100%; }
.tfv .tfv-hint { font-size: 0.78rem; color: var(--tfv-muted); margin-left: auto; }

/* ---------- tag tables ---------- */
.tfv .tfv-tagbar { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; padding-right: 2.4rem; margin-bottom: 0.6rem; }
.tfv .tfv-search { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 0.3rem; height: 38px; padding: 0 0.5rem 0 0.7rem; border-radius: 10px; border: 1px solid var(--tfv-line); background: var(--input-bg, #fff); box-sizing: border-box; }
.tfv .tfv-search:focus-within { border-color: var(--tfv-accent); box-shadow: 0 0 0 3px var(--tfv-accent-soft); }
.tfv .tfv-search > svg { width: 16px; height: 16px; color: var(--tfv-muted); flex-shrink: 0; }
.tfv .tfv-search input { flex: 1; min-width: 0; width: auto; height: 100%; border: none; background: none; outline: none; box-shadow: none; color: var(--tfv-text-1); font-size: 0.86rem; padding: 0; margin: 0; }
.tfv .tfv-search-count { font-size: 0.74rem; color: var(--tfv-muted); white-space: nowrap; }
.tfv .tfv-groups { display: grid; gap: 0.8rem; }
.tfv .tfv-group { border: 1px solid var(--tfv-line); border-radius: 12px; overflow: hidden; min-width: 0; }
.tfv .tfv-group-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; width: 100%; padding: 0.55rem 0.8rem; margin: 0; border: none; background: var(--tfv-sunk); cursor: pointer; text-align: left; color: var(--tfv-text-1); font-size: 0.88rem; font-weight: 700; }
.tfv .tfv-group-head span { display: inline-flex; align-items: center; gap: 0.4rem; min-width: 0; }
.tfv .tfv-group-head svg { width: 16px; height: 16px; color: var(--tfv-accent); flex-shrink: 0; }
.tfv .tfv-group-head .tfv-chevron { color: var(--tfv-muted); }
.tfv .tfv-group.is-closed .tfv-chevron { transform: rotate(-90deg); }
.tfv .tfv-group.is-closed .tfv-tbl-wrap { display: none; }
.tfv .tfv-tbl-wrap { overflow-x: auto; }
.tfv .tfv-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; margin: 0; table-layout: fixed; }
.tfv .tfv-table th, .tfv .tfv-table td { padding: 0.42rem 0.7rem; text-align: left; border-top: 1px solid var(--tfv-line); color: var(--tfv-text-2); vertical-align: top; overflow-wrap: anywhere; word-break: break-word; }
.tfv .tfv-table th { width: 34%; color: var(--tfv-text-1); font-weight: 600; }
.tfv .tfv-table th small { display: block; font: 500 0.7rem var(--tfv-mono); color: var(--tfv-muted); }
.tfv .tfv-table td { font-variant-numeric: tabular-nums; white-space: pre-wrap; }
.tfv .tfv-table tr.is-hit th, .tfv .tfv-table tr.is-hit td { background: var(--tfv-accent-soft); }
.tfv .tfv-table td.is-bad { color: var(--tfv-red); }
.tfv .tfv-table tr.is-sens th::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #e64e4e; margin-left: 0.4rem; vertical-align: middle; }
.tfv .tfv-tables-x .tfv-table { table-layout: auto; }
.tfv .tfv-tables-x .tfv-table th, .tfv .tfv-tables-x .tfv-table td { white-space: nowrap; }
.tfv .tfv-kvgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 0.6rem; }
.tfv .tfv-kv { padding: 0.65rem 0.8rem; border-radius: 12px; border: 1px solid var(--tfv-line); background: var(--tfv-open); min-width: 0; }
.tfv .tfv-kv span { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--tfv-muted); }
.tfv .tfv-kv strong { display: block; margin-top: 0.15rem; font-size: 0.95rem; color: var(--tfv-text-1); overflow-wrap: anywhere; }
.tfv .tfv-kv em { display: block; font-style: normal; font-size: 0.78rem; color: var(--tfv-muted); margin-top: 0.1rem; overflow-wrap: anywhere; }

/* ---------- structure + hex ---------- */
.tfv .tfv-struct { list-style: none; margin: 0; padding: 0; border: 1px solid var(--tfv-line); border-radius: 12px; overflow: hidden; }
.tfv .tfv-struct li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.6rem; align-items: center; padding: 0.45rem 0.75rem; border-top: 1px solid var(--tfv-line); font-size: 0.83rem; color: var(--tfv-text-2); cursor: pointer; }
.tfv .tfv-struct li:first-child { border-top: none; }
.tfv .tfv-struct li:hover, .tfv .tfv-struct li:focus-visible { background: var(--tfv-accent-soft); }
.tfv .tfv-struct .tfv-sname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tfv-text-1); font-weight: 600; }
.tfv .tfv-struct .tfv-sname em { font-style: normal; font-weight: 400; color: var(--tfv-muted); }
.tfv .tfv-struct .tfv-soff, .tfv .tfv-struct .tfv-slen { font: 0.76rem var(--tfv-mono); color: var(--tfv-muted); white-space: nowrap; }
.tfv .tfv-hexbar { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; padding-right: 2.4rem; margin-bottom: 0.6rem; }
.tfv .tfv-jump { display: flex; gap: 0.3rem; }
.tfv .tfv-jump .tfv-input { width: 110px; }
.tfv .tfv-hexmeta { font-size: 0.76rem; color: var(--tfv-muted); }
.tfv .tfv-hex { height: 440px; overflow: auto; border-radius: 10px; border: 1px solid var(--tfv-line); background: var(--tfv-card); font: 0.8rem/20px var(--tfv-mono); color: var(--tfv-text-1); }
.tfv .tfv-panels.is-full .tfv-hex { height: calc(100vh - 180px); }
.tfv .tfv-hex-space { position: relative; min-width: 660px; }
.tfv .tfv-hex-win { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }
.tfv .tfv-hrow { display: flex; gap: 1rem; height: 20px; padding: 0 0.7rem; white-space: pre; }
.tfv .tfv-hoff { color: var(--tfv-muted); }
.tfv .tfv-hasc { color: var(--tfv-text-2); }
.tfv .tfv-hm { background: #facc15; color: #111; border-radius: 2px; }

/* ---------- next steps + action bar ---------- */
.tfv .tfv-next { margin-top: 1rem; }
.tfv .tfv-next-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tfv .tfv-next-link { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.4rem 0.8rem; border-radius: 999px; border: 1px solid var(--tfv-line); background: var(--tfv-card); color: var(--tfv-text-2); font-size: 0.82rem; font-weight: 600; text-decoration: none; }
.tfv .tfv-next-link svg { width: 14px; height: 14px; color: var(--tfv-accent); }
.tfv .tfv-next-link:hover { border-color: var(--tfv-accent-line); color: var(--tfv-text-1); }
.tfv .tfv-actionbar { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--tfv-line); }
.tfv .tfv-actionbar .tfv-btn-ghost { min-height: 40px; padding: 0.4rem 0.7rem; font-size: 0.86rem; gap: 0.35rem; }
.tfv .tfv-actionbar .tfv-btn-ghost svg { width: 16px; height: 16px; }
.tfv .tfv-actionbar .tfv-main-act { margin-left: auto; }
.tfv .tfv-menu-wrap { position: relative; }
.tfv .tfv-menu { position: absolute; bottom: calc(100% + 6px); right: 0; z-index: 20; min-width: 220px; padding: 0.35rem; border-radius: 12px; border: 1px solid var(--tfv-line); background: var(--tfv-card); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18); display: grid; gap: 0.15rem; }
.tfv .tfv-menu button { display: flex; align-items: center; gap: 0.5rem; width: 100%; padding: 0.5rem 0.65rem; margin: 0; border: none; border-radius: 8px; background: none; color: var(--tfv-text-1); font-size: 0.86rem; font-weight: 600; text-align: left; cursor: pointer; }
.tfv .tfv-menu button:hover { background: var(--tfv-accent-soft); }
.tfv .tfv-menu button svg { width: 16px; height: 16px; color: var(--tfv-accent); }
.tfv .tfv-menu button small { margin-left: auto; color: var(--tfv-muted); font-weight: 500; }

/* toast */
.tfv .tfv-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 10003; max-width: calc(100vw - 32px); box-sizing: border-box; padding: 0.55rem 1rem; border-radius: 10px; background: #1e293b; color: #fff; font-size: 0.86rem; font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); transition: opacity 0.25s; text-align: center; }
[data-theme="dark"] .tfv .tfv-toast { background: #e2e8f0; color: #0f172a; }
.tfv .tfv-toast.is-out { opacity: 0; }

/* ---------- content ---------- */
.tfv .tfv-info { margin-top: 2rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.tfv .tfv-info > * { min-width: 0; }
.tfv .tfv-info-card { background: var(--bg-elevated, #fff); border: 1px solid var(--tfv-line); border-radius: var(--radius-md, 12px); padding: 1.4rem 1.5rem; }
.tfv .tfv-info-card h2 { display: flex; align-items: center; gap: 0.55rem; margin: 0 0 0.9rem; font-size: 1.25rem; color: var(--tfv-text-1); }
.tfv .tfv-info-card h2 svg { width: 22px; height: 22px; color: var(--tfv-accent); flex-shrink: 0; }
.tfv .tfv-info-card h3 { margin: 1.2rem 0 0.5rem; font-size: 1.05rem; color: var(--tfv-text-1); }
.tfv .tfv-info-card p, .tfv .tfv-info-card li { color: var(--tfv-text-2); line-height: 1.65; font-size: 0.97rem; }
.tfv .tfv-info-card p { margin: 0.8rem 0 0; }
.tfv .tfv-info-card h2 + p { margin-top: 0; }
.tfv .tfv-info a { color: var(--tfv-accent-strong); font-weight: 500; }
[data-theme="dark"] .tfv .tfv-info a { color: var(--tfv-accent); }
.tfv .tfv-steps, .tfv .tfv-list { margin: 0; padding-left: 1.3rem; display: grid; gap: 0.45rem; }
.tfv .tfv-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.tfv .tfv-feature { padding: 0.9rem 1rem; border-radius: 12px; border: 1px solid var(--tfv-line); background: var(--tfv-open); min-width: 0; }
.tfv .tfv-feature > svg { width: 20px; height: 20px; color: var(--tfv-accent); }
.tfv .tfv-info-card .tfv-feature h3 { margin: 0.35rem 0 0.2rem; font-size: 0.95rem; }
.tfv .tfv-info-card .tfv-feature p { margin: 0; font-size: 0.88rem; line-height: 1.55; }
.tfv .tfv-info .tfv-table-wrap { overflow-x: auto; border: 1px solid var(--tfv-line); border-radius: 10px; margin-top: 0.8rem; }
.tfv .tfv-info .tfv-itable { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 0; }
.tfv .tfv-info .tfv-itable th, .tfv .tfv-info .tfv-itable td { padding: 0.55rem 0.75rem; text-align: left; border-bottom: 1px solid var(--tfv-line); color: var(--tfv-text-2); vertical-align: top; }
.tfv .tfv-info .tfv-itable th { background: var(--tfv-sunk); color: var(--tfv-text-1); font-weight: 700; font-size: 0.82rem; white-space: nowrap; }
.tfv .tfv-info .tfv-itable tr:last-child td { border-bottom: none; }
.tfv .tfv-info .tfv-itable td:first-child { font-weight: 700; color: var(--tfv-text-1); white-space: nowrap; }
.tfv .tfv-faq .faq-question svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- print ---------- */
@media print {
    .tfv .tfv-noprint { display: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 600px) {
    .tfv.tool-container { padding: 1.1rem 16px; }
    .tfv .tool-title { font-size: 1.55rem; }
    .tfv .tfv-title-icon { width: 46px; height: 46px; border-radius: 13px; }
    .tfv .tfv-title-icon svg { width: 25px; height: 25px; }
    .tfv .tool-description { font-size: 0.98rem; }
    .tfv .tfv-card { padding: 1rem; border-radius: 16px; }
    .tfv .tfv-drop { min-height: 160px; }
    .tfv .tfv-views { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
    .tfv .tfv-views button { padding: 0.2rem 0.25rem; font-size: 0.8rem; }
    .tfv .tfv-views button svg { display: none; }
    .tfv .tfv-toolbar .tfv-optsbtn { margin-left: 0; flex: 1; }
    .tfv .tfv-panels { padding: 0.7rem; }
    .tfv .tfv-adv-head { padding: 0.55rem 0.75rem; }
    .tfv .tfv-adv-hint { display: none; }
    .tfv .tfv-quick-4, .tfv .tfv-quick-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tfv .tfv-stage { height: 380px; }
    .tfv .tfv-hint { display: none; }
    .tfv .tfv-hex { height: 380px; font-size: 0.72rem; }
    .tfv .tfv-hrow { gap: 0.6rem; padding: 0 0.4rem; }
    .tfv .tfv-hex-space { min-width: 540px; }
    .tfv .tfv-actionbar .tfv-main-act { flex: 1 1 100%; margin-left: 0; order: -1; }
    .tfv .tfv-actionbar .tfv-btn-ghost { flex: 1 1 calc(50% - 0.5rem); padding: 0.45rem 0.4rem; }
    .tfv .tfv-actionbar .tfv-menu-wrap { flex: 1 1 calc(50% - 0.5rem); display: flex; }
    .tfv .tfv-actionbar .tfv-menu-wrap > .tfv-btn { flex: 1; }
    .tfv .tfv-recent-list { grid-template-columns: minmax(0, 1fr); }
    .tfv .tfv-features { grid-template-columns: minmax(0, 1fr); }
    .tfv .tfv-info-card { padding: 1.1rem; }
    .tfv .tfv-panels.is-full { inset: 0; border-radius: 0; }
    .tfv .tfv-fcard { max-width: 100%; }
    .tfv .tfv-table th { width: 40%; }
    .tfv .tfv-struct li { grid-template-columns: minmax(0, 1fr) auto; }
    .tfv .tfv-kvgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem; }
    .tfv .tfv-kv { padding: 0.55rem 0.65rem; }
    .tfv .tfv-kv strong { font-size: 0.88rem; }
    .tfv .tfv-kv em { font-size: 0.74rem; }
    .tfv .tfv-struct .tfv-slen { display: none; }
    .tfv .tfv-menu { right: auto; left: 0; }
}

/* ---------- TIFF: page strip ---------- */
.tfv .tfv-strip { display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.6rem 0.1rem 0.3rem; margin-top: 0.4rem; scrollbar-width: thin; }
.tfv .tfv-thumbbtn { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 0.25rem; width: 112px; padding: 0.35rem; margin: 0; border-radius: 10px; border: 2px solid var(--tfv-line); background: var(--tfv-sunk); cursor: pointer; color: var(--tfv-text-2); }
.tfv .tfv-thumbbtn:hover { border-color: var(--tfv-accent-line); }
.tfv .tfv-thumbbtn.is-active { border-color: var(--tfv-accent); background: var(--tfv-accent-soft); }
.tfv .tfv-thumbimg { display: flex; align-items: center; justify-content: center; width: 100%; height: 84px; border-radius: 6px; background: var(--tfv-card); overflow: hidden; color: var(--tfv-muted); }
.tfv .tfv-thumbimg canvas { max-width: 100%; max-height: 84px; display: block; }
.tfv .tfv-thumbimg svg { width: 20px; height: 20px; }
.tfv .tfv-thumbnum { font-size: 0.74rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.tfv .tfv-thumbnum em { font-style: normal; font-weight: 500; color: var(--tfv-muted); }
.tfv .tfv-stage { background: var(--tfv-stage); }
.tfv .tfv-stage-msg a { color: var(--tfv-accent-strong); font-weight: 600; pointer-events: auto; }
[data-theme="dark"] .tfv .tfv-stage-msg a { color: var(--tfv-accent); }
.tfv #tfvDetails .tfv-tbl-wrap { border: 1px solid var(--tfv-line); border-radius: 12px; }
.tfv #tfvDetails .tfv-table th { width: auto; background: var(--tfv-sunk); font-size: 0.78rem; border-top: none; }
.tfv #tfvDetails .tfv-table td, .tfv #tfvDetails .tfv-table th { white-space: nowrap; }
@media (max-width: 600px) {
    .tfv .tfv-thumbbtn { width: 92px; }
    .tfv .tfv-thumbimg { height: 68px; }
    .tfv .tfv-thumbimg canvas { max-height: 68px; }
}
.tfv .tfv-ramp-terrain { background: linear-gradient(90deg, #267349, #70a848, #e6d578, #a06e46, #fafafa); }
.tfv .tfv-ramp-heat { background: linear-gradient(90deg, #000, #c81e1e, #fac828, #ffffe6); }
.tfv .tfv-ramp-viridis { background: linear-gradient(90deg, #440154, #3b528b, #21918c, #5ec962, #fde725); }
