/* ==========================================================================
   Componentes compartidos: explorador del catálogo y del sellado, ventana de añadir,
   ficha de posición, modo rápido de precios y campos de dinero
   ========================================================================== */

/* ---------- Explorador del catálogo (álbum, portfolio, mercado) ---------- */
.catalog-head { gap: 14px; }
/* Atajos: varias líneas en vez de cortarse */
.presets { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; padding-bottom: 0; gap: 7px; }
.preset { height: 30px; padding: 0 12px; border-radius: var(--r-sm); background: transparent; transition: border-color .15s, color .15s, background .15s, transform .12s; }
.preset:hover { background: var(--surface-2); }
.preset.on { box-shadow: none; }
.preset:active { transform: scale(.97); }
.filters-toggle { padding: 2px 2px 0; }

/* Filtros: un bloque por grupo, bien separados */
.filters {
  display: grid;
  gap: 0;
  padding: 4px 14px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--bg-2);
  animation: rv-in .25s var(--ease);
}
.fgroup { display: grid; gap: 10px; padding: 14px 0; }
/* En el panel estrecho del álbum los filtros tienen altura máxima: los resultados siempre a la vista */
/* Los filtros abiertos dejan sitio a la barra de resultados y a unas cuantas cartas: con poco alto (la
   tableta en horizontal) se desplazan dentro antes que empujar los resultados fuera del panel */
.catalog > .catalog-head .filters { max-height: clamp(140px, calc(100vh - 470px), 44vh); max-height: clamp(140px, calc(100dvh - 470px), 44vh); overflow-y: auto; overscroll-behavior: contain; }
.am-browser > .catalog-head .filters { max-height: none; overflow: visible; }
.fgroup + .fgroup { border-top: 1px solid var(--line); }
.fgroup > header { display: flex; align-items: baseline; gap: 8px; min-height: 18px; }
.fgroup > header span { color: var(--text-2); font-size: var(--fs-2xs); font-weight: 600; font-stretch: var(--label-stretch); letter-spacing: var(--label-track); text-transform: uppercase; }
.fgroup > header em { font-style: normal; color: var(--accent-2); font-size: var(--fs-xs); font-weight: 600; font-variant-numeric: tabular-nums; }
.fgroup > header .link-btn { margin-left: auto; font-size: var(--fs-xs); }
.fchips { display: grid; gap: 7px; }
.fchips.rarity { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
.fchips.versions { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.fchip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  /* Un nombre de versión largo («Reverso Master Ball») se parte en dos líneas: no pisa al de al lado */
  min-height: 34px;
  padding: 5px 7px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text-2);
  font-size: var(--fs-xs);
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: break-word;
  transition: border-color .15s, background .15s, color .15s, transform .12s, box-shadow .15s;
}
.fchip:hover { color: var(--text); border-color: var(--line-3); background: var(--surface-2); }
.fchip:active { transform: scale(.97); }
.fchip.on { color: var(--text); border-color: var(--accent-line); background: var(--accent-soft); box-shadow: none; }
.rdot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--surface-4); box-shadow: 0 0 0 2px rgba(255, 255, 255, .06); }
.rdot.r-SEC { background: linear-gradient(135deg, #f6d36b, #f39c3c); }
.rdot.r-SR { background: #6aa8ff; }
.rdot.r-L { background: #ff8080; }
.rdot.r-TR { background: linear-gradient(135deg, #fb7185, #e11d48); }
.rdot.r-PR { background: #4fd6a2; }
.rdot.r-R { background: #b39ddb; }
.rdot.r-UC { background: #8fa3bf; }
.rdot.r-C { background: #6b7a94; }
.rdot.r-DON { background: #c3c8d1; }
/* Los colores, tantos por fila como quepan con su nombre entero («Amarillo», «Morado»): en el catálogo
   del escritorio (345 px) bajan a otra fila en vez de salirse */
.fcolors { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 7px; }
.fcolor { display: grid; justify-items: center; gap: 5px; padding: 8px 2px 6px; border-radius: var(--r-md); border: 1px solid transparent; background: transparent; color: var(--muted); font-size: var(--fs-xs); font-weight: 600; transition: background .15s, border-color .15s, color .15s; }
.fcolor i { width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .14), 0 3px 8px rgba(0, 0, 0, .4); transition: transform .15s var(--ease), box-shadow .15s; }
.fcolor:hover { background: var(--surface-2); color: var(--text); }
.fcolor:hover i { transform: scale(1.08); }
.fcolor.on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--text); }
.fcolor.on i { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5), 0 0 0 2px var(--accent); }
.fselects { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.fselects .full { grid-column: 1 / -1; }
.fselects .field { color: var(--text-2); font-size: var(--fs-2xs); font-weight: 600; font-stretch: var(--label-stretch); letter-spacing: var(--label-track); text-transform: uppercase; gap: 7px; }
.fselects .select { height: 38px; font-size: var(--fs-sm); text-transform: none; letter-spacing: 0; font-weight: 500; }
/* Cifras que filtra el juego (coste, lore…): botones pequeños en fila. Precio: desde y hasta */
.fchips.stats { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
.fchips.stats.words { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
/* Por tramos («1.000–1.499»): más anchos */
.fchips.stats.bands { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.fprice-row { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.fprice-row .input { flex: 1; min-width: 0; height: 38px; font-size: var(--fs-sm); text-transform: none; letter-spacing: 0; font-weight: 500; }
.filter-grid { gap: 10px 12px; }
.filter-grid .field { font-size: var(--fs-2xs); font-weight: 600; font-stretch: var(--label-stretch); letter-spacing: var(--label-track); text-transform: uppercase; gap: 5px; }
.filter-grid .select { text-transform: none; letter-spacing: 0; font-weight: 500; }

/* ---------- Explorador del sellado ---------- */
.sb-head .filter-grid { border-top: 0; padding-top: 0; }
.sb-types { gap: 5px; }
.sb-types .chip { height: 28px; font-size: var(--fs-xs); }
.sb-results { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)) !important; gap: 16px 14px !important; }
.sb-tile { display: grid; gap: 9px; cursor: pointer; min-width: 0; }
.sb-img {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-lg);
  background: radial-gradient(120% 90% at 50% 30%, #fff, #ecebe7 70%, #dcdad4);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
  transition: transform .22s var(--ease), box-shadow .22s;
}
.sb-img img { width: 86%; height: 86%; object-fit: contain; mix-blend-mode: multiply; transition: transform .35s var(--ease); }
.sb-noimg .i { width: 40px; height: 40px; color: #9aa3b5; }
.sb-tile:hover .sb-img { transform: translateY(-3px); box-shadow: 0 0 0 1.5px var(--accent), 0 16px 30px -8px rgba(0, 0, 0, .6); }
.sb-tile:hover .sb-img img { transform: scale(1.06); }
.sb-code { position: absolute; left: 8px; top: 8px; height: 20px; padding: 0 7px; border-radius: var(--r-sm); background: rgba(11, 11, 12, .82); color: #fff; font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .03em; display: inline-grid; place-items: center; }
.sb-img .in-binder { left: auto; right: 8px; top: 8px; }
.sb-img .add-hint { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 30px; display: flex; align-items: center; justify-content: center; gap: 5px; border-radius: var(--r-sm); background: var(--ivory); color: var(--ink-950); font-size: var(--fs-xs); font-weight: 650; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; }
.sb-img .add-hint .i { width: 14px; height: 14px; stroke-width: 2.6; }
.sb-tile:hover .add-hint { opacity: 1; transform: none; }
.sb-meta { display: grid; gap: 2px; min-width: 0; }
.sb-type { color: var(--accent-2); font-size: var(--fs-2xs); font-weight: 600; font-stretch: var(--label-stretch); letter-spacing: var(--label-track); text-transform: uppercase; }
.sb-meta b { font-size: var(--fs-sm); font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sb-price { display: flex; align-items: baseline; gap: 6px; font-family: var(--serif); font-weight: 500; font-variant-numeric: tabular-nums lining-nums; font-size: var(--fs-xl); }
.sb-price small { font-family: var(--font); color: var(--muted); font-weight: 500; font-size: var(--fs-xs); }

/* ---------- Campos de dinero ---------- */
.money-in { position: relative; display: block; }
.money-in .input { padding-right: 30px; font-variant-numeric: tabular-nums; }
.money-in > i { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); font-weight: 650; pointer-events: none; }
.money-in.big .input { height: 46px; font-size: var(--fs-xl); font-weight: 700; }
.money-in.huge .input { height: 64px; font-family: var(--serif); font-size: var(--fs-3xl); font-weight: 450; letter-spacing: -.02em; padding-right: 42px; border-radius: var(--r-lg); }
.money-in.huge > i { font-size: var(--fs-xl); right: 16px; }
/* En inglés el símbolo va delante («€12.50»): moneyIn() de portfolio/shared.js pone .pre */
.money-in.pre .input { padding-right: 11px; padding-left: 28px; }
.money-in.pre > i { right: auto; left: 11px; }
.money-in.huge.pre .input { padding-right: 16px; padding-left: 40px; }
.money-in.huge.pre > i { left: 16px; }
.input.bad { border-color: var(--bad) !important; box-shadow: 0 0 0 3px var(--bad-soft) !important; }
.btn-lg { height: var(--control-h-lg); padding: 0 20px; font-size: var(--fs-md); border-radius: var(--r-md); }
.link-btn.small { font-size: var(--fs-xs); }

/* ---------- Ventana de añadir ---------- */
.dialog.add-modal { width: min(1360px, calc(100vw - 32px)); height: calc(100vh - 40px); max-height: none; }
.add-modal .dlg-body { padding: 0; overflow: hidden; display: flex; }
.am { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 420px; }
.am-left { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.am-tabs { padding: 14px 18px 0; }
.am-tabs .segmented { width: 100%; }
.am-tabs .segmented button { flex: 1; justify-content: center; height: 34px; font-size: var(--fs-sm); }
.cb-panel { position: relative; display: flex; flex-direction: column; overflow: hidden; }
.am-browser.cb-panel { flex: 1; min-height: 0; }
.add-modal .results { grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); padding: 16px 18px 40px; }
.am-custom { grid-column: 1 / -1; grid-row: 1 / -1; padding: 24px; display: grid; gap: 12px; align-content: start; max-width: 640px; }
.am-custom h3 { margin: 0; display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: var(--fs-xl); font-weight: 500; }
.am-basket { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); background: var(--bg-2); }
.amb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.amb-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: var(--fs-xl); font-weight: 500; }
.amb-head h3 .i { color: var(--accent-2); }
.amb-head .count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink); font-size: var(--fs-xs); font-weight: 700; display: inline-grid; place-items: center; }
.amb-head .count.bump { animation: bump .45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.35); } }
.amb-lot { padding: 0 18px; }
.amb-lot:not(:empty) { padding: 14px 18px; border-bottom: 1px solid var(--line); background: rgba(213, 81, 129, .06); }
.amb-items { flex: 1; min-height: 0; overflow: auto; padding: 12px 14px; display: grid; gap: 8px; align-content: start; }
.amb-empty { display: grid; justify-items: center; gap: 6px; padding: 40px 16px; text-align: center; color: var(--muted); font-size: var(--fs-sm); line-height: 1.55; border: 1px dashed var(--line-2); border-radius: var(--r-lg); }
.amb-empty .i { width: 30px; height: 30px; color: var(--line-2); }
.amb-empty b { color: var(--text); font-size: var(--fs-md); }
.amb-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; grid-template-areas: 'img t del' 'img ctrl ctrl'; gap: 8px 10px; align-items: center; padding: 10px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.amb-ctrl { grid-area: ctrl; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.amb-row.fresh { animation: basket-in .45s var(--ease); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
@keyframes basket-in { from { opacity: 0; transform: translateX(16px) scale(.98); } }
.amb-row > img, .amb-row > .ph { grid-area: img; width: 42px; aspect-ratio: 63 / 88; border-radius: var(--r-xs); object-fit: cover; background: var(--surface-3); align-self: start; }
.amb-row > img.k-sealed { aspect-ratio: 1; object-fit: contain; background: #fff; padding: 2px; }
.amb-t { grid-area: t; display: grid; min-width: 0; }
.amb-t b { font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amb-t small { color: var(--muted); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amb-t em { font-style: normal; color: var(--accent-2); font-size: var(--fs-xs); font-weight: 650; }
.amb-row > [data-del] { grid-area: del; align-self: start; }
.amb-qty { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line-2); border-radius: var(--r-md); height: 32px; padding: 2px; justify-self: start; }
.amb-qty button { width: 26px; height: 26px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-2); display: grid; place-items: center; padding: 0; }
.amb-qty button:hover { background: var(--surface-3); color: var(--text); }
.amb-qty button .i { width: 14px; height: 14px; }
.amb-qty span { min-width: 24px; text-align: center; font-weight: 650; font-variant-numeric: tabular-nums; }
.amb-cost { display: flex; gap: 6px; justify-content: flex-end; min-width: 0; margin-left: auto; }
.amb-cost .money-in { width: 112px; }
.amb-cost .input { height: 32px; font-size: var(--fs-sm); }
.amb-cost .select.sm { width: 100px; height: 32px; }
.amb-alloc { font-weight: 700; font-variant-numeric: tabular-nums; }
.amb-alloc small { color: var(--muted); font-weight: 550; margin-left: 2px; }
.amb-foot { display: grid; gap: 12px; padding: 14px 18px 18px; border-top: 1px solid var(--line); background: rgba(11, 11, 12, .5); }
.amb-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.amb-sum div { display: grid; gap: 2px; }
.amb-sum span { color: var(--muted); font-size: var(--fs-2xs); font-weight: 600; font-stretch: var(--label-stretch); letter-spacing: var(--label-track); text-transform: uppercase; }
.amb-sum b { font-family: var(--serif); font-weight: 500; font-variant-numeric: tabular-nums lining-nums; font-size: var(--fs-xl); }
.amb-sum b small { font-size: var(--fs-xs); }
.amb-date { font-size: var(--fs-xs); }
.amb-actions { display: flex; align-items: center; gap: 10px; }
.amb-actions .grow { flex: 1; }
.amb-actions .btn-primary { flex: 1; }

/* ---------- Ficha de posición ---------- */
/* Una sola columna que nunca pasa del ancho de la ficha: lo que no quepa se parte en más líneas, nunca
   se sale por la derecha (sin minmax(0, …), la columna crecía hasta lo más ancho, las pestañas) */
.pp { display: grid; grid-template-columns: minmax(0, 1fr); }
.pp.sold { animation: sold-flash .9s var(--ease); }
@keyframes sold-flash { 25% { box-shadow: inset 0 0 0 2px var(--ok); background: color-mix(in srgb, var(--ok) 6%, transparent); } }
.pp-hero { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 24px; padding: 24px 24px 20px; background: radial-gradient(600px 240px at 0 0, var(--accent-glow), transparent 70%); }
.pp-art { position: relative; align-self: start; border-radius: var(--r-md); transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .35s var(--ease); box-shadow: 0 22px 44px rgba(0, 0, 0, .55); overflow: hidden; }
.pp-art.tilting { transition: transform .06s linear; }
.pp-art img { display: block; width: 100%; aspect-ratio: 63 / 88; object-fit: cover; }
.pp-art.k-sealed { background: radial-gradient(120% 90% at 50% 30%, #fff, #e3e7ef); }
.pp-art.k-sealed img { aspect-ratio: 1; object-fit: contain; mix-blend-mode: multiply; padding: 10px; }
.pp-art .ph { display: block; aspect-ratio: 63 / 88; background: var(--surface-3); }
/* Sin foto (o si no carga): su número, su nombre y por qué, como en su hueco del álbum */
.pp-art .art-ph { display: grid; align-content: center; justify-items: center; gap: 6px; padding: 14px; text-align: center; color: var(--muted); font-size: var(--fs-sm); line-height: 1.3; overflow-wrap: anywhere; }
.pp-art .art-ph b { color: var(--text-2); font-size: var(--fs-md); }
.pp-art .art-ph small { font-size: var(--fs-xs); opacity: .8; }
.pp-art img + .art-ph { display: none; }
.pp-art.img-failed img { display: none; }
.pp-art.img-failed img + .art-ph { display: grid; }
.pp-art .sheen { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, .35), transparent 45%); mix-blend-mode: overlay; opacity: 0; transition: opacity .3s; }
.pp-art.tilting .sheen { opacity: 1; }
.pp-head { display: grid; gap: 12px; align-content: start; min-width: 0; }
.pp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-value { display: grid; gap: 2px; }
.pp-value b { font-family: var(--serif); font-weight: 500; font-variant-numeric: tabular-nums lining-nums; font-size: var(--fs-4xl); font-weight: 400; letter-spacing: -.03em; line-height: 1; }
.pp-value span { color: var(--text-2); font-size: var(--fs-sm); }
.pp-value em { font-style: normal; font-weight: 700; }
/* Las cuatro cifras de la ficha: tira con filetes, como los KPIs */
.pp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-2); overflow: hidden; }
.pp-stats > div { display: grid; gap: 3px; padding: 11px 13px; border-radius: 0; background: transparent; border: 0; box-shadow: -1px 0 0 var(--line), 0 -1px 0 var(--line); min-width: 0; }
.pp-stats span { display: flex; align-items: center; gap: 2px; color: var(--muted); font-size: var(--fs-2xs); font-weight: 600; font-stretch: var(--label-stretch); letter-spacing: var(--label-track); text-transform: uppercase; }
.pp-stats b { font-family: var(--serif); font-weight: 500; font-variant-numeric: tabular-nums lining-nums; font-size: var(--fs-xl); transition: color .2s; }
.pp-stats small { color: var(--muted); font-size: var(--fs-xs); min-height: 15px; }
.pp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.watch-btn.big { width: 36px; height: 36px; border: 1px solid var(--line-2); background: var(--surface-2); }
.watch-btn.big .i { width: 18px; height: 18px; }
.pp-tabs { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; gap: 0 2px; padding: 0 20px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.pp-tabs button { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 14px; border: 0; background: none; color: var(--muted); font-weight: 560; font-size: var(--fs-md); }
.pp-tabs button:hover { color: var(--text); }
.pp-tabs button.on { color: var(--text); }
.pp-tabs button.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); }
.pp-tabs .count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--text-2); font-size: var(--fs-xs); font-weight: 650; display: inline-grid; place-items: center; }
.pp-body { padding: 18px 24px 28px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; animation: rv-in .3s var(--ease); }
.pp-copies { display: grid; gap: 10px; }
.pp-copy { display: grid; gap: 12px; padding: 14px 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--bg-2); transition: border-color .2s; }
.pp-copy:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-glow); }
.ppc-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ppc-src { display: inline-flex; align-items: center; gap: 7px; min-width: 0; font-size: var(--fs-sm); color: var(--text-2); }
.ppc-src .i { width: 15px; height: 15px; color: var(--accent-2); flex: none; }
.ppc-src b { color: var(--text); font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ppc-src small { color: var(--muted); white-space: nowrap; }
.ppc-state { margin-left: auto; font-size: var(--fs-xs); font-weight: 650; }
.ppc-state span { display: inline-flex; align-items: center; gap: 5px; animation: rv-in .2s var(--ease); }
.ppc-state .i { width: 13px; height: 13px; }
.ppc-state .saving { color: var(--muted); }
.ppc-state .saving .i, .i.spin { animation: spin 1s linear infinite; }
.ppc-state .saved { color: var(--ok); }
.ppc-state .err { color: var(--bad); }
.ppc-pnl { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ppc-pnl small { font-size: var(--fs-xs); font-weight: 650; opacity: .85; }
.ppc-fields { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.ppc-field { display: grid; gap: 5px; min-width: 0; }
.ppc-field > span { display: flex; align-items: center; gap: 3px; color: var(--muted); font-size: var(--fs-2xs); font-weight: 600; font-stretch: var(--label-stretch); letter-spacing: var(--label-track); text-transform: uppercase; }
.ppc-ro { height: 36px; display: flex; align-items: center; font-weight: 700; }
.ppc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ppc-actions .grow { flex: 1; }
.pp-sell { display: grid; gap: 16px; }
.sell-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.sell-grid .chips { gap: 6px; }
.sell-sum { display: grid; gap: 8px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--bg-2); border: 1px solid var(--line); }
.ss-row { display: flex; justify-content: space-between; gap: 10px; font-size: var(--fs-md); color: var(--text-2); }
.ss-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.ss-row.strong { padding-top: 7px; border-top: 1px solid var(--line); font-size: var(--fs-lg); }
.ss-row.strong b { font-size: var(--fs-lg); }
.ss-gain { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--surface-2); }
.ss-gain span { color: var(--text-2); font-weight: 650; }
.ss-gain b { font-family: var(--serif); font-weight: 500; font-variant-numeric: tabular-nums lining-nums; font-size: 32px; font-weight: 450; letter-spacing: -.02em; }
.ss-gain em { font-style: normal; font-weight: 650; }
.ss-gain.up { background: color-mix(in srgb, var(--ok) 10%, transparent); }
.ss-gain.up b, .ss-gain.up em { color: var(--ok); }
.ss-gain.down { background: var(--bad-soft); }
.ss-gain.down b, .ss-gain.down em { color: var(--bad); }
.pp-chart { min-height: 320px; }

/* ---------- Modo rápido de precios ---------- */
.dialog.quick-costs { width: min(1000px, calc(100vw - 32px)); }
.quick-costs .dlg-body { padding: 0; }
.qc { display: grid; }
.qc-progress { height: 3px; background: var(--surface-3); }
.qc-progress i { display: block; height: 100%; background: var(--accent); transition: width .4s var(--ease); }
.qc-meta { display: flex; justify-content: space-between; gap: 10px; padding: 10px 24px 0; color: var(--muted); font-size: var(--fs-xs); font-weight: 600; }
.qc-stage { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; align-items: center; padding: 22px 32px 26px; }
.qc-stage.fwd { animation: qc-fwd .35s var(--ease); }
.qc-stage.back { animation: qc-back .35s var(--ease); }
@keyframes qc-fwd { from { opacity: 0; transform: translateX(26px); } }
@keyframes qc-back { from { opacity: 0; transform: translateX(-26px); } }
.qc-art { position: relative; border-radius: var(--r-lg); overflow: hidden; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .35s var(--ease); box-shadow: 0 30px 60px rgba(0, 0, 0, .6); }
.qc-art.tilting { transition: transform .06s linear; }
.qc-art img { display: block; width: 100%; aspect-ratio: 63 / 88; object-fit: cover; }
.qc-art.k-sealed { background: radial-gradient(120% 90% at 50% 30%, #fff, #e3e7ef); }
.qc-art.k-sealed img { aspect-ratio: 1; object-fit: contain; mix-blend-mode: multiply; padding: 16px; }
.qc-art .ph { display: block; aspect-ratio: 63 / 88; background: var(--surface-3); }
.qc-art .sheen { position: absolute; inset: 0; background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, .35), transparent 45%); mix-blend-mode: overlay; opacity: 0; transition: opacity .3s; pointer-events: none; }
.qc-art.tilting .sheen { opacity: 1; }
.qc-form { display: grid; gap: 10px; align-content: center; min-width: 0; }
.qc-form h3 { margin: 0; font-family: var(--serif); font-size: 32px; font-weight: 450; letter-spacing: -.02em; line-height: 1.1; }
.qc-sub { margin: 0; color: var(--text-2); font-size: var(--fs-md); }
.qc-now { color: var(--text-2); font-size: var(--fs-lg); }
.qc-now b { color: var(--accent-2); font-size: var(--fs-lg); }
.qc-label { margin-top: 8px; color: var(--text); font-size: var(--fs-lg); font-weight: 700; }
.qc-label small { color: var(--muted); font-weight: 500; }
.qc-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.qc-date { min-height: 24px; }
.qc-est { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--text-2); font-size: var(--fs-sm); }
.qc-est .i { width: 15px; height: 15px; color: var(--accent-2); }
.qc-est.muted .i { color: var(--muted); }
.qc-foot { display: flex; align-items: center; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--bg-2); }
.qc-foot .grow { flex: 1; }
.qc-foot kbd { margin-left: 4px; background: rgba(0, 0, 0, .18); border-color: rgba(0, 0, 0, .2); color: var(--accent-ink); }
.qc-done { display: grid; justify-items: center; gap: 10px; padding: 56px 24px; text-align: center; animation: rv-in .4s var(--ease); }
.qc-done > .i { width: 56px; height: 56px; padding: 12px; border-radius: 50%; background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); stroke-width: 2.6; animation: bump .6s var(--ease); }
.qc-done h3 { margin: 4px 0 0; font-family: var(--serif); font-size: var(--fs-2xl); font-weight: 500; }
.qc-done p { margin: 0 0 8px; color: var(--text-2); max-width: 440px; line-height: 1.6; }

@media (max-width: 900px) {
  .dialog.add-modal { width: 100vw; height: 100vh; border-radius: 0; }
  .am { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .am-basket { border-left: 0; border-top: 1px solid var(--line); max-height: 46vh; }
  .add-modal .results { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .sb-results { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important; }
  .qc-stage { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px; }
  .qc-art { width: 180px; justify-self: center; }
  .qc-form h3 { font-size: var(--fs-xl); }
  .qc-foot { flex-wrap: wrap; }
}
/* Añadir al Portfolio con poco alto (el móvil, y la tableta en horizontal): se desplaza el diálogo entero,
   el buscador con su alto y debajo lo que añades con su pie; así la fecha y «Guardar» siempre se alcanzan
   (antes quedaban cortados debajo, sin forma de llegar) */
@media (max-width: 700px), (max-width: 900px) and (max-height: 800px) {
  .add-modal .dlg-body { display: block; overflow-y: auto; overscroll-behavior: contain; }
  .add-modal .am { grid-template-rows: auto auto; }
  .add-modal .am-left { height: min(78dvh, 720px); }
  .add-modal .am-basket { max-height: none; }
  .add-modal .amb-items { flex: none; overflow: visible; }
}
/* Las pestañas de añadir (Cartas, Producto sellado, Otra cosa) en el móvil estrecho: en dos líneas si
   hace falta, nunca montadas */
@media (max-width: 520px) {
  .am-tabs .segmented { overflow: visible; }
  .am-tabs .segmented button { flex: 1 1 0; min-width: 0; height: auto; min-height: 40px; padding: 4px 6px; white-space: normal; line-height: 1.15; text-align: center; }
}
@media (max-width: 400px) { .am-tabs .segmented button .i { display: none; } }

/* La ficha en el móvil, compacta; en la tableta (hasta 900 px) tiene el ancho de la del escritorio y va
   como en él: la carta grande al lado de sus cifras */
@media (max-width: 700px) {
  .pp-hero { grid-template-columns: 110px minmax(0, 1fr); gap: 14px; padding: 16px; }
  .pp-value b { font-size: var(--fs-2xl); }
  .pp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-body { padding: 14px 16px 24px; }
  /* Las pestañas, en una sola fila que se desplaza de lado (en dos, «Descripción» se quedaba sola
     debajo): el borde derecho se difumina para que se vea que hay más, y al final solo difumina el
     relleno; la elegida se pone a la vista al pintarlas (revealTab) y la del foco, sola al recibirlo */
  .pp-tabs { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 0 28px 0 8px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .pp-tabs::-webkit-scrollbar { display: none; }
  .pp-tabs button { flex: none; white-space: nowrap; height: 42px; padding: 0 10px; }
  .pp-tabs button:focus-visible { outline-offset: -3px; } /* (la fila recorta lo que sale de ella) */
  .pp-tabs button.on::after { left: 8px; right: 8px; }
  .ppc-fields, .sell-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Ancla invisible del menú del clic derecho */
.ctx-anchor { position: fixed; width: 1px; height: 1px; pointer-events: none; }
.ppc-estbox:empty { display: none; }
.ppc-est { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--text-2); font-size: var(--fs-xs); }
.ppc-est .i { width: 14px; height: 14px; color: var(--accent-2); }

/* ---------- Nuevo binder: formato de página ---------- */
.layouts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.layout-opt { display: grid; justify-items: center; gap: 4px; padding: 14px 10px 12px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--bg-2); color: inherit; text-align: center; transition: border-color .15s, background .15s, transform .15s var(--ease); }
.layout-opt:hover { border-color: var(--muted); transform: translateY(-2px); }
.layout-opt.on { border-color: var(--accent-line); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.layout-opt b { font-family: var(--serif); font-weight: 500; font-variant-numeric: tabular-nums lining-nums; font-size: var(--fs-xl); margin-top: 6px; }
.layout-opt small { color: var(--text-2); font-size: var(--fs-xs); line-height: 1.35; min-height: 31px; }
.layout-opt em { font-style: normal; color: var(--muted); font-size: var(--fs-xs); }
.lay-grid { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; width: 64px; padding: 6px; border-radius: var(--r-md); background: var(--surface-3); }
.lay-grid i { aspect-ratio: 63 / 88; border-radius: 1.5px; background: var(--accent); opacity: .9; }
.layout-opt:not(.on) .lay-grid i { background: var(--surface-4); }
@media (max-width: 700px) { .layouts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Ventana de añadir en pantalla ancha: filtros en columna lateral, como en Cardmarket */
@media (min-width: 1100px) {
  .am-browser.cb-panel { display: grid; grid-template-columns: 300px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .am-browser .catalog-head { grid-column: 1; grid-row: 1 / span 2; overflow-y: auto; align-content: start; border-bottom: 0; border-right: 1px solid var(--line); padding: 16px; }
  .am-browser .result-bar { grid-column: 2; grid-row: 1; }
  .am-browser .results { grid-column: 2; grid-row: 2; min-height: 0; }
  .am-browser .fselects { grid-template-columns: minmax(0, 1fr); }
  .am-browser .fcolors { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.amb-t b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }

/* ---------- Quitar del álbum: guardar fuera o eliminar del todo ---------- */
.remove-choice { width: min(560px, calc(100vw - 32px)); }
.rm-lead { display: flex; align-items: center; gap: 14px; }
.rm-lead p { margin: 0; line-height: 1.55; font-size: var(--fs-md); }
.rm-thumb { flex: none; width: 58px; aspect-ratio: 63 / 88; border-radius: var(--r-xs); overflow: hidden; background: var(--surface-3); box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
.rm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rm-thumbs { display: flex; flex: none; padding-right: 10px; }
.rm-thumbs .rm-thumb { width: 46px; margin-right: -16px; border: 2px solid var(--surface); }
.rm-thumbs .rm-thumb:nth-child(odd) { transform: rotate(-4deg); }
.rm-thumbs .rm-thumb:nth-child(even) { transform: rotate(3deg) translateY(2px); }
.rm-more { align-self: center; margin-left: 22px; font-size: var(--fs-xs); font-weight: 650; color: var(--muted); }
.rm-q { margin: 18px 0 10px; font-size: var(--fs-2xs); font-weight: 600; font-stretch: var(--label-stretch); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--muted); }
.rm-options { display: grid; gap: 10px; }
.rm-opt { display: flex; align-items: flex-start; gap: 14px; width: 100%; padding: 14px 16px; border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); text-align: left; cursor: pointer; transition: border-color .15s, background .15s, transform .15s var(--ease); }
.rm-opt:hover { transform: translateY(-1px); }
.rm-opt:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.rm-ic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r-md); background: var(--surface-3); color: var(--text-2); }
.rm-ic .i { width: 19px; height: 19px; }
.rm-txt { display: grid; gap: 4px; flex: 1; min-width: 0; }
.rm-txt > b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--fs-md); }
.rm-txt > span { font-size: var(--fs-xs); line-height: 1.5; color: var(--text-2); }
.rm-opt kbd { align-self: center; flex: none; }
.rm-opt.park { border-color: color-mix(in srgb, var(--ok) 38%, transparent); background: color-mix(in srgb, var(--ok) 5%, var(--bg-2)); }
.rm-opt.park .rm-ic { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.rm-opt.park:hover { border-color: color-mix(in srgb, var(--ok) 70%, transparent); }
.rm-opt.del:hover { border-color: color-mix(in srgb, var(--bad) 55%, transparent); background: color-mix(in srgb, var(--bad) 6%, var(--bg-2)); }
.rm-opt.del:hover .rm-ic { background: var(--bad-soft); color: var(--bad); }
@media (max-width: 560px) { .rm-opt kbd { display: none; } }

/* Mover a otro álbum */
.mv-dot { flex: none; width: 10px; height: 10px; border-radius: var(--r-xs); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); display: inline-block; }
.mine-move, .ppc-move { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; border-radius: var(--r-lg); background: var(--bg-2); border: 1px dashed var(--line-2); animation: pop-in .18s var(--ease); }
.mine-move > span, .ppc-move > span { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); margin-right: 4px; }
.mine-move[hidden], .ppc-move[hidden] { display: none; }
.mine-move .pill, .ppc-move .pill { color: var(--text); }
.mine-move .pill:hover, .ppc-move .pill:hover { border-color: var(--accent-line); }
.ppc-del:hover { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: var(--bad-soft); }

/* Bandeja de guardadas en el panel del catálogo */
.parked-tray { border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); background: color-mix(in srgb, var(--ok) 5%, transparent); border-radius: var(--r-lg); padding: 8px 10px; }
.parked-tray[hidden] { display: none; }
.pt-head { display: flex; align-items: center; gap: 6px; }
.pt-title { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; padding: 2px 0; border: 0; background: none; color: var(--text); font-size: var(--fs-sm); cursor: pointer; }
.pt-title > .i:first-child { color: var(--ok); width: 16px; height: 16px; }
.pt-title .count { min-width: 20px; height: 18px; padding: 0 6px; border-radius: var(--r-md); display: inline-grid; place-items: center; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); font-size: var(--fs-xs); font-weight: 700; }
.pt-chev { margin-left: auto; width: 15px; height: 15px; color: var(--muted); transition: transform .2s var(--ease); }
.parked-tray.open .pt-chev { transform: rotate(90deg); }
.pt-list { display: none; gap: 8px; overflow-x: auto; padding: 10px 2px 4px; scrollbar-width: thin; }
.parked-tray.open .pt-list { display: flex; }
.pt-card { flex: none; width: 54px; aspect-ratio: 63 / 88; padding: 0; border: 0; border-radius: var(--r-xs); overflow: hidden; background: var(--surface-3); cursor: grab; box-shadow: 0 4px 10px rgba(0, 0, 0, .3); transition: transform .15s var(--ease), box-shadow .15s; }
.pt-card:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 10px 20px rgba(0, 0, 0, .4), 0 0 0 2px color-mix(in srgb, var(--ok) 60%, transparent); }
.pt-card:active { cursor: grabbing; }
.pt-card img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.pt-card .ph { display: grid; place-items: center; height: 100%; font-size: var(--fs-2xs); color: var(--muted); padding: 4px; text-align: center; }

/* Idioma de una copia (si no es el de por defecto): «JP». Con raya dorada, la imagen aún es la del
   idioma por defecto. En el hueco del álbum, su tamaño va con la carta (binder.css). */
.lang-tag { display: inline-grid; place-items: center; min-width: 20px; height: 16px; padding: 0 4px; border-radius: 4px; background: rgba(8, 10, 15, .82); color: #fff; font-size: 10px; font-weight: 650; letter-spacing: .04em; line-height: 1; box-shadow: 0 0 0 1px rgba(255, 255, 255, .5); }
.lang-tag.img-fallback { box-shadow: 0 0 0 1px rgba(255, 255, 255, .5), inset 0 -2px 0 var(--accent); }
.lang-tag.inline { margin-left: 6px; vertical-align: 1px; }
.pt-card { position: relative; }
.pt-card .lang-tag { position: absolute; left: 3px; bottom: 3px; }
.tag.lang-chip, .tagx.lang-chip { background: #1b2b4a; color: #d4e3ff; box-shadow: inset 0 0 0 1px rgba(150, 185, 255, .35); }
.tag.lang-chip.img-fallback, .tagx.lang-chip.img-fallback { box-shadow: inset 0 0 0 1px rgba(150, 185, 255, .35), inset 0 -2px 0 var(--accent); }
/* Selector del idioma de la copia (ficha) y marca en las miniaturas del catálogo */
.lang-pick { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 2px 0 10px; }
.lang-pick .lp-label { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.thumb > .lang-tag { position: absolute; left: 5px; bottom: 5px; z-index: 2; }
.sealed-lang { margin-left: 6px; vertical-align: 1px; }

/* Filtros puestos, visibles con el panel plegado */
.factive { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.filters-toggle:not(.collapsed) .factive { display: none; }
.fact { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 6px 0 9px; border-radius: var(--r-sm); border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--text); font-size: var(--fs-xs); font-weight: 700; cursor: pointer; }
.fact .i { width: 11px; height: 11px; opacity: .7; }
.fact:hover { border-color: var(--accent); }
.fact:hover .i { opacity: 1; }

/* ---------- Sistema de diseño: chips y etiquetas ----------
   Un solo aspecto para todo lo que se elige (filtros, atajos, tipos, rarezas, años, álbumes): esquina
   fina, borde sutil sin elegir y, al elegirlo, el tinte y el borde del acento del juego. Y una sola forma para las
   etiquetas fijas (rareza, origen, versión, estado). Los colores de cada familia se mantienen. */
.pill, .fchip, .preset, .chip:not(.color-chip) {
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 560;
  border-radius: var(--r-sm);
  box-shadow: none;
  transition: border-color .15s, background .15s, color .15s, transform .12s;
}
.pill:hover, .fchip:hover, .preset:hover, .chip:not(.color-chip):hover { color: var(--text); border-color: var(--line-3); background: rgba(255, 255, 255, .025); }
.pill:active, .fchip:active, .preset:active, .chip:not(.color-chip):active { transform: scale(.97); }
.pill.on, .fchip.on, .preset.on, .chip.on:not(.color-chip), .fcolor.on, .show-check.on {
  color: var(--text);
  background: var(--accent-soft);
  border-color: var(--accent-line);
  box-shadow: none;
}
.preset { height: 30px; padding: 0 12px; }
.fchip { min-height: 32px; }
.chip:not(.color-chip) { height: 30px; padding: 0 12px; }
.pill .dot, .fchip .rdot { flex: none; }

.tagx, .tier-chip, .src-chip, .tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 21px;
  padding: 0 7px;
  border-radius: var(--r-xs);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
}

/* ---------- Ficha única de carta (álbum, catálogo, Radar, Mi lista y portfolio: card-dialog.js) ----------
   En el escritorio, la carta grande a la izquierda y siempre a la vista; a su lado, el valor, las cifras y
   las pestañas. En la tableta, la carta al lado de sus cifras; en el móvil, encima de todo. Se llama
   cd-sheet: «sheet» es la hoja del binder (binder.css), y se le pegaban sus estilos. */
.dialog.drawer.cd-sheet { width: min(860px, 100vw); }
.cd-sheet .dlg-body { padding: 0; }
/* Al cambiar entre pestañas que pinta otro módulo, sin animación de entrada: parece la misma ficha */
.dialog.drawer.swap[open] { animation: none; }
.cd-sheet .dlg-head { align-items: flex-start; }
.cd-sheet .dlg-head h2 { min-width: 0; overflow-wrap: anywhere; }
.cd-loc { display: flex; align-items: center; gap: 6px; margin-top: 7px; color: var(--text-2); font-family: var(--font); font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0; }
.cd-loc .i { flex: none; width: 13px; height: 13px; color: var(--muted); }
.cd-nav { display: flex; gap: 2px; }
.cd-nav .btn:disabled { opacity: .35; cursor: default; }
.cd-sheet .pp-body > .cd-panel, .cd-sheet .pp-body > .cd-chart { padding: 4px 0 8px; }
.sheet-summary { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.sheet-summary .mine, .sheet-summary .where, .sheet-summary .versions { margin: 0; }
.cd-sheet .pp-tags.detail-tags { flex-wrap: wrap; gap: 6px; }
.cd-sheet .pp-stats small a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 3px; }
.cd-sheet .pp-stats small a:hover { color: var(--accent-2); }
.cd-sheet .pp-stats small a .i { width: 11px; height: 11px; }

/* La carta y, debajo, «Ver en grande» (card-zoom.js): pulsar la carta también la amplía */
.pp-artbox { display: grid; gap: 10px; justify-items: center; align-self: start; min-width: 0; }
.pp-artbox > .pp-art { width: 100%; }
.pp-art.zoomable { cursor: zoom-in; }
.pp-art.img-failed { background: var(--surface-3); cursor: default; }
.pp-art.img-failed + .pp-zoom { display: none; }
.pp-zoom { color: var(--text-2); }
/* Las tiendas de la carta o del producto (shop-links.js), en la fila de acciones */
.shop-link .i { width: 13px; height: 13px; margin-left: 2px; color: var(--muted); }
.shop-link:hover .i { color: inherit; }
.pp-zoom:hover { color: var(--text); }

/* Tu carta: si la tienes, arriba; sus datos, en una rejilla; lo que se hace con ella, abajo */
.cd-sheet .mine { gap: 18px; padding: 18px 20px 16px; border-radius: var(--r-xl); }
.cd-sheet .mine-head { flex-wrap: wrap; gap: 10px 16px; }
.cd-sheet .own-toggle { display: inline-grid; grid-template-columns: auto auto; }
.cd-sheet .own-toggle button { height: 32px; padding: 0 14px; font-size: var(--fs-sm); }
.cd-sheet .own-toggle button .i { width: 15px; height: 15px; }
.cd-sheet .own-toggle .on.owned { background: var(--ok-soft); color: var(--ok-2); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 50%, transparent); }
.cd-sheet .own-toggle .on.missing { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.mine-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 12px; align-items: start; }
.mine-grid .mine-wide { grid-column: 1 / -1; }
.mine-grid textarea.input { height: auto; min-height: 64px; padding: 9px 11px; line-height: 1.45; resize: vertical; }
.mine-grid .lang-pick { display: grid; gap: 6px; margin: 0; }
.mine-grid .lang-pick .lp-label { font-weight: 550; }
.mine-grid .lang-pick .segmented { justify-self: start; }
.mine-grid .lang-pick .segmented button { height: 30px; }
.cd-sheet .mine details.adv summary { min-height: 28px; }
.mine-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.mine-actions .btn-danger { margin-left: auto; }

/* Sin hueco (desde el catálogo): en qué idioma verla y ponerla en el binder */
.cd-add { display: grid; gap: 14px; padding: 16px 20px; border-radius: var(--r-xl); background: var(--bg-2); border: 1px solid var(--line); }
.cd-add .lang-pick { margin: 0; }
.cd-add-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cd-note { display: flex; align-items: flex-start; gap: 8px; }
.cd-note .i { flex: none; width: 14px; height: 14px; margin-top: 2px; }

@media (min-width: 1100px) {
  .dialog.drawer.cd-sheet { width: min(1180px, 94vw); }
  .cd-sheet .pp {
    --cd-art: clamp(260px, min(28vw, calc((100vh - 150px) * 63 / 88)), 400px);
    --cd-art: clamp(260px, min(28vw, calc((100dvh - 150px) * 63 / 88)), 400px);
    grid-template-columns: var(--cd-art) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    column-gap: 32px;
    padding-left: 28px;
    background: radial-gradient(700px 320px at 0 0, var(--accent-glow), transparent 70%);
  }
  .cd-sheet .pp-hero { display: contents; }
  .cd-sheet .pp-artbox { grid-column: 1; grid-row: 1 / -1; position: sticky; top: 24px; margin: 24px 0 28px; }
  .cd-sheet .pp-head { grid-column: 2; padding: 26px 28px 22px 0; }
  .cd-sheet .pp-tabs { grid-column: 2; margin-left: -14px; padding: 0 28px 0 0; }
  .cd-sheet .pp-body { grid-column: 2; padding: 22px 28px 36px 0; }
}
@media (min-width: 701px) and (max-width: 1099px) {
  .cd-sheet .pp-hero { grid-template-columns: 220px minmax(0, 1fr); }
  /* Al lado de la carta caben dos cifras por fila: en cuatro, «60.500,00 $» se partía */
  .cd-sheet .pp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  dialog.cd-sheet .pp-hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "art" "tags" "value" "stats" "act"; }
  dialog.cd-sheet .pp-artbox { grid-area: art; justify-self: center; width: min(58vw, 250px); }
  .cd-sheet .mine { padding: 16px 14px 14px; }
  .mine-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cd-add { padding: 14px; }
}
/* Las cartas holográficas conservan su brillo en la cabecera */
.pp-art.holo::after { content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: .14; background: repeating-linear-gradient(115deg, #ff0084 0%, #fca400 8%, #ffff00 16%, #00ff8a 24%, #00cfff 32%, #cc4cfa 40%, #ff0084 48%); background-size: 300% 300%; background-position: var(--mx, 50%) var(--my, 50%); transition: opacity .3s; }
.pp-art.holo:hover::after { opacity: .22; }
