/* Estilos de la app. Salieron de los tres bloques <style> que tenia index.html (8.10.0). */
:root{--bg:#0b0d12;--panel:#131722;--panel2:#191e2b;--text:#f4f6fb;--muted:#9299aa;--accent:#ffb52e;--green:#39d98a;--yellow:#ffd166;--blue:#5ca8ff;--red:#ff6378;--border:#252c3b}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at 20% -10%,#252033 0,#0b0d12 40%);color:var(--text);font-family:Inter,Segoe UI,Arial,sans-serif}
header{padding:28px 34px 18px;display:flex;align-items:center;justify-content:space-between;gap:20px;position:sticky;top:0;background:rgba(11,13,18,.88);backdrop-filter:blur(18px);z-index:5;border-bottom:1px solid var(--border)}
.brand{display:flex;align-items:center;gap:14px}.logo{width:46px;height:46px;border-radius:14px;background:linear-gradient(135deg,#ffcf55,#ff7a18);display:grid;place-items:center;color:#111;font-weight:900;font-size:21px;box-shadow:0 10px 30px #ff9a2b33}.brand h1{font-size:20px;margin:0}.brand small{color:var(--muted)}
button{border:0;border-radius:11px;padding:11px 16px;background:var(--panel2);color:var(--text);cursor:pointer;font-weight:700}button:hover{filter:brightness(1.15)}.primary{background:linear-gradient(135deg,#ffca4d,#ff8b24);color:#17110a}
main{max-width:1400px;margin:auto;padding:26px 34px 60px}.stats{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-bottom:22px}.stat{background:linear-gradient(145deg,#151a25,#10141d);border:1px solid var(--border);border-radius:17px;padding:17px}.stat b{font-size:27px;display:block;margin-top:7px}.stat span{color:var(--muted);font-size:12px}.stat{cursor:pointer;transition:.16s;user-select:none}.stat:hover{transform:translateY(-2px);border-color:#4a5367;box-shadow:0 10px 25px #0004}.stat.active{border-color:#ffb52e;box-shadow:0 0 0 1px #ffb52e44,0 10px 25px #0004}.stat.purchase-stat{background:linear-gradient(145deg,#1d1a14,#15120e)}.stat.purchase-stat:hover{border-color:#ffb52e}.receipt{width:min(620px,94vw)}.receipt-paper{background:#f4f0e7;color:#171717;border-radius:12px;padding:22px 20px;box-shadow:inset 0 0 0 1px #d5cdbd}.receipt-head{text-align:center;border-bottom:2px dashed #aaa08e;padding-bottom:13px;margin-bottom:10px}.receipt-head h2{margin:0 0 5px;color:#171717}.receipt-head div{font-size:12px;color:#666}.receipt-row{display:flex;justify-content:space-between;gap:16px;padding:9px 0;border-bottom:1px dashed #c9c1b2;font-size:13px}.receipt-row .receipt-name{flex:1;min-width:0}.receipt-row .receipt-value{font-weight:800;white-space:nowrap}.receipt-total{display:flex;justify-content:space-between;gap:16px;padding-top:15px;margin-top:5px;font-size:18px;font-weight:900}.receipt-empty{text-align:center;padding:24px;color:#666}
.toolbar{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}.search{flex:1;min-width:240px;background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:13px 15px;color:white;outline:none}.filters{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:25px}.filter{border:1px solid var(--border)}.filter.active{background:#292e3a;outline:1px solid #555b69}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:18px}.card{background:linear-gradient(160deg,#171c28,#10141c);border:1px solid var(--border);border-radius:18px;overflow:hidden;transition:.18s;cursor:pointer}.card:hover{transform:translateY(-3px);border-color:#414a5d;box-shadow:0 15px 35px #0006}.pic{height:265px;background:#0e1118;display:grid;place-items:center;overflow:hidden}.pic img{width:100%;height:100%;object-fit:contain}.placeholder{font-size:48px;opacity:.2}.info{padding:14px}.name{font-weight:800;font-size:16px;margin-bottom:6px}.meta{color:var(--muted);font-size:12px}.row{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:12px}.badge{font-size:11px;font-weight:800;padding:6px 8px;border-radius:999px}.green{background:#39d98a18;color:var(--green)}.yellow{background:#ffd16618;color:var(--yellow)}.blue{background:#5ca8ff18;color:var(--blue)}.red{background:#ff637818;color:var(--red)}.gray{background:#ffffff0d;color:#b9bfcc}
/* Catálogo: tarjetas más compactas, imágenes cuadradas y botones alineados */
.wishlist-btn{width:42px!important;min-width:42px!important;padding:0!important;font-size:19px!important;line-height:1;border:1px solid #4a5163!important;background:#161c28!important;color:#ff5d8f!important;box-shadow:none!important}.wishlist-btn:hover{background:#261725!important;border-color:#ff5d8f!important}.catalog-actions{display:grid;grid-template-columns:1fr 42px;gap:7px;align-items:stretch}.catalog-actions .primary{width:100%}.wishlist-btn.active{background:#ff5d8f!important;color:#fff!important;border-color:#ff5d8f!important}.badge.pink{background:linear-gradient(135deg,#5b214f,#8e3d73);color:#ffc7e1;border:1px solid #c45a9a;box-shadow:0 3px 10px #8e3d7333}
.catalog-card{display:flex;flex-direction:column;cursor:default}.catalog-card .photo{flex:0 0 auto;aspect-ratio:1/1;height:auto;background:#0d1118}.catalog-card .photo img{width:100%;height:100%;object-fit:contain;object-position:center;display:block}.catalog-card .cardbody{display:flex;flex-direction:column;flex:1;padding:12px 13px 13px}.catalog-card .cardbody h3{font-size:15px;line-height:1.2;min-height:38px;margin:8px 0 5px}.catalog-card .cardbody>.muted{min-height:18px}.catalog-card .catalog-add{margin-top:auto}.catalog-card .catalog-add button{width:100%;padding:11px 12px} 

dialog{width:min(1120px,94vw);max-height:94vh;background:#121722;color:white;border:1px solid var(--border);border-radius:20px;padding:0;box-shadow:0 30px 100px #000b}dialog::backdrop{background:#0009;backdrop-filter:blur(4px)}.modal{padding:24px}.modal h2{margin-top:0}.form{display:grid;grid-template-columns:1fr 1fr;gap:13px}.field{display:flex;flex-direction:column;gap:6px}.field.full{grid-column:1/-1}.field label{font-size:12px;color:var(--muted)}input,select,textarea{background:#0d1119;border:1px solid var(--border);border-radius:10px;padding:11px;color:white;outline:none}textarea{min-height:70px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.preview{height:180px;border:1px dashed #394154;border-radius:12px;display:grid;place-items:center;overflow:hidden;background:#0c0f15}.preview img{width:100%;height:100%;object-fit:contain}.empty{padding:70px;text-align:center;color:var(--muted);border:1px dashed var(--border);border-radius:18px;grid-column:1/-1}
.catalog-note{background:#10151f;border:1px solid var(--border);border-radius:14px;padding:14px 16px;color:#b8bfcc;margin-bottom:18px;font-size:13px;line-height:1.5}
@media(max-width:1100px){.stats{grid-template-columns:repeat(3,1fr)}}@media(max-width:800px){header{padding:20px}.stats{grid-template-columns:repeat(2,1fr)}main{padding:20px}.form{grid-template-columns:1fr}.field.full{grid-column:auto}}
.view-switch{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.view-switch span{font-size:12px;color:var(--muted);margin-right:2px}.view-switch button{padding:9px 11px}.view-switch button.active{background:#ffb52e;color:#17110a}.uploadBtn{display:inline-flex;align-items:center;gap:7px;padding:10px 13px;background:var(--panel2);border:1px solid var(--border);border-radius:11px;cursor:pointer;font-weight:700}.identify-preview{height:240px;border:1px dashed #394154;border-radius:14px;display:grid;place-items:center;overflow:hidden;background:#0c0f15}.identify-preview img{width:100%;height:100%;object-fit:contain}.candidate-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:12px}.candidate{background:#111620;border:1px solid var(--border);border-radius:13px;padding:10px;cursor:pointer}.candidate:hover{border-color:#ffb52e}.candidate .mini{height:120px;display:grid;place-items:center;background:#0b0e14;border-radius:9px;overflow:hidden}.candidate img{max-width:100%;max-height:100%;object-fit:contain}.size-small .grid{grid-template-columns:repeat(auto-fill,minmax(145px,1fr))}.size-small .pic{height:145px}.size-small .name{font-size:13px}.size-small .catalog-card .photo{aspect-ratio:1/1}.size-small .catalog-card .cardbody{padding:9px}.size-small .catalog-card .cardbody h3{font-size:13px;min-height:32px}.size-small .catalog-card .catalog-add button{padding:9px 8px;font-size:12px}.size-medium .grid{grid-template-columns:repeat(auto-fill,minmax(205px,1fr))}.size-medium .pic{height:215px}.size-medium .catalog-card .cardbody h3{font-size:15px;min-height:38px}.size-large .grid{grid-template-columns:repeat(auto-fill,minmax(285px,1fr))}.size-large .pic,.size-large .photo{height:300px}.size-large .catalog-card .cardbody h3{font-size:17px;min-height:42px}.size-medium .photo{height:215px}.size-small .photo{height:145px}.photo{height:265px;background:#0e1118;display:grid;place-items:center;overflow:hidden}.photo img{width:100%;height:100%;object-fit:contain;object-position:center;transform:none}.franchise-tag{font-size:10px;color:#ffcf70;margin-bottom:5px;font-weight:800}@media(max-width:700px){.candidate-grid{grid-template-columns:1fr 1fr}.size-large .grid{grid-template-columns:repeat(2,1fr)}.size-medium .grid{grid-template-columns:repeat(2,1fr)}.size-medium .pic{height:180px}.size-medium .catalog-card .photo{aspect-ratio:1/1}.size-small .grid{grid-template-columns:repeat(3,1fr)}.size-small .pic{height:120px}.size-small .catalog-card .cardbody{padding:7px}.size-small .catalog-card .cardbody h3{font-size:12px;min-height:30px}.size-medium .catalog-card .cardbody h3{font-size:13px;min-height:34px}.catalog-card .cardbody .muted{font-size:11px}}

.card{height:100%}.info{display:flex;flex-direction:column;min-height:0}.collection-card-actions{display:flex;gap:8px;margin-top:auto;align-items:stretch;padding-top:12px}.collection-card-actions .modify-btn{flex:1}.collection-card-actions .delete-btn{flex:0 0 42px;padding:8px 7px;font-size:12px;background:#2a1720;color:#ff7185;border:1px solid #5a2634}.collection-card-actions .delete-btn:hover{background:#3a1b27}.detail-readonly{color:#dfe3ec}.detail-readonly .detail-section{background:#0f141d;border:1px solid var(--border);border-radius:14px;padding:14px;margin-top:14px}.detail-readonly .detail-section h3{margin:0 0 10px;font-size:14px;color:#ffcf70}.add-layout{display:grid;grid-template-columns:minmax(420px,43%) minmax(0,57%);gap:24px;align-items:stretch}.add-hero{min-height:540px;background:#0b0f16;border:1px solid var(--border);border-radius:16px;display:flex;align-items:center;justify-content:center;overflow:hidden;padding:8px;box-sizing:border-box}.add-hero img{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;object-position:center;flex:0 0 auto}.add-layout form{display:grid;grid-template-columns:1fr 1fr;gap:11px}.add-layout form .field.full{grid-column:1/-1}.provider-list{display:flex;flex-direction:column;gap:8px;max-height:320px;overflow:auto}.provider-item{display:flex;justify-content:space-between;align-items:center;gap:10px;background:#0f141d;border:1px solid var(--border);padding:10px 12px;border-radius:10px}.provider-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.provider-actions button{padding:7px 10px}.provider-actions .provider-delete{background:#2a1720;color:#ff7185;border-color:#5a2634}.detail-layout{display:grid;grid-template-columns:minmax(220px,360px) 1fr;gap:22px;align-items:start}.detail-img{width:100%;max-height:460px;object-fit:contain;background:#0d1118;border-radius:14px}.gallery-box{display:flex;flex-direction:column;gap:10px}.gallery-main{width:100%;height:460px;object-fit:contain;background:#0d1118;border-radius:14px;cursor:zoom-in}.gallery-thumbs{display:flex;gap:8px;flex-wrap:wrap}.gallery-thumb{width:72px;height:72px;object-fit:contain;background:#0d1118;border:1px solid var(--border);border-radius:9px;padding:3px;cursor:pointer}.gallery-thumb.active{outline:2px solid #ffcf70;border-color:#ffcf70}.gallery-count{font-size:12px;color:var(--muted)}.muted{color:var(--muted)}body[data-view="small"] .grid{grid-template-columns:repeat(auto-fill,minmax(170px,1fr))}body[data-view="large"] .grid{grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}@media(max-width:700px){dialog{width:96vw;max-height:94vh;border-radius:16px}.modal{padding:14px}.modal h2{font-size:20px;margin-bottom:10px}.detail-layout{grid-template-columns:1fr}.gallery-main{height:360px}.gallery-thumb{width:62px;height:62px}.add-layout{grid-template-columns:1fr;gap:10px}.add-hero{min-height:145px;height:145px;padding:5px;border-radius:12px}.add-hero img{width:100%;height:100%;max-height:145px;object-fit:contain}.add-layout form{grid-template-columns:1fr 1fr;gap:7px}.add-layout .field.full{grid-column:1/-1}.add-layout .field label{font-size:10px}.add-layout input,.add-layout select,.add-layout textarea{padding:8px;font-size:12px;border-radius:8px}.add-layout textarea{min-height:48px}.modal-actions{margin-top:10px}.modal-actions button{padding:9px 12px}.photo{height:190px}.size-small .photo{height:125px}.size-medium .photo{height:185px}.size-large .photo{height:230px}}

/* AJUSTE FINAL: tarjetas compactas + ficha de colección con imagen grande */
.catalog-card{height:100%;min-height:0}
.catalog-card .photo{aspect-ratio:1/1;height:auto;min-height:0}
.catalog-card .photo img{object-fit:contain;object-position:center}
.catalog-card .cardbody{min-height:168px;padding:12px 13px 13px}
.catalog-card .cardbody h3{margin:8px 0 8px;min-height:42px}
.catalog-card .cardbody>.muted{min-height:30px;padding-bottom:8px;line-height:1.35}
.catalog-card .catalog-add{margin-top:auto;padding-top:4px}
.catalog-card .catalog-add button{min-height:42px}

/* Mi colección: tamaños realmente distintos y tarjetas más compactas */
body[data-view="small"] .grid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px}
body[data-view="small"] .card .pic{height:180px}
body[data-view="small"] .card .info{padding:11px}
body[data-view="small"] .card .name{font-size:13px;line-height:1.25}
body[data-view="small"] .card .meta{font-size:11px}
body[data-view="small"] .collection-card-actions{gap:5px;margin-top:auto;padding-top:8px;height:34px;min-height:34px}
body[data-view="small"] .collection-card-actions .modify-btn{padding:7px 5px;font-size:10px}
body[data-view="small"] .collection-card-actions .delete-btn{flex-basis:34px;padding:7px 4px;font-size:10px}
body[data-view="medium"] .grid{grid-template-columns:repeat(auto-fill,minmax(205px,1fr));gap:16px}
body[data-view="medium"] .card .pic{height:190px}
body[data-view="medium"] .card .info{padding:11px}
body[data-view="large"] .grid{grid-template-columns:repeat(auto-fill,minmax(285px,1fr));gap:18px}
body[data-view="large"] .card .pic{height:270px}

/* Ficha de Mi colección: mismo lenguaje visual que Agregar, imagen grande a la izquierda */
.detail-layout.collection-detail-layout{grid-template-columns:minmax(420px,45%) minmax(0,55%);gap:24px;align-items:stretch}
.collection-detail-layout .detail-image-wrap{min-height:500px;background:#0b0f16;border:1px solid var(--border);border-radius:16px;display:flex;align-items:center;justify-content:center;overflow:hidden;padding:8px}
.collection-detail-layout .detail-img{width:100%;height:100%;max-height:520px;object-fit:contain;object-position:center;border-radius:10px;background:#0d1118}
@media(max-width:700px){
  .catalog-card .cardbody{min-height:154px;padding:9px}
  .catalog-card .cardbody h3{font-size:13px;min-height:38px}
  .catalog-card .cardbody>.muted{font-size:11px;min-height:34px;padding-bottom:8px}
  .catalog-card .catalog-add button{min-height:38px;padding:8px}
  body[data-view="small"] .grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
  body[data-view="small"] .card .pic{height:150px}
  body[data-view="medium"] .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  body[data-view="medium"] .card .pic{height:170px}
  body[data-view="large"] .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
  body[data-view="large"] .card .pic{height:215px}
  .detail-layout.collection-detail-layout{grid-template-columns:1fr;gap:12px}
  .collection-detail-layout .detail-image-wrap{min-height:210px;height:210px}
  .collection-detail-layout .detail-img{max-height:200px}
}


/* V3 — Mi colección: tarjetas de una misma fila con altura uniforme y botones alineados */
#grid{align-items:stretch;}
#grid > .card{align-self:stretch;height:auto;min-height:0;display:flex;flex-direction:column;}
#grid > .card > .pic{flex:0 0 auto;}
#grid > .card > .info{flex:1 1 auto;display:flex;flex-direction:column;min-height:0;}
#grid > .card .collection-card-actions{margin-top:auto;min-height:42px;height:42px;box-sizing:border-box;}
#grid > .card .collection-card-actions .modify-btn,
#grid > .card .collection-card-actions .delete-btn{height:42px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;}
/* ❤️ Lo quiero — violeta/fucsia, claramente distinto del rojo de No las tengo */
.badge.pink{background:#7c3aed!important;color:#fff!important;border:1px solid #a78bfa!important;box-shadow:0 4px 12px #7c3aed55!important;}
.filter.filter-wanted{background:#3b1f62!important;border-color:#8b5cf6!important;color:#e9d5ff!important;}
.filter.filter-wanted.active{background:#7c3aed!important;color:#fff!important;outline:1px solid #c4b5fd!important;}
/* Link a la ficha de la figura en listacompletade.com (siteLinkMarkup): color de acento para
   que se lea sobre el fondo oscuro; sin recuadro de foco cuando el diálogo se abre con el mouse. */
.site-link{color:var(--accent);text-decoration:none;font-weight:600}
.site-link:hover{text-decoration:underline}
.site-link:focus:not(:focus-visible){outline:none}
/* V6 — catálogo oficial: vista pequeña más ancha y proporcionada */
body[data-view="small"] #catalogGrid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px}
body[data-view="small"] #catalogGrid .catalog-card .photo{aspect-ratio:1/1;height:auto;min-height:0}
body[data-view="small"] #catalogGrid .catalog-card .cardbody{min-height:150px;padding:10px 11px 11px}
body[data-view="small"] #catalogGrid .catalog-card .cardbody h3{font-size:14px;line-height:1.22;min-height:36px;margin:7px 0 6px}
body[data-view="small"] #catalogGrid .catalog-card .cardbody>.muted{font-size:11px;min-height:28px;padding-bottom:5px;line-height:1.3}
body[data-view="small"] #catalogGrid .catalog-card .catalog-add button{min-height:40px;padding:9px 8px}
@media(max-width:700px){body[data-view="small"] #catalogGrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}}
/* Vistas por tamano: las pequenas realmente pequenas y las medianas claramente mayores. */
/* Vista pequeña: realmente compacta y con más columnas que mediana */
body[data-view="small"] .grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
body[data-view="small"] .card .pic{height:150px}
body[data-view="small"] .card .info{padding:9px}
body[data-view="small"] .card .name{font-size:12px;line-height:1.2}
body[data-view="small"] .card .meta{font-size:10px}
body[data-view="small"] .collection-card-actions{gap:4px;padding-top:6px;height:30px;min-height:30px}
body[data-view="small"] .collection-card-actions .modify-btn{padding:6px 4px;font-size:9px}
body[data-view="small"] .collection-card-actions .delete-btn{flex-basis:30px;padding:6px 3px;font-size:9px}

body[data-view="small"] #catalogGrid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
body[data-view="small"] #catalogGrid .catalog-card .photo{aspect-ratio:1/1;height:auto;min-height:0}
body[data-view="small"] #catalogGrid .catalog-card .cardbody{min-height:128px;padding:8px}
body[data-view="small"] #catalogGrid .catalog-card .cardbody h3{font-size:12px;line-height:1.18;min-height:30px;margin:5px 0 4px}
body[data-view="small"] #catalogGrid .catalog-card .cardbody>.muted{font-size:10px;min-height:24px;padding-bottom:4px;line-height:1.2}
body[data-view="small"] #catalogGrid .catalog-card .catalog-add button{min-height:34px;padding:7px 5px;font-size:10px}
body[data-view="small"] #catalogGrid .catalog-actions{grid-template-columns:1fr 30px;gap:5px}
body[data-view="small"] #catalogGrid .wishlist-btn{width:30px!important;min-width:30px!important;font-size:15px!important}

/* Mediana queda claramente más grande */
body[data-view="medium"] .grid{grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:16px}
body[data-view="medium"] .card .pic{height:205px}
body[data-view="medium"] #catalogGrid{grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:16px}
body[data-view="medium"] #catalogGrid .catalog-card .photo{aspect-ratio:1/1;height:auto}

@media(max-width:700px){
  body[data-view="small"] .grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  body[data-view="small"] .card .pic{height:auto;aspect-ratio:1/1}
  body[data-view="small"] #catalogGrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  body[data-view="medium"] .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  body[data-view="medium"] .card .pic{height:180px}
  body[data-view="medium"] #catalogGrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
}
