/* Marselius · Equivalencias (prefijo .eqv). Usa las variables de app.css. */
:root {
  --ill-bg: #14233a; --fig: #aab4c6; --fig-far: #7b879d; --fig-shirt: #eef2f8; --fig-shirt-far: #b4bdcf;
  --fig-shorts: #3a4560; --fig-shorts-far: #2b3550; --steel: #5d6e88; --pad: #445a7b; --gold: #c8a45d; --gold-dark: #a8884a;
  --ill-floor: #2b3d59; --cable: #8696ad; --band: #d0ad66; --ball: #50698f;
}
.eqv { display: flex; flex-direction: column; gap: 14px; color: var(--fg); font-family: var(--f-body); }
.eqv *, .eqv *::before, .eqv *::after { box-sizing: border-box; }
.eqv [hidden] { display: none !important; }
.eqv button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; -webkit-tap-highlight-color: transparent; }
.eqv-sec { display: flex; flex-direction: column; gap: 14px; }
.eqv-intro h2 { margin: 0 0 4px; font: 800 20px/1.2 var(--f-head); }
.eqv-intro p { margin: 0; color: var(--mu); font-size: 14px; line-height: 1.5; }

.eqv-search { position: relative; display: flex; align-items: center; background: var(--glass); border: 1px solid var(--line); border-radius: 16px; }
.eqv-search > svg, .eqv-sr-ico { position: absolute; left: 14px; width: 20px; height: 20px; color: var(--mu); pointer-events: none; display: flex; }
.eqv-sr-ico svg { width: 20px; height: 20px; }
.eqv-search input { flex: 1; min-width: 0; height: 48px; padding: 0 48px 0 44px; background: transparent; border: 0; outline: 0; color: var(--fg); font: 600 16px var(--f-body); -webkit-appearance: none; }
.eqv-search input::placeholder { color: var(--dim); }
.eqv-search:focus-within { border-color: var(--blue); }
.eqv-clear { position: absolute; right: 2px; width: 44px; height: 44px; font-size: 24px; color: var(--mu); }
.eqv-gres { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 6px); max-height: 320px; overflow-y: auto; background: var(--sheet); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 40px rgba(0,0,0,.55); }
.eqv-gres button { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px 14px; text-align: left; font-weight: 600; font-size: 14px; border-bottom: 1px solid var(--line); }
.eqv-gres button:last-child { border-bottom: 0; }
.eqv-gres .grp { color: var(--blue-soft); font-size: 12px; font-weight: 700; flex: none; }
.eqv .st { color: var(--mu); font-weight: 500; }

.eqv-chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(var(--gut-l) * -1) 0 calc(var(--gut-r) * -1); padding: 2px var(--gut-r) 4px var(--gut-l); scrollbar-width: none; }
.eqv-chips::-webkit-scrollbar { display: none; }
.eqv-chip { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,.08); font-weight: 700; font-size: 14px; white-space: nowrap; }
.eqv-chip .c { font: 700 12px var(--f-num); color: var(--mu); }
.eqv-chip[aria-pressed="true"] { background: var(--fg); color: var(--ink); }
.eqv-chip[aria-pressed="true"] .c { color: var(--ink); opacity: .6; }

.eqv-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.eqv-switch { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--mu); cursor: pointer; flex: 1 1 220px; }
.eqv-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.eqv-track { position: relative; flex: none; width: 46px; height: 28px; border-radius: 28px; background: rgba(255,255,255,.16); transition: background .2s; }
.eqv-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.eqv-switch input:checked + .eqv-track { background: var(--ok); }
.eqv-switch input:checked + .eqv-track::after { transform: translateX(18px); }
.eqv-switch input:focus-visible + .eqv-track { outline: 2px solid var(--blue); outline-offset: 2px; }
.eqv-count { font: 700 12px var(--f-num); color: var(--dim); }

.eqv-ghead { display: flex; align-items: center; gap: 10px; margin: 8px 0 10px; }
.eqv-ghead h3 { margin: 0; font: 800 17px var(--f-head); }
.eqv-ghead .rule { flex: 1; height: 1px; background: var(--line); }
.eqv-ghead .gc { font: 700 12px var(--f-num); color: var(--dim); }
.eqv-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 720px) { .eqv-grid { grid-template-columns: 1fr 1fr; } }
.eqv-ex { background: var(--glass); border: 1px solid var(--line); border-radius: 22px; padding: 12px; display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 12px; }
.eqv-ex.flash { animation: eqvflash 1.4s ease-out; }
@keyframes eqvflash { 0%, 40% { box-shadow: 0 0 0 3px var(--blue); } 100% { box-shadow: 0 0 0 3px transparent; } }
.eqv-ill { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: var(--ill-bg); padding: 0; }
.eqv-ill canvas, .eqv-thumb canvas, .eqv-vill canvas { display: block; width: 100%; height: 100%; }
.eqv-ill .zoom { position: absolute; right: 8px; bottom: 8px; width: 32px; height: 32px; border-radius: 50%; background: rgba(5,11,28,.65); display: grid; place-items: center; }
.eqv-ill .zoom svg { width: 16px; height: 16px; }
.eqv-ex-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.eqv-ex-top h4 { margin: 0; font: 800 17px/1.25 var(--f-head); }
.eqv-ex-label { font: 700 12px var(--f-body); letter-spacing: .04em; text-transform: uppercase; color: var(--blue-soft); }
.eqv-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.1); color: var(--mu); font-size: 12px; font-weight: 700; white-space: nowrap; }
.eqv-tag svg { width: 12px; height: 12px; }
.eqv-tag.home { background: rgba(63,210,143,.16); color: var(--ok); }
.eqv-alts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.eqv-alt { display: flex; gap: 10px; align-items: center; min-height: 64px; padding: 6px; border-radius: 14px; background: rgba(255,255,255,.04); }
.eqv-thumb { flex: none; width: 76px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--ill-bg); display: grid; place-items: center; padding: 0; color: var(--mu); font: 800 14px var(--f-num); }
.eqv-alt-main { min-width: 0; flex: 1; }
.eqv-alt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.eqv-alt-name { min-height: 28px; padding: 0; text-align: left; font-weight: 700; font-size: 14.5px; color: var(--fg); }
button.eqv-alt-name { color: var(--blue-soft); text-decoration: underline; text-decoration-color: rgba(159,192,255,.35); text-underline-offset: 3px; }
.eqv-alt-note { margin-top: 2px; color: var(--mu); font-size: 13px; line-height: 1.4; }
.eqv-tip { margin: 6px 0 0; color: var(--mu); font-size: 13px; text-align: center; }
.eqv-empty { grid-column: 1 / -1; padding: 22px 16px; text-align: center; color: var(--mu); background: var(--glass); border: 1px dashed var(--line); border-radius: 16px; font-size: 14px; }
.eqv-empty b { color: var(--fg); }

/* Visor */
.eqv-viewer { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px var(--gut-r) 16px var(--gut-l); background: rgba(2,6,16,.82); animation: eqvfade .2s; }
@keyframes eqvfade { from { opacity: 0; } }
.eqv-vbox { position: relative; width: 100%; max-width: 560px; max-height: 100%; overflow-y: auto; background: var(--sheet); border: 1px solid var(--line); border-radius: 24px; }
.eqv-vclose { position: absolute; z-index: 2; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 50%; background: rgba(5,11,28,.7); font-size: 26px; line-height: 1; }
.eqv-vill { aspect-ratio: 4 / 3; background: var(--ill-bg); }
.eqv-vbody { padding: 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.eqv-vbody h4 { margin: 0; font: 800 19px/1.25 var(--f-head); }
.eqv-vnote { margin: 0; color: var(--mu); font-size: 14px; line-height: 1.5; }
.eqv-primary { align-self: stretch; min-height: 48px; border-radius: 999px; font-weight: 800; font-size: 15px; color: var(--ink); background: linear-gradient(180deg, #fff, var(--silver)); }

/* Calculadora */
.eqv-calc { background: var(--glass); border: 1px solid var(--line); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 12px; }
.eqv-calc-label { font: 800 13px var(--f-head); letter-spacing: .05em; text-transform: uppercase; color: var(--blue-soft); }
.eqv-field { display: flex; flex-direction: column; gap: 6px; }
.eqv-field > span:first-child { font-size: 12px; font-weight: 700; color: var(--mu); }
.eqv-select select { width: 100%; height: 48px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.07); color: var(--fg); font: 600 15px var(--f-body); }
.eqv-select option { background: var(--sheet); color: var(--fg); }
.eqv-qty { display: flex; align-items: center; gap: 10px; }
.eqv-qty button { flex: none; width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.1); font-size: 26px; font-weight: 700; }
.eqv-qty button:active { transform: scale(.94); }
.eqv-qty-in { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px; height: 52px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.07); }
.eqv-qty-in input { width: 100px; min-width: 0; background: transparent; border: 0; outline: 0; text-align: right; color: var(--fg); font: 700 22px var(--f-num); -moz-appearance: textfield; }
.eqv-qty-in input::-webkit-outer-spin-button, .eqv-qty-in input::-webkit-inner-spin-button { -webkit-appearance: none; }
.eqv-qty-in span { color: var(--mu); font-weight: 700; }
.eqv-quick { display: flex; gap: 8px; flex-wrap: wrap; }
.eqv-quick button { min-height: 44px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,.08); font-weight: 700; font-size: 13px; }
.eqv-quick button[aria-pressed="true"], .eqv-seg button[aria-pressed="true"] { background: var(--fg); color: var(--ink); }
.eqv-basis { padding: 12px 14px; border-radius: 14px; background: rgba(79,141,255,.12); font-size: 14px; line-height: 1.5; font-family: var(--f-num); }
.eqv-basis .hl { color: var(--blue-soft); font-weight: 800; }
.eqv-basis .sm { color: var(--mu); font-size: 12.5px; }
.eqv-seg-wrap { display: flex; flex-direction: column; gap: 6px; }
.eqv-seg-wrap > span { font-size: 12px; font-weight: 700; color: var(--mu); }
.eqv-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255,255,255,.07); }
.eqv-seg button { min-height: 44px; border-radius: 11px; font-weight: 700; font-size: 13px; }

.eqv-eqhead h3 { margin: 6px 0 2px; font: 800 17px/1.3 var(--f-head); }
.eqv-eqhead p { margin: 0; color: var(--mu); font-size: 13px; }
.eqv-eqlist { display: flex; flex-direction: column; gap: 8px; }
.eqv-eq { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 14px; background: var(--glass); border: 1px solid var(--line); border-radius: 16px; }
.eqv-eq.off { opacity: .5; grid-template-columns: 1fr; }
.eqv-eq-name { font-weight: 700; font-size: 15px; }
.eqv-eq-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; font: 600 12px var(--f-num); color: var(--dim); }
.eqv-eq-meta .on { color: var(--blue-soft); font-weight: 800; }
.eqv-eq-r { text-align: right; }
.eqv-eq-g { font: 800 22px var(--f-num); }
.eqv-eq-g small { font-size: 13px; color: var(--mu); margin-left: 2px; }
.eqv-eq-house { font-size: 12px; color: var(--mu); }
.eqv-eq-note { grid-column: 1 / -1; font-size: 12.5px; color: var(--amber); }
.eqv-eq-use { grid-column: 1 / -1; min-height: 44px; border-radius: 12px; background: rgba(255,255,255,.07); color: var(--blue-soft); font-weight: 700; font-size: 13px; }
.eqv-table { background: var(--glass); border: 1px solid var(--line); border-radius: 16px; }
.eqv-table summary { min-height: 48px; padding: 12px 14px; font-weight: 700; font-size: 14px; cursor: pointer; }
.eqv-tscroll { overflow-x: auto; padding: 0 8px; }
.eqv-table table { border-collapse: collapse; width: 100%; min-width: 440px; font-size: 13px; }
.eqv-table th, .eqv-table td { padding: 8px 6px; text-align: right; border-top: 1px solid var(--line); font-family: var(--f-num); }
.eqv-table th:first-child, .eqv-table td:first-child { text-align: left; font-family: var(--f-body); }
.eqv-table th { color: var(--mu); font-weight: 700; }
.eqv-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 10px 14px 14px; color: var(--dim); font-size: 12px; }
.eqv-foot { margin: 0; color: var(--dim); font-size: 12px; line-height: 1.5; text-align: center; }
