/* ============================================================
   ConvertICO EPS File Viewer - scoped under .epv / .epv-* (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"].
   ============================================================ */
.epv {
    --epv-accent: #3399cc;
    --epv-accent-strong: #237a9f;
    --epv-accent-soft: rgba(51, 153, 204, 0.09);
    --epv-accent-line: rgba(51, 153, 204, 0.45);
    --epv-go: #237a9f;
    --epv-go-hover: #1b6183;
    --epv-card: var(--bg-elevated, #fff);
    --epv-sunk: var(--card-tertiary, #f1f5f9);
    --epv-open: var(--card-secondary, #f8f9fa);
    --epv-line: var(--border-color, #e2e8f0);
    --epv-text-1: var(--text-primary, #1e293b);
    --epv-text-2: var(--text-secondary, #555);
    --epv-muted: var(--text-muted, #64748b);
    --epv-ok: #2f855a;
    --epv-ok-soft: rgba(51, 153, 102, 0.1);
    --epv-ok-line: rgba(51, 153, 102, 0.35);
    --epv-warn: #b45309;
    --epv-warn-soft: rgba(217, 119, 6, 0.08);
    --epv-warn-line: rgba(217, 119, 6, 0.35);
    --epv-red: #c23b3b;
    --epv-red-soft: rgba(230, 78, 78, 0.08);
    --epv-red-line: rgba(230, 78, 78, 0.35);
    --epv-checker: #e5e7eb;
    --epv-checker-bg: #fff;
    --epv-stage: #eef2f6;
    --epv-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
[data-theme="dark"] .epv {
    --epv-accent: #60a5fa;
    --epv-accent-strong: #93c5fd;
    --epv-accent-soft: rgba(96, 165, 250, 0.12);
    --epv-accent-line: rgba(96, 165, 250, 0.45);
    --epv-go: #2563eb;
    --epv-go-hover: #1d4ed8;
    --epv-sunk: #172033;
    --epv-open: #1a2438;
    --epv-ok: #4ade80;
    --epv-ok-soft: rgba(74, 222, 128, 0.1);
    --epv-ok-line: rgba(74, 222, 128, 0.35);
    --epv-warn: #fbbf24;
    --epv-warn-soft: rgba(251, 191, 36, 0.08);
    --epv-warn-line: rgba(251, 191, 36, 0.35);
    --epv-red: #f87171;
    --epv-red-soft: rgba(248, 113, 113, 0.1);
    --epv-red-line: rgba(248, 113, 113, 0.4);
    --epv-checker: #334155;
    --epv-checker-bg: #1e293b;
    --epv-stage: #0f1726;
}

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

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

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

/* ---------- error / notice ---------- */
.epv .epv-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(--epv-red-line); background: var(--epv-red-soft); color: var(--epv-text-1); }
.epv .epv-error > svg { width: 20px; height: 20px; color: #e64e4e; flex-shrink: 0; margin-top: 2px; }
.epv .epv-error > div { flex: 1; min-width: 0; }
.epv .epv-error p { margin: 0; font-size: 0.92rem; line-height: 1.55; overflow-wrap: anywhere; }
.epv .epv-error p + p { margin-top: 0.4rem; color: var(--epv-muted); font-size: 0.86rem; }
.epv .epv-error a { color: var(--epv-red); font-weight: 600; }
.epv .epv-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(--epv-accent-line); background: var(--epv-accent-soft); font-size: 0.88rem; line-height: 1.55; color: var(--epv-text-2); }
.epv .epv-note.is-warn { border-color: var(--epv-warn-line); background: var(--epv-warn-soft); }
.epv .epv-note > svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--epv-accent); }
.epv .epv-note.is-warn > svg { color: var(--epv-warn); }
.epv .epv-note a { color: var(--epv-accent-strong); font-weight: 600; }
[data-theme="dark"] .epv .epv-note a { color: var(--epv-accent); }
.epv .epv-note > div { min-width: 0; overflow-wrap: anywhere; }
.epv .epv-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(--epv-muted); cursor: pointer; padding: 0; margin: 0; }
.epv .epv-x:hover { background: rgba(100, 116, 139, 0.12); color: var(--epv-text-1); }
.epv .epv-x svg { width: 17px; height: 17px; }

/* ---------- cards / headings ---------- */
.epv .epv-card { background: var(--epv-card); border: 1px solid var(--epv-line); border-radius: 20px; padding: 1.25rem; box-shadow: var(--shadow-sm); margin-bottom: 1.25rem; min-width: 0; }
.epv .epv-h { display: flex; align-items: center; gap: 0.45rem; margin: 0 0 0.75rem; font-size: 1rem; font-weight: 700; color: var(--epv-text-1); }
.epv .epv-h svg { width: 18px; height: 18px; color: var(--epv-accent); flex-shrink: 0; }
.epv .epv-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(--epv-muted); }
.epv .epv-caption svg { width: 14px; height: 14px; }

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

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

/* drop overlay */
.epv .epv-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; }
.epv .epv-dropover > div { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; padding: 2rem 2.5rem; border-radius: 20px; border: 2px dashed var(--epv-accent); background: var(--epv-card); color: var(--epv-muted); text-align: center; }
.epv .epv-dropover svg { width: 40px; height: 40px; color: var(--epv-accent); }
.epv .epv-dropover strong { font-size: 1.2rem; color: var(--epv-text-1); }

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

/* ---------- file strip ---------- */
.epv .epv-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(--epv-line); }
.epv .epv-fcard { display: flex; align-items: center; min-width: 0; max-width: 260px; border-radius: 12px; border: 1px solid var(--epv-line); background: var(--epv-sunk); }
.epv .epv-fcard.is-active { border-color: var(--epv-accent); background: var(--epv-accent-soft); }
.epv .epv-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(--epv-text-2); }
.epv .epv-fcard-thumb { width: 32px; height: 32px; flex-shrink: 0; border-radius: 6px; object-fit: cover; background: var(--epv-card); display: flex; align-items: center; justify-content: center; color: var(--epv-accent); overflow: hidden; }
.epv .epv-fcard-thumb svg { width: 18px; height: 18px; }
.epv .epv-fcard-text { display: flex; flex-direction: column; min-width: 0; }
.epv .epv-fcard-text strong { font-size: 0.84rem; color: var(--epv-text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.epv .epv-fcard-text span { font-size: 0.72rem; color: var(--epv-muted); white-space: nowrap; }
.epv .epv-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background: var(--epv-ok); }
.epv .epv-dot.is-warn, .epv .epv-dot.is-medium { background: #d97706; }
.epv .epv-dot.is-fail, .epv .epv-dot.is-high { background: #e64e4e; }
.epv .epv-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(--epv-muted); cursor: pointer; flex-shrink: 0; }
.epv .epv-fcard-x:hover { background: rgba(100, 116, 139, 0.14); color: var(--epv-text-1); }
.epv .epv-fcard-x svg { width: 15px; height: 15px; }
.epv .epv-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(--epv-line); background: none; color: var(--epv-accent-strong); font-size: 0.82rem; font-weight: 600; cursor: pointer; }
[data-theme="dark"] .epv .epv-fcard-add { color: var(--epv-accent); }
.epv .epv-fcard-add:hover { border-style: solid; border-color: var(--epv-accent); background: var(--epv-accent-soft); }
.epv .epv-fcard-add svg { width: 15px; height: 15px; }

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

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

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

/* ---------- panels ---------- */
.epv .epv-panels { position: relative; margin-top: 0.85rem; border: 1px solid var(--epv-line); border-radius: 14px; background: var(--epv-card); padding: 1rem; min-width: 0; }
.epv .epv-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.epv-noscroll { overflow: hidden; }
.epv .epv-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(--epv-line); background: var(--epv-card); color: var(--epv-muted); cursor: pointer; z-index: 3; }
.epv .epv-full-btn:hover { color: var(--epv-text-1); border-color: var(--epv-accent-line); }
.epv .epv-full-btn svg { width: 16px; height: 16px; }
.epv .epv-pane { min-width: 0; }

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

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

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

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

/* toast */
.epv .epv-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"] .epv .epv-toast { background: #e2e8f0; color: #0f172a; }
.epv .epv-toast.is-out { opacity: 0; }

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

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

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

/* ============================================================
   EPS viewer additions (shared with the SVG viewer)
   ============================================================ */
.epv {
    --epv-t-tag: #1d6fa5; --epv-t-attr: #8a4baf; --epv-t-str: #2f7d4f; --epv-t-cm: #7c8797; --epv-t-pi: #a35d0b; --epv-t-ent: #c2410c; --epv-t-eq: #64748b; --epv-t-cd: #9a6b00;
    --epv-code-bg: #fbfcfe; --epv-gutter-bg: #f1f5f9;
}
[data-theme="dark"] .epv {
    --epv-t-tag: #7dd3fc; --epv-t-attr: #d8b4fe; --epv-t-str: #86efac; --epv-t-cm: #8b98ab; --epv-t-pi: #fdba74; --epv-t-ent: #fca5a5; --epv-t-eq: #94a3b8; --epv-t-cd: #fcd34d;
    --epv-code-bg: #0f1726; --epv-gutter-bg: #141e30;
}
.epv .epv-quick-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.epv .epv-quick-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.epv .epv-bg-gray { background: #9ca3af; }
.epv .epv-break { overflow-wrap: anywhere; word-break: break-all; }
.epv .epv-pad { padding: 0.8rem; margin: 0; }
.epv .epv-link { display: inline; width: auto; padding: 0; margin: 0; border: none; background: none; color: var(--epv-accent-strong); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; pointer-events: auto; }
[data-theme="dark"] .epv .epv-link { color: var(--epv-accent); }
.epv .epv-note.is-info > svg { color: var(--epv-accent); }
.epv .epv-note > span { min-width: 0; overflow-wrap: anywhere; }
.epv .epv-badge.is-ok { background: var(--epv-ok-soft); border-color: var(--epv-ok-line); color: var(--epv-ok); }
.epv .epv-badge.is-red { background: var(--epv-red-soft); border-color: var(--epv-red-line); color: var(--epv-red); }
.epv .epv-stat small { font-size: 0.72rem; color: var(--epv-muted); white-space: nowrap; }
.epv .epv-thumb-wrap img { object-fit: contain; }
.epv .epv-fcard-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.epv .epv-ibtn-sm { width: 26px; height: 26px; }
.epv .epv-ibtn-sm svg { width: 15px; height: 15px; }

/* paste box */
.epv .epv-paste { margin-top: 1rem; display: grid; gap: 0.5rem; }
.epv .epv-paste .epv-caption { margin: 0; }
.epv .epv-textarea { width: 100%; box-sizing: border-box; min-height: 120px; padding: 0.7rem 0.8rem; margin: 0; border-radius: 12px; border: 1px solid var(--epv-line); background: var(--input-bg, #fff); color: var(--epv-text-1); font: 0.84rem/1.5 var(--epv-mono); resize: vertical; }
.epv .epv-textarea:focus { outline: none; border-color: var(--epv-accent); box-shadow: 0 0 0 3px var(--epv-accent-soft); }
.epv .epv-paste-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }

/* code view */
.epv .epv-codebar { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; padding-right: 2.4rem; margin-bottom: 0.5rem; }
.epv .epv-codebar .epv-search { flex: 1 1 220px; }
.epv .epv-codeacts { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.epv .epv-codeacts .epv-btn.is-active { border-color: var(--epv-accent); color: var(--epv-accent-strong); background: var(--epv-accent-soft); }
.epv .epv-codeinfo { font-size: 0.78rem; color: var(--epv-muted); margin: 0 0 0.45rem; min-height: 1.2em; }
.epv .epv-code { position: relative; height: 520px; max-height: 70vh; overflow: auto; border-radius: 10px; border: 1px solid var(--epv-line); background: var(--epv-code-bg); font: 13px/20px var(--epv-mono); color: var(--epv-text-1); tab-size: 4; }
.epv .epv-panels.is-full .epv-code { height: calc(100vh - 200px); max-height: none; }
.epv .epv-code-space { position: relative; min-width: 100%; }
.epv .epv-code-win { position: absolute; left: 0; top: 0; min-width: 100%; will-change: transform; }
.epv .epv-cl { display: flex; height: 20px; white-space: pre; }
.epv .epv-cl.is-mark { background: var(--epv-red-soft); }
.epv .epv-ln { position: sticky; left: 0; z-index: 1; flex-shrink: 0; width: var(--epv-gutter, 4ch); padding-right: 0.7ch; text-align: right; color: var(--epv-muted); background: var(--epv-gutter-bg); user-select: none; -webkit-user-select: none; border-right: 1px solid var(--epv-line); }
.epv .epv-lc { padding: 0 1rem 0 0.7rem; }
.epv .epv-t-tag { color: var(--epv-t-tag); }
.epv .epv-t-attr { color: var(--epv-t-attr); }
.epv .epv-t-str { color: var(--epv-t-str); }
.epv .epv-t-cm { color: var(--epv-t-cm); font-style: italic; }
.epv .epv-t-pi { color: var(--epv-t-pi); }
.epv .epv-t-ent { color: var(--epv-t-ent); }
.epv .epv-t-eq { color: var(--epv-t-eq); }
.epv .epv-t-cd { color: var(--epv-t-cd); }
.epv .epv-code mark { background: #fde68a; color: inherit; border-radius: 2px; }
.epv .epv-code mark.is-cur { background: #f59e0b; color: #111; }
[data-theme="dark"] .epv .epv-code mark { background: rgba(250, 204, 21, 0.35); }
.epv .epv-more { font-style: normal; color: var(--epv-muted); }
.epv .epv-editbox { display: grid; gap: 0.5rem; }
.epv .epv-editarea { height: 480px; max-height: 70vh; min-height: 240px; white-space: pre; overflow: auto; }

/* details */
.epv #epvDetails { display: grid; gap: 0.8rem; padding-right: 2.4rem; }
.epv #epvGroups { display: grid; gap: 0.8rem; }
.epv .epv-group-static { cursor: default; }
.epv .epv-secbody { padding: 0.75rem 0.85rem; border-top: 1px solid var(--epv-line); }
.epv .epv-secbody > p { margin: 0.5rem 0 0; font-size: 0.86rem; color: var(--epv-text-2); }
.epv .epv-secbody > p:first-child { margin-top: 0; }
.epv .epv-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 0.4rem; }
.epv .epv-color { display: flex; align-items: center; gap: 0.5rem; width: 100%; min-width: 0; padding: 0.35rem 0.5rem; margin: 0; border-radius: 9px; border: 1px solid var(--epv-line); background: var(--epv-card); color: var(--epv-text-1); font-size: 0.8rem; cursor: pointer; text-align: left; }
.epv .epv-color:hover { border-color: var(--epv-accent-line); }
.epv .epv-color small { margin-left: auto; color: var(--epv-muted); font-size: 0.72rem; }
.epv .epv-cswatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, 0.15); flex-shrink: 0; }
.epv .epv-h4 { margin: 0.8rem 0 0.4rem; font-size: 0.86rem; color: var(--epv-text-1); }
.epv .epv-texts { display: flex; flex-wrap: wrap; gap: 0.35rem; max-height: 220px; overflow: auto; }
.epv .epv-texts span { padding: 0.2rem 0.55rem; border-radius: 8px; background: var(--epv-sunk); border: 1px solid var(--epv-line); font-size: 0.82rem; color: var(--epv-text-1); overflow-wrap: anywhere; max-width: 100%; box-sizing: border-box; }
.epv .epv-secbody .epv-list { font-size: 0.86rem; color: var(--epv-text-2); }
.epv .epv-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 0.5rem; }
.epv .epv-imgcard { display: flex; gap: 0.6rem; align-items: center; padding: 0.5rem; border-radius: 10px; border: 1px solid var(--epv-line); min-width: 0; }
.epv .epv-imgcard > div { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; font-size: 0.8rem; color: var(--epv-text-2); }
.epv .epv-imgcard strong { color: var(--epv-text-1); font-size: 0.85rem; }
.epv .epv-imgcard small { color: var(--epv-muted); }
.epv .epv-imgthumb { width: 64px; height: 64px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--epv-muted); border: 1px solid var(--epv-line); }
.epv .epv-imgthumb img { max-width: 100%; max-height: 100%; display: block; }
.epv .epv-imgthumb svg { width: 22px; height: 22px; }
.epv .epv-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.epv .epv-checks li { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.86rem; color: var(--epv-text-2); line-height: 1.5; }
.epv .epv-checks li > svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 2px; }
.epv .epv-checks li > span { min-width: 0; overflow-wrap: anywhere; }
.epv .epv-checks li.is-ok > svg { color: var(--epv-ok); }
.epv .epv-checks li.is-warn > svg { color: var(--epv-warn); }
.epv .epv-checks li.is-info > svg { color: var(--epv-accent); }

/* export */
.epv .epv-export { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; padding-right: 2.4rem; }
.epv .epv-exp-col { min-width: 0; display: grid; gap: 0.8rem; align-content: start; }
.epv .epv-exp-col .epv-h { margin: 0; }
.epv .epv-exp-col .epv-caption { display: flex; margin-bottom: 0.35rem; }
.epv .epv-fmtseg { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.epv .epv-snipseg { width: 100%; }
.epv .epv-wh { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; font-size: 0.82rem; color: var(--epv-text-2); }
.epv .epv-wh label { display: inline-flex; align-items: center; gap: 0.35rem; }
.epv .epv-wh .epv-input { width: 96px; }
.epv .epv-outdim { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; margin: 0.5rem 0 0; font-size: 0.84rem; color: var(--epv-text-2); }
.epv .epv-outdim svg { width: 15px; height: 15px; color: var(--epv-accent); }
.epv .epv-outdim strong { color: var(--epv-text-1); }
.epv .epv-bad { color: var(--epv-red); }
.epv .epv-range { width: 100%; accent-color: var(--epv-accent); margin: 0; }
.epv .epv-wide { width: 100%; }
.epv .epv-exp-col .epv-small { margin: 0; }
.epv .epv-quick .epv-chip input[type="checkbox"] { margin: 0; }
.epv .epv-snippet { margin: 0; max-height: 300px; min-height: 120px; overflow: auto; padding: 0.75rem 0.85rem; border-radius: 10px; border: 1px solid var(--epv-line); background: var(--epv-code-bg); color: var(--epv-text-1); font: 0.78rem/1.55 var(--epv-mono); white-space: pre-wrap; word-break: break-all; }
.epv .epv-snip-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }

@media (max-width: 860px) {
    .epv .epv-inspect, .epv .epv-export { grid-template-columns: minmax(0, 1fr); }
    .epv .epv-tree { height: 300px; }
    .epv .epv-insp-col { order: -1; }
}
@media (max-width: 600px) {
    .epv .epv-views button { font-size: 0.74rem; padding: 0.2rem 0.15rem; }
    .epv .epv-codebar, .epv .epv-inspect, .epv #epvDetails, .epv .epv-export { padding-right: 0; }
    .epv .epv-codebar { padding-top: 2.2rem; }
    .epv .epv-inspect, .epv #epvDetails, .epv .epv-export { padding-top: 2.2rem; }
    .epv .epv-code { height: 420px; font-size: 12px; }
    .epv .epv-quick-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .epv .epv-quick-7 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .epv .epv-bgseg { display: none; }
    .epv .epv-insp-stage { height: 280px; }
    .epv .epv-codeacts { width: 100%; }
    .epv .epv-codeacts .epv-btn { flex: 1; }
}


/* ---------- EPS specifics ---------- */
.epv { --epv-t-dsc: #a35d0b; --epv-t-name: #8a4baf; --epv-t-num: #1d6fa5; --epv-t-op: #0f766e; --epv-t-hex: #9a6b00; --epv-t-br: #64748b; }
[data-theme="dark"] .epv { --epv-t-dsc: #fdba74; --epv-t-name: #d8b4fe; --epv-t-num: #7dd3fc; --epv-t-op: #5eead4; --epv-t-hex: #fcd34d; --epv-t-br: #94a3b8; }
.epv .epv-t-dsc { color: var(--epv-t-dsc); font-weight: 600; }
.epv .epv-t-name { color: var(--epv-t-name); }
.epv .epv-t-num { color: var(--epv-t-num); }
.epv .epv-t-op { color: var(--epv-t-op); }
.epv .epv-t-hex { color: var(--epv-t-hex); }
.epv .epv-t-br { color: var(--epv-t-br); font-weight: 700; }
.epv .epv-stage { background: var(--epv-stage); }
.epv .epv-stage-msg { z-index: 3; pointer-events: auto; max-width: 560px; margin: 0 auto; line-height: 1.55; }
.epv .epv-stage-msg strong { color: var(--epv-text-1); }
.epv .epv-readout .epv-swatch { width: 16px; height: 16px; border-radius: 4px; }
.epv .epv-readout > svg { width: 15px; height: 15px; color: var(--epv-accent); }
.epv .epv-checkrow { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.epv .epv-ink { display: grid; gap: 0.35rem; max-width: 520px; }
.epv .epv-inkrow { display: grid; grid-template-columns: 70px minmax(0, 1fr) 60px; gap: 0.6rem; align-items: center; font-size: 0.84rem; color: var(--epv-text-2); }
.epv .epv-inkrow strong { text-align: right; color: var(--epv-text-1); font-variant-numeric: tabular-nums; }
.epv .epv-inkbar { height: 10px; border-radius: 99px; background: var(--epv-sunk); border: 1px solid var(--epv-line); overflow: hidden; }
.epv .epv-inkbar > span { display: block; height: 100%; }
.epv .epv-textout { margin: 0 0 0.4rem; max-height: 260px; overflow: auto; padding: 0.7rem 0.8rem; border-radius: 10px; border: 1px solid var(--epv-line); background: var(--epv-code-bg); font: 0.8rem/1.5 var(--epv-mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--epv-text-1); }
.epv .epv-extras { display: grid; gap: 0.4rem; justify-items: start; }
.epv .epv-extras .epv-btn { white-space: normal; text-align: left; }
.epv .epv-credit { margin: 0; font-size: 0.78rem; color: var(--epv-muted); text-align: center; }
.epv .epv-credit a { color: var(--epv-muted); }
.epv .epv-thumb-wrap img { object-fit: contain; }
.epv .epv-fcard-thumb img { width: 100%; height: 100%; object-fit: contain; }
.epv .epv-table td.is-bad { color: var(--epv-warn); }
@media (max-width: 600px) {
    .epv .epv-inkrow { grid-template-columns: 58px minmax(0, 1fr) 52px; }
    .epv #epvSrcSeg { width: 100%; }
}
