/* FASE NUEVE · PC BUILDER 3D (v02). Mobile-first (desde 320 px), áreas táctiles de 44 px, tokens de la
   tienda: el acento sale de --f9-accent-rgb (naranja, azul, violeta… según «Personalizar») y respeta el
   esquema claro/oscuro (html[data-resolved-scheme]). */

.pcb-body {
  --pcb-accent: rgb(var(--f9-accent-rgb, 255, 90, 31));
  --pcb-accent-soft: rgba(var(--f9-accent-rgb, 255, 90, 31), .14);
  --pcb-accent-line: rgba(var(--f9-accent-rgb, 255, 90, 31), .45);
  --pcb-on-accent: #0b0d12;
  --pcb-bg: #0b0d12;
  --pcb-surface: rgba(255, 255, 255, .04);
  --pcb-surface-2: rgba(255, 255, 255, .08);
  --pcb-line: rgba(255, 255, 255, .12);
  --pcb-line-strong: rgba(255, 255, 255, .22);
  --pcb-muted: rgba(255, 255, 255, .66);
  --pcb-sheet: #12151b;
  --pcb-ok: #31d17c;
  --pcb-warn: #ffb020;
  --pcb-bad: #ff5a5a;
  --pcb-unk: #9aa3ad;
  --pcb-radius: 18px;
  --pcb-bar-h: 0px;
}
html[data-resolved-scheme="light"] .pcb-body {
  --pcb-bg: #f4f5f7;
  --pcb-surface: rgba(10, 14, 20, .035);
  --pcb-surface-2: rgba(10, 14, 20, .07);
  --pcb-line: rgba(10, 14, 20, .12);
  --pcb-line-strong: rgba(10, 14, 20, .24);
  --pcb-muted: rgba(10, 14, 20, .64);
  --pcb-sheet: #ffffff;
  --pcb-ok: #13985a;
  --pcb-warn: #b56d00;
  --pcb-bad: #d23434;
  --pcb-unk: #6b7480;
}

/* ------------------------------------------------------------------ página */
.pcb-page { padding: 12px 0 0; }
.pcb-page .cx-container { width: min(1240px, 100% - 32px); margin-inline: auto; }
.pcb-hero { max-width: 780px; margin: 10px 0 18px; }
.pcb-kicker { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .16em; color: var(--pcb-accent); }
.pcb-hero h1 { margin: 8px 0 10px; font-size: clamp(1.9rem, 7vw, 3.3rem); line-height: 1.02; letter-spacing: -.02em; }
.pcb-hero h1 span { display: block; opacity: .55; }
.pcb-lead { margin: 0; font-size: clamp(.98rem, 2.6vw, 1.1rem); line-height: 1.55; color: var(--pcb-muted); }
.pcb-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.pcb-steps li { padding: 6px 10px; border: 1px solid var(--pcb-line); border-radius: 999px; font-size: .78rem; color: var(--pcb-muted); }
.pcb-steps b { color: var(--pcb-accent); }
.pcb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pcb-note, .pcb-muted { margin: 6px 0 0; font-size: .82rem; line-height: 1.5; color: var(--pcb-muted); }

.pcb-section { margin-top: 18px; padding: clamp(14px, 3.6vw, 26px); border: 1px solid var(--pcb-line); border-radius: 24px; background: var(--pcb-surface); }
.pcb-section__head h2 { margin: 0 0 4px; font-size: clamp(1.25rem, 4.4vw, 1.7rem); letter-spacing: -.01em; }
.pcb-section__head p { margin: 0 0 14px; font-size: .92rem; line-height: 1.5; color: var(--pcb-muted); }

/* ------------------------------------------------------------------ botones y chips */
.pcb-btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border: 1px solid var(--pcb-line-strong); border-radius: 999px;
  background: transparent; color: inherit; font: inherit; font-size: 12px; font-weight: 800; letter-spacing: .1em;
  text-decoration: none; text-transform: uppercase; cursor: pointer; transition: background .15s, border-color .15s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.pcb-btn:hover { background: var(--pcb-surface-2); }
.pcb-btn:active { transform: scale(.98); }
.pcb-btn:focus-visible, .pcb-icon-btn:focus-visible, .pcb-slot:focus-visible, .pcb3__pin:focus-visible, .pcb3__tool:focus-visible { outline: 2px solid var(--pcb-accent); outline-offset: 2px; }
.pcb-btn--primary { border-color: transparent; background: var(--pcb-accent); color: var(--pcb-on-accent); }
.pcb-btn--primary:hover { background: var(--pcb-accent); filter: brightness(1.08); }
.pcb-btn--ghost { border-color: var(--pcb-line); }
.pcb-btn--danger { border-color: rgba(255, 90, 90, .45); color: var(--pcb-bad); }
.pcb-btn--sm { min-height: 40px; padding: 0 14px; font-size: 11px; }
.pcb-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.pcb-icon-btn {
  appearance: none; display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border: 0; border-radius: 999px; background: transparent; color: inherit; cursor: pointer;
}
.pcb-icon-btn:hover { background: var(--pcb-surface-2); }
.pcb-icon-btn svg, .pcb3__tool svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pcb-ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.pcb-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; background: var(--pcb-surface-2); }
.pcb-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pcb-chip[data-status="compatible"] { color: var(--pcb-ok); background: rgba(49, 209, 124, .12); }
.pcb-chip[data-status="warning"] { color: var(--pcb-warn); background: rgba(255, 176, 32, .13); }
.pcb-chip[data-status="incompatible"] { color: var(--pcb-bad); background: rgba(255, 90, 90, .13); }
.pcb-chip[data-status="unverified"] { color: var(--pcb-unk); }
.pcb-chip[data-status="current"] { color: var(--pcb-accent); background: var(--pcb-accent-soft); }
.pcb-chip--link { border: 1px solid var(--pcb-line); min-height: 36px; cursor: pointer; color: inherit; font: inherit; font-size: 11px; font-weight: 800; }
.pcb-chip--link::before { background: var(--pcb-accent); }
.pcb-tag { display: inline-block; padding: 2px 7px; border: 1px solid currentColor; border-radius: 999px; font-size: 9.5px; font-weight: 800; letter-spacing: .1em; opacity: .9; }
.pcb-tag[data-source="stock"] { color: var(--pcb-accent); }
.pcb-tag[data-source="owned"] { color: var(--pcb-unk); }
.pcb-tag[data-source="world"] { color: var(--pcb-accent); }
.pcb-audit { display: inline-block; font-size: .74rem; color: var(--pcb-muted); }
.pcb-audit::before { content: "● "; }
.pcb-audit[data-audit="COMPLETO"]::before { color: var(--pcb-ok); }
.pcb-audit[data-audit="INCOMPLETO"]::before { color: var(--pcb-warn); }
.pcb-audit[data-audit="SIN VERIFICAR"]::before { color: var(--pcb-unk); }

/* ------------------------------------------------------------------ estudio */
.pcb-studio__grid { display: grid; gap: 14px; }
@media (min-width: 980px) {
  .pcb-studio__grid { grid-template-columns: minmax(0, 1.45fr) minmax(320px, .8fr); align-items: start; }
  .pcb-side { position: sticky; top: 84px; }
}

/* Visor 3D */
.pcb-stage { position: relative; min-height: 0; }
.pcb3, .pcb-stage__placeholder { position: relative; }
.pcb3__stage, .pcb-stage__placeholder {
  position: relative; width: 100%; aspect-ratio: 1 / 1.02; max-height: 74vh; overflow: hidden; border-radius: var(--pcb-radius);
  border: 1px solid var(--pcb-line);
  background:
    radial-gradient(120% 80% at 70% 18%, rgba(var(--f9-accent-rgb, 255, 90, 31), .16), transparent 55%),
    radial-gradient(90% 70% at 20% 100%, rgba(80, 120, 255, .10), transparent 60%),
    linear-gradient(180deg, #151922, #0a0c10);
  contain: layout paint;
}
@media (min-width: 640px) { .pcb3__stage, .pcb-stage__placeholder { aspect-ratio: 16 / 11; } }
html[data-resolved-scheme="light"] .pcb3__stage, html[data-resolved-scheme="light"] .pcb-stage__placeholder {
  background: radial-gradient(120% 80% at 70% 18%, rgba(var(--f9-accent-rgb, 255, 90, 31), .14), transparent 55%), linear-gradient(180deg, #eef0f4, #dfe3ea);
}
.pcb-stage__placeholder { display: grid; place-items: center; color: var(--pcb-muted); font-size: .86rem; }
.pcb-stage__placeholder::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .06) 50%, transparent 70%); background-size: 220% 100%; animation: pcb-shimmer 1.4s linear infinite; }
.pcb-stage.is-flat { padding: 18px; border: 1px dashed var(--pcb-line-strong); border-radius: var(--pcb-radius); }
.pcb-stage__fallback { margin: 0; color: var(--pcb-muted); }

.pcb3__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; outline: none; }
.pcb3.is-dragging .pcb3__canvas { cursor: grabbing; }
.pcb3__pins, .pcb3__flags { position: absolute; inset: 0; pointer-events: none; }
.pcb3__pin {
  position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 44px; height: 44px;
  margin: -22px 0 0 -22px; padding: 0; border: 0; background: none; color: #fff; font: inherit; cursor: pointer; pointer-events: auto;
  will-change: transform; -webkit-tap-highlight-color: transparent;
}
.pcb3__pin.is-offscreen { visibility: hidden; }
.pcb3__pin-dot {
  display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%;
  font-size: 18px; font-weight: 700; line-height: 1; color: var(--pcb-on-accent); background: var(--pcb-accent);
  box-shadow: 0 0 0 4px rgba(var(--f9-accent-rgb, 255, 90, 31), .28), 0 6px 16px rgba(0, 0, 0, .45);
}
.pcb3__pin[data-status="empty"] .pcb3__pin-dot { animation: pcb-pulse 2.2s ease-out infinite; }
.pcb3__pin:not([data-status="empty"]) .pcb3__pin-dot { width: 16px; height: 16px; background: #fff; box-shadow: 0 0 0 3px rgba(0, 0, 0, .35); }
.pcb3__pin[data-status="compatible"] .pcb3__pin-dot { background: var(--pcb-ok); }
.pcb3__pin[data-status="warning"] .pcb3__pin-dot { background: var(--pcb-warn); }
.pcb3__pin[data-status="unverified"] .pcb3__pin-dot { background: var(--pcb-unk); }
.pcb3__pin[data-status="incompatible"] .pcb3__pin-dot { background: var(--pcb-bad); animation: pcb-alert 1.2s ease-in-out infinite; }
.pcb3__pin-label {
  position: absolute; left: 40px; top: 50%; margin-top: -12px; pointer-events: none; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap;
  background: rgba(8, 10, 14, .78); color: #fff; opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s;
}
.pcb3__pin:hover .pcb3__pin-label, .pcb3__pin:focus-visible .pcb3__pin-label, .pcb3__pin.is-selected .pcb3__pin-label { opacity: 1; transform: none; }
.pcb3__pin:hover, .pcb3__pin:focus-visible, .pcb3__pin.is-selected { z-index: 2; }
.pcb3__flag {
  position: absolute; left: 0; top: 0; padding: 5px 10px; border-radius: 8px; font-size: 12px; font-weight: 800; white-space: nowrap;
  transform-origin: 0 0; margin: -14px 0 0 -40px; color: #fff; background: var(--pcb-bad); box-shadow: 0 8px 20px rgba(0, 0, 0, .4);
}
.pcb3__flag[data-status="warning"] { background: var(--pcb-warn); color: #111; }
.pcb3__flag.is-offscreen { visibility: hidden; }

.pcb3__tools { position: absolute; right: 10px; bottom: 10px; z-index: 3; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: calc(100% - 20px); }
@media (min-width: 640px) { .pcb3__tools { top: 10px; bottom: auto; } }
.pcb3__tool {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; height: 44px; padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; background: rgba(10, 12, 16, .66); color: #fff; font: inherit;
  font-size: 12px; font-weight: 800; letter-spacing: .06em; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.pcb3__tool[aria-pressed="true"] { background: var(--pcb-accent); color: var(--pcb-on-accent); border-color: transparent; }
.pcb3__tool--wide span { display: none; }
@media (min-width: 420px) { .pcb3__tool--wide span { display: inline; } }
.pcb3__info { position: absolute; left: 12px; top: 10px; display: grid; gap: 4px; max-width: calc(100% - 24px); pointer-events: none; }
@media (min-width: 640px) { .pcb3__info { top: auto; bottom: 12px; max-width: 60%; } }
.pcb3__hint, .pcb3__note { margin: 0; font-size: 11.5px; line-height: 1.35; color: rgba(255, 255, 255, .8); text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.pcb3__note { color: var(--pcb-warn); }
html[data-resolved-scheme="light"] .pcb3__hint { color: rgba(10, 14, 20, .7); text-shadow: none; }
html[data-resolved-scheme="light"] .pcb3__note { color: #9a5b00; text-shadow: none; }
.pcb3__lost { position: absolute; inset: 0; border: 0; background: rgba(0, 0, 0, .6); color: #fff; font: inherit; cursor: pointer; }
.pcb3.is-loading-model .pcb3__stage::after { content: ""; position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .25); border-top-color: var(--pcb-accent); border-radius: 50%; animation: pcb-spin .8s linear infinite; }

/* Modo «Explorar»: pantalla completa sin depender de la Fullscreen API (funciona en iOS). */
.pcb3.is-immersive { position: fixed; inset: 0; z-index: 1000; background: var(--pcb-bg); padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.pcb3.is-immersive .pcb3__stage { height: 100%; max-height: none; aspect-ratio: auto; border-radius: 0; border: 0; }
html.pcb3-lock, html.pcb3-lock body, html.pcb-sheet-open, html.pcb-sheet-open body { overflow: hidden; }

/* ------------------------------------------------------------------ ranuras */
.pcb-slots { display: grid; grid-template-columns: 1fr; gap: 6px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 600px) and (max-width: 979px) { .pcb-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
.pcb-slot {
  appearance: none; position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  width: 100%; min-height: 64px; padding: 10px 12px; border: 1px solid var(--pcb-line); border-radius: 14px; background: var(--pcb-surface);
  color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; -webkit-tap-highlight-color: transparent;
}
.pcb-slot:hover { border-color: var(--pcb-line-strong); background: var(--pcb-surface-2); }
.pcb-slot[data-status="empty"] { border-style: dashed; }
.pcb-slot[data-status="incompatible"] { border-color: rgba(255, 90, 90, .6); background: rgba(255, 90, 90, .06); }
.pcb-slot[data-status="warning"] { border-color: rgba(255, 176, 32, .55); }
.pcb-slot__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--pcb-surface-2); color: var(--pcb-accent); }
.pcb-slot__text { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.pcb-slot__role { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--pcb-muted); }
.pcb-slot__role em { font-style: normal; color: var(--pcb-accent); }
.pcb-slot__name { font-size: .9rem; font-weight: 650; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
@media (min-width: 600px) { .pcb-slot__name { -webkit-line-clamp: 2; } }
.pcb-slot[data-status="empty"] .pcb-slot__name { color: var(--pcb-muted); font-weight: 500; }
.pcb-slot__meta { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: .76rem; color: var(--pcb-muted); }
.pcb-slot__state { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 16px; font-weight: 700; color: var(--pcb-accent); }
.pcb-slot:not([data-status="empty"]) .pcb-slot__state { width: 10px; height: 10px; background: var(--pcb-unk); }
.pcb-slot[data-status="compatible"] .pcb-slot__state { background: var(--pcb-ok); }
.pcb-slot[data-status="warning"] .pcb-slot__state { background: var(--pcb-warn); }
.pcb-slot[data-status="incompatible"] .pcb-slot__state { background: var(--pcb-bad); }
@media (max-width: 380px) { .pcb-slot { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px; } .pcb-slot__icon { width: 30px; height: 30px; } }

/* Autocompletar */
.pcb-auto { margin-top: 12px; }
.pcb-auto__box { border: 1px solid var(--pcb-line); border-radius: 16px; background: var(--pcb-surface); }
.pcb-auto__box summary { display: grid; gap: 2px; min-height: 44px; padding: 12px 14px; cursor: pointer; list-style: none; }
.pcb-auto__box summary::-webkit-details-marker { display: none; }
.pcb-auto__box summary span { font-size: .82rem; color: var(--pcb-muted); }
.pcb-auto__form { display: grid; gap: 12px; padding: 0 14px 14px; }
.pcb-auto__msg { margin: 0; font-size: .84rem; color: var(--pcb-muted); }
.pcb-auto__msg:empty { display: none; }

.pcb-field { display: grid; gap: 6px; font-size: .8rem; }
.pcb-field > span { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--pcb-muted); font-size: 10.5px; }
.pcb-field input, .pcb-field select {
  width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--pcb-line-strong); border-radius: 12px;
  background: var(--pcb-surface); color: inherit; font: inherit; font-size: 16px; /* 16 px: iOS no hace zoom */
}
.pcb-field input:focus-visible { outline: 2px solid var(--pcb-accent); outline-offset: 1px; }
.pcb-field small { color: var(--pcb-muted); }

.pcb-seg { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.pcb-seg legend { width: 100%; margin-bottom: 6px; padding: 0; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--pcb-muted); }
.pcb-seg label { position: relative; }
.pcb-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pcb-seg span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--pcb-line-strong); border-radius: 999px; font-size: .84rem; font-weight: 650; }
.pcb-seg input:checked + span { background: var(--pcb-accent); border-color: transparent; color: var(--pcb-on-accent); }
.pcb-seg input:focus-visible + span { outline: 2px solid var(--pcb-accent); outline-offset: 2px; }

/* ------------------------------------------------------------------ veredicto */
.pcb-verdict { margin-top: 16px; display: grid; gap: 14px; }
.pcb-verdict:empty { display: none; }
.pcb-verdict__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--pcb-line); background: var(--pcb-surface); transition: opacity .2s; }
.pcb-verdict__head[data-busy="1"] { opacity: .6; }
.pcb-verdict__badge { padding: 7px 12px; border-radius: 999px; font-size: 11px; font-weight: 900; letter-spacing: .12em; background: var(--pcb-surface-2); }
.pcb-verdict__head[data-status="compatible"] .pcb-verdict__badge { background: var(--pcb-ok); color: #07140d; }
.pcb-verdict__head[data-status="warning"] .pcb-verdict__badge { background: var(--pcb-warn); color: #1a1200; }
.pcb-verdict__head[data-status="incompatible"] .pcb-verdict__badge { background: var(--pcb-bad); color: #fff; }
.pcb-verdict__counts { font-size: .86rem; color: var(--pcb-muted); }
.pcb-verdict__skel { display: grid; gap: 10px; }
.pcb-verdict__skel span, .pcbs__skel span, .pcbg__card--skel span { display: block; height: 16px; border-radius: 8px; background: linear-gradient(100deg, var(--pcb-surface-2) 30%, var(--pcb-line) 50%, var(--pcb-surface-2) 70%); background-size: 220% 100%; animation: pcb-shimmer 1.3s linear infinite; }
.pcb-verdict__skel span:first-child { height: 46px; width: 60%; }
.pcb-missing { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: .86rem; }
.pcb-empty, .pcb-error { padding: 16px; border: 1px dashed var(--pcb-line-strong); border-radius: 16px; }
.pcb-empty p, .pcb-error p { margin: 0 0 8px; color: var(--pcb-muted); }
.pcb-error { border-color: rgba(255, 90, 90, .45); background: rgba(255, 90, 90, .05); }
.pcb-block h3, .pcbp__body h3 { margin: 0 0 8px; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--pcb-muted); }
.pcb-pairs, .pcb-options { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pcb-pair { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--pcb-line); border-left-width: 3px; background: var(--pcb-surface); font-size: .88rem; line-height: 1.45; }
.pcb-pair .pcb-chip { justify-self: start; }
.pcb-pair[data-status="incompatible"] { border-left-color: var(--pcb-bad); }
.pcb-pair[data-status="warning"] { border-left-color: var(--pcb-warn); }
.pcb-pair[data-status="compatible"] { border-left-color: var(--pcb-ok); }
.pcb-pair small { color: var(--pcb-muted); }
.pcb-solution { margin-top: 10px; padding: 14px; border-radius: 14px; border: 1px solid var(--pcb-accent-line); background: var(--pcb-accent-soft); }
.pcb-solution__head { margin: 0 0 10px; font-size: .86rem; line-height: 1.45; }
.pcb-solution__head strong { color: var(--pcb-accent); letter-spacing: .04em; }
.pcb-option { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--pcb-line); background: var(--pcb-sheet); }
.pcb-option__media { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--pcb-surface-2); color: var(--pcb-accent); }
.pcb-option__media img { width: 100%; height: 100%; object-fit: contain; }
.pcb-option__text { display: grid; gap: 2px; font-size: .84rem; min-width: 0; }
.pcb-option__text span, .pcb-option__text small { color: var(--pcb-muted); }
.pcb-option__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
@media (min-width: 560px) { .pcb-option { grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; } .pcb-option__actions { grid-column: auto; } }
.pcb-more { border: 1px solid var(--pcb-line); border-radius: 14px; padding: 0 12px; }
.pcb-more summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-size: .86rem; font-weight: 700; }
.pcb-more[open] { padding-bottom: 12px; }
.pcb-bottleneck { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--pcb-surface); font-size: .88rem; }

.pcb-power { padding: 14px; border-radius: 14px; border: 1px solid var(--pcb-line); background: var(--pcb-surface); }
.pcb-power__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: .88rem; }
.pcb-power__head span { color: var(--pcb-muted); }
.pcb-power__bar { position: relative; height: 12px; margin: 26px 0 8px; border-radius: 999px; background: var(--pcb-surface-2); }
.pcb-power__bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, var(--pcb-ok), var(--pcb-warn)); }
.pcb-power[data-ok="0"] .pcb-power__bar i { background: linear-gradient(90deg, var(--pcb-warn), var(--pcb-bad)); }
.pcb-power__mark { position: absolute; top: -6px; bottom: -6px; width: 2px; background: currentColor; }
.pcb-power__mark::after { content: attr(data-label); position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translateX(-50%); font-size: 10.5px; white-space: nowrap; color: var(--pcb-muted); }
.pcb-power__mark--psu { color: var(--pcb-accent); }
.pcb-power__mark--psu::after { top: calc(100% + 2px); bottom: auto; color: var(--pcb-accent); }
.pcb-power p { margin: 18px 0 2px; font-size: .86rem; }
.pcb-power small { color: var(--pcb-muted); font-size: .76rem; }

/* ------------------------------------------------------------------ barra del ensamble */
.pcb-bar {
  position: sticky; bottom: 0; z-index: 40; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px;
  margin: 20px -16px 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--pcb-line); background: var(--pcb-bg);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .28);
  flex-wrap: nowrap;
}
@media (min-width: 980px) { .pcb-bar { margin: 20px 0 0; border: 1px solid var(--pcb-line); border-radius: 18px 18px 0 0; } }
.pcb-bar[hidden] { display: none; }
.pcb-bar__sum { display: grid; grid-template-columns: auto; align-items: baseline; gap: 0 10px; min-width: 0; flex: none; }
@media (min-width: 520px) { .pcb-bar__sum { grid-template-columns: auto auto; } }
.pcb-bar__label { grid-column: 1 / -1; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--pcb-muted); }
.pcb-bar__total { font-size: clamp(1rem, 4.4vw, 1.2rem); white-space: nowrap; }
.pcb-bar__left { font-size: .76rem; color: var(--pcb-ok); }
.pcb-bar__left.is-over { color: var(--pcb-bad); }
.pcb-bar__meter { grid-column: 1 / -1; height: 4px; margin-top: 4px; border-radius: 999px; background: var(--pcb-surface-2); overflow: hidden; }
.pcb-bar__meter i { display: block; height: 100%; background: var(--pcb-accent); }
.pcb-bar__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; flex: 1 1 auto; min-width: 0; }
.pcb-bar__cta { flex: 1 1 auto; max-width: 380px; padding: 0 14px; white-space: nowrap; }
.pcb-bar__cta svg, .pcb-bar__save svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pcb-bar__cta-long { display: none; }
@media (min-width: 520px) { .pcb-bar__cta-long { display: inline; } .pcb-bar__cta-short { display: none; } }
.pcb-bar__save { width: 44px; padding: 0; flex: none; }
.pcb-bar__warn { flex: 1 1 100%; margin: 0; font-size: .8rem; color: var(--pcb-warn); text-align: right; }
.pcb-bar__sum .pcb-bar__left { white-space: nowrap; }
@media (max-width: 400px) { .pcb-bar__meter { display: none; } }
/* Los botones flotantes de la tienda (WhatsApp, personalizar) suben para no tapar la barra. */
body.pcb-has-bar .f9-floating-tools { transform: translateY(calc(-1 * var(--pcb-bar-h, 72px))); }
@media (min-width: 980px) { body.pcb-has-bar .f9-floating-tools { transform: none; } }
body.pcb-immersive .f9-floating-tools, body.pcb-immersive .pcb-bar { visibility: hidden; }

/* ------------------------------------------------------------------ hojas (buscador y pieza) */
.pcb-sheet {
  width: 100%; max-width: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: transparent; color: inherit;
  inset: auto 0 0 0; overflow: visible;
}
.pcb-sheet::backdrop { background: rgba(4, 6, 9, .55); }
.pcb-sheet__panel {
  display: flex; flex-direction: column; width: 100%; max-height: min(88dvh, 88vh); overflow: hidden;
  border-radius: 22px 22px 0 0; border: 1px solid var(--pcb-line); background: var(--pcb-sheet); color: inherit;
  padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -20px 60px rgba(0, 0, 0, .45);
}
.pcb-sheet[open] .pcb-sheet__panel { animation: pcb-sheet-up .26s cubic-bezier(.2, .8, .2, 1); }
@media (min-width: 820px) {
  .pcb-sheet { inset: 0 0 0 auto; width: min(520px, 100%); height: 100%; }
  .pcb-sheet__panel { height: 100%; max-height: none; border-radius: 22px 0 0 22px; }
  .pcb-sheet[open] .pcb-sheet__panel { animation-name: pcb-sheet-left; }
}
.pcb-sheet__head { position: relative; display: flex; align-items: center; gap: 8px; padding: 18px 10px 8px 18px; }
.pcb-sheet__head h2 { flex: 1; margin: 0; font-size: 1.08rem; line-height: 1.25; }
.pcb-sheet__head h2 small { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--pcb-muted); }
.pcb-sheet__grab { position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 999px; background: var(--pcb-line-strong); }
@media (min-width: 820px) { .pcb-sheet__grab { display: none; } }

.pcbs__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 4px 16px 10px; padding: 4px; border-radius: 999px; background: var(--pcb-surface-2); }
.pcbs__tabs button { min-height: 40px; border: 0; border-radius: 999px; background: none; color: inherit; font: inherit; font-size: .84rem; font-weight: 750; cursor: pointer; }
.pcbs__tabs button[aria-selected="true"] { background: var(--pcb-accent); color: var(--pcb-on-accent); }
.pcbs__field { position: relative; display: flex; align-items: center; margin: 0 16px; border: 1px solid var(--pcb-line-strong); border-radius: 14px; background: var(--pcb-surface); }
.pcbs__field:focus-within { border-color: var(--pcb-accent); box-shadow: 0 0 0 3px var(--pcb-accent-soft); }
.pcbs__field > svg { width: 18px; height: 18px; margin-left: 14px; flex: none; fill: none; stroke: var(--pcb-muted); stroke-width: 2; }
.pcbs__field input { flex: 1; min-width: 0; min-height: 48px; padding: 0 10px; border: 0; background: none; color: inherit; font: inherit; font-size: 16px; outline: none; }
.pcbs__field input::-webkit-search-cancel-button { display: none; }
.pcbs__context { margin: 8px 18px 0; font-size: .78rem; color: var(--pcb-muted); }
.pcbs__context:empty { display: none; }
.pcbs__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 10px 10px 16px; -webkit-overflow-scrolling: touch; }
.pcbs__list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.pcbs__item {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 12px; align-items: center; width: 100%; min-height: 72px; padding: 8px;
  border: 1px solid transparent; border-radius: 14px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.pcbs__item:hover, .pcbs__item[aria-selected="true"] { background: var(--pcb-surface-2); border-color: var(--pcb-line); }
.pcbs__item[data-status="incompatible"] { opacity: .78; }
.pcbs__item .pcb-chip { grid-column: 2; justify-self: start; }
@media (min-width: 480px) { .pcbs__item { grid-template-columns: 56px minmax(0, 1fr) auto; } .pcbs__item .pcb-chip { grid-column: auto; } }
.pcbs__media { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; background: #fff; color: var(--pcb-accent); }
.pcbs__media:has(svg) { background: var(--pcb-surface-2); }
.pcbs__media img { width: 100%; height: 100%; object-fit: contain; }
.pcbs__text { display: grid; gap: 3px; min-width: 0; }
.pcbs__name { font-size: .92rem; font-weight: 650; line-height: 1.3; }
.pcbs__name mark { background: none; color: var(--pcb-accent); font-weight: 800; }
.pcbs__meta { font-size: .78rem; color: var(--pcb-muted); }
.pcbs__meta b { color: inherit; filter: brightness(1.4); }
.pcbs__over { color: var(--pcb-warn); }
.pcbs__detail { font-size: .78rem; line-height: 1.35; color: var(--pcb-muted); overflow-wrap: anywhere; }
.pcbs__group { padding: 10px 8px 2px; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--pcb-muted); }
.pcbs__group:first-child { padding-top: 2px; }
.pcbs__why { font-size: .76rem; line-height: 1.4; color: var(--pcb-muted); }
.pcbs__item[data-status="incompatible"] .pcbs__why { color: var(--pcb-bad); }
.pcbs__count { margin: 8px 8px 0; font-size: .74rem; color: var(--pcb-muted); }
.pcbs__skel { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 8px; }
.pcbs__skel span:first-child { width: 56px; height: 56px; border-radius: 12px; }
.pcbs__skel span:last-child { align-self: center; height: 28px; }
.pcbs__state { padding: 18px 10px; text-align: center; color: var(--pcb-muted); }
.pcbs__state p { margin: 0 0 10px; }
.pcbs__manual { display: grid; gap: 12px; margin-top: 14px; padding: 14px; border-top: 1px solid var(--pcb-line); }
.pcbs__manual h3 { margin: 0; font-size: .95rem; }
.pcbs__manual-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.pcbp__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 18px 16px; display: grid; gap: 12px; align-content: start; }
.pcbp__hero { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; }
.pcbp__hero p { margin: 0 0 4px; }
.pcbp__media { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 16px; overflow: hidden; background: #fff; color: var(--pcb-accent); }
.pcbp__media:has(svg) { background: var(--pcb-surface-2); }
.pcbp__media img { width: 100%; height: 100%; object-fit: contain; }
.pcbp__actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--pcb-line); }
.pcbp__actions .pcb-btn { flex: 1 1 130px; }

/* ------------------------------------------------------------------ juegos */
.pcbg__controls { display: grid; gap: 14px; }
.pcbg__search { position: relative; display: grid; gap: 6px; }
.pcbg__search .pcbs__field { margin: 0; }
.pcbg__suggest {
  position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; max-height: 340px; overflow-y: auto; margin: 0; padding: 6px; list-style: none;
  border: 1px solid var(--pcb-line-strong); border-radius: 14px; background: var(--pcb-sheet); box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
}
.pcbg__suggest button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 4px 8px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pcbg__suggest button:hover, .pcbg__suggest button[aria-selected="true"] { background: var(--pcb-surface-2); }
.pcbg__suggest button[aria-disabled="true"] { opacity: .45; }
.pcbg__suggest img, .pcbg__ph { width: 44px; height: 44px; flex: none; border-radius: 8px; object-fit: cover; display: grid; place-items: center; background: var(--pcb-surface-2); }
.pcbg__suggest em { font-style: normal; color: var(--pcb-muted); font-size: .8rem; }
.pcbg__suggest span:nth-child(2) { flex: 1; }
.pcbg__group { padding: 8px 8px 4px; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--pcb-muted); }
.pcbg__chosen { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pcbg__chosen:empty { display: none; }
.pcbg__chip { display: flex; align-items: center; gap: 6px; padding: 2px 2px 2px 4px; border: 1px solid var(--pcb-line-strong); border-radius: 999px; font-size: .84rem; font-weight: 650; }
.pcbg__chip img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.pcbg__chip .pcb-icon-btn { width: 36px; height: 36px; }
.pcbg__targets { display: flex; flex-wrap: wrap; gap: 14px; }
.pcbg__result { margin-top: 16px; display: grid; gap: 14px; }
.pcbg__grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.pcbg__card { position: relative; display: grid; gap: 10px; align-content: start; padding: 14px; border-radius: 16px; border: 1px solid var(--pcb-line); border-top-width: 3px; background: var(--pcb-surface); overflow: hidden; }
.pcbg__card--skel { min-height: 220px; }
.pcbg__card--skel span:first-child { height: 120px; }
.pcbg__card[data-status="RUNS"] { border-top-color: var(--pcb-ok); }
.pcbg__card[data-status="RUNS_MIN"] { border-top-color: var(--pcb-warn); }
.pcbg__card[data-status="FAILS"] { border-top-color: var(--pcb-bad); }
.pcbg__card[data-status="UNKNOWN"] { border-top-color: var(--pcb-unk); }
.pcbg__cover { width: calc(100% + 28px); max-width: none; height: 120px; margin: -14px -14px 0; object-fit: cover; }
.pcbg__cover--ph { display: grid; place-items: center; font-size: 2.2rem; background: var(--pcb-surface-2); }
.pcbg__note { margin: 0; font-size: .78rem; line-height: 1.45; color: var(--pcb-muted); }
.pcbg__card header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.pcbg__card h3 { margin: 0; font-size: 1rem; }
.pcbg__status { padding: 5px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 900; letter-spacing: .08em; background: var(--pcb-surface-2); }
.pcbg__card[data-status="RUNS"] .pcbg__status { background: var(--pcb-ok); color: #07140d; }
.pcbg__card[data-status="RUNS_MIN"] .pcbg__status { background: var(--pcb-warn); color: #1a1200; }
.pcbg__card[data-status="FAILS"] .pcbg__status { background: var(--pcb-bad); color: #fff; }
.pcbg__limit, .pcbg__bench, .pcbg__source { margin: 0; font-size: .82rem; line-height: 1.45; }
.pcbg__source a, .pcbg__bench a { color: var(--pcb-accent); }
.pcbg__meters { display: grid; gap: 12px; }
.pcbg__meter-head { display: flex; justify-content: space-between; font-size: .82rem; }
.pcbg__meter-head span { color: var(--pcb-muted); }
.pcbg__bar { position: relative; height: 10px; margin: 20px 0 18px; border-radius: 999px; background: var(--pcb-surface-2); }
.pcbg__fill { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--pcb-unk); }
.pcbg__meter[data-result="PASS"] .pcbg__fill { background: var(--pcb-ok); }
.pcbg__meter[data-result="MIN"] .pcbg__fill { background: var(--pcb-warn); }
.pcbg__meter[data-result="FAIL"] .pcbg__fill { background: var(--pcb-bad); }
.pcbg__mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: currentColor; }
.pcbg__mark::after { content: attr(data-label); position: absolute; top: calc(100% + 2px); left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 400; white-space: nowrap; color: var(--pcb-muted); }
.pcbg__mark--rec { color: var(--pcb-accent); }
.pcbg__mark--rec::after { top: auto; bottom: calc(100% + 2px); color: var(--pcb-accent); }
.pcbg__tiers { display: grid; gap: 8px; }
.pcbg__tier { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px; font-size: .82rem; line-height: 1.4; }
.pcbg__tier small { display: block; color: var(--pcb-muted); }
.pcbg__tier-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 900; background: var(--pcb-surface-2); }
.pcbg__tier[data-result="PASS"] .pcbg__tier-icon { background: var(--pcb-ok); color: #07140d; }
.pcbg__tier[data-result="MIN"] .pcbg__tier-icon { background: var(--pcb-warn); color: #1a1200; }
.pcbg__tier[data-result="FAIL"] .pcbg__tier-icon { background: var(--pcb-bad); color: #fff; }
.pcbg__life { padding: 16px; border-radius: 16px; border: 1px solid var(--pcb-accent-line); background: var(--pcb-accent-soft); }
.pcbg__life h3 { margin: 0 0 10px; font-size: .74rem; letter-spacing: .14em; color: var(--pcb-accent); }
.pcbg__steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.pcbg__steps span { padding: 6px 4px; border-radius: 8px; text-align: center; font-size: .74rem; font-weight: 800; background: var(--pcb-surface-2); color: var(--pcb-muted); }
.pcbg__steps span[data-on="1"] { background: var(--pcb-accent); color: var(--pcb-on-accent); }
.pcbg__life[data-horizon="UNKNOWN"] .pcbg__steps span { background: var(--pcb-surface-2); color: var(--pcb-muted); }
.pcbg__life-label { margin: 10px 0 6px; font-size: 1.15rem; font-weight: 800; }
.pcbg__life ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: .86rem; }

/* ------------------------------------------------------------------ aviso flotante */
.pcb-toast {
  position: fixed; left: 50%; bottom: calc(var(--pcb-bar-h, 0px) + 12px + env(safe-area-inset-bottom)); z-index: 1100; display: flex; align-items: flex-start; gap: 6px;
  width: min(460px, calc(100% - 24px)); padding: 12px 6px 12px 16px; transform: translateX(-50%);
  border-radius: 16px; border: 1px solid var(--pcb-line-strong); background: var(--pcb-sheet); color: inherit; box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
  animation: pcb-toast .22s ease-out;
}
.pcb-toast[hidden] { display: none; }
.pcb-toast[data-tone="ok"] { border-color: rgba(49, 209, 124, .55); }
.pcb-toast[data-tone="bad"] { border-color: rgba(255, 90, 90, .6); }
.pcb-toast__body { flex: 1; font-size: .9rem; line-height: 1.45; }
.pcb-toast__body p { margin: 6px 0 2px; }
.pcb-toast__body ul { margin: 0 0 8px; padding-left: 18px; font-size: .82rem; }
.pcb-toast__body .pcb-btn { margin-top: 8px; }
.pcb-spin { width: 14px; height: 14px; border: 2px solid rgba(0, 0, 0, .25); border-top-color: currentColor; border-radius: 50%; animation: pcb-spin .7s linear infinite; }

@keyframes pcb-shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@keyframes pcb-pulse { 0% { box-shadow: 0 0 0 0 rgba(var(--f9-accent-rgb, 255, 90, 31), .55), 0 6px 16px rgba(0, 0, 0, .45); } 70% { box-shadow: 0 0 0 12px rgba(var(--f9-accent-rgb, 255, 90, 31), 0), 0 6px 16px rgba(0, 0, 0, .45); } 100% { box-shadow: 0 0 0 0 rgba(var(--f9-accent-rgb, 255, 90, 31), 0), 0 6px 16px rgba(0, 0, 0, .45); } }
@keyframes pcb-alert { 50% { transform: scale(1.35); } }
@keyframes pcb-spin { to { transform: rotate(360deg); } }
@keyframes pcb-sheet-up { from { transform: translateY(40px); opacity: 0; } }
@keyframes pcb-sheet-left { from { transform: translateX(40px); opacity: 0; } }
@keyframes pcb-toast { from { transform: translate(-50%, 16px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .pcb-body *, .pcb-body *::before, .pcb-body *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
