/* Progresión y economía */
.lvtag { color: var(--gold); font-size: .9em; }
.tile-wide { grid-column: span 2; }
.tile-shop { background: linear-gradient(135deg, #1f3a30, var(--panel)); }
.eco-stats { margin: 12px 0; }
.eco-stats .stat em { color: var(--good); font-style: normal; margin-left: 6px; }
.eco-drop { display: inline-flex; align-items: center; gap: 4px; }
.eco-drop .ico { width: 16px; height: 16px; }
.quest { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.quest-body { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 13px; }
.quest-body b { font-size: 14px; }
.quest.got { opacity: .55; }
.quest.chest { border-bottom: 0; border-top: 1px dashed var(--gold); margin-top: 6px; }
.exp-big { display: flex; flex-direction: column; gap: 4px; margin: 12px 0; font-size: 15px; }
.exp-big b { font-size: 24px; font-family: var(--serif); color: var(--gold); margin: 0 4px; }
.exp-time { margin-top: 6px; font-size: 12px; }
.shop-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; }
.shop-hero { width: 56px; flex: none; aspect-ratio: 5 / 6; border-radius: 8px; overflow: hidden; border: 2px solid var(--ssr); }
.shop-hero.r-R { border-color: var(--r); }
.shop-hero.r-SR { border-color: var(--sr); }
.shop-hero .portrait { width: 100%; height: 100%; display: block; }
.shop-hero-info { flex: 1; font-size: 14px; }
.shop .item .btn { flex: none; }
.quest-body .bar { width: 100%; }

/* ---------- Íconos de objetos (imágenes) ---------- */
.item-img, .rw-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.drop-img { width: 18px; height: 18px; object-fit: contain; vertical-align: -4px; margin-right: 3px; }
.drop-img.sm { width: 14px; height: 14px; vertical-align: -2px; margin-right: 1px; }
.drop-img.lg { width: 100%; height: 100%; margin: 0; vertical-align: 0; }
.eco-drop .drop-img { width: 20px; height: 20px; }
.item-ico { position: relative; width: 52px; height: 52px; padding: 3px; }
.slot-ico { position: relative; padding: 2px; display: block; }
.slot-ico.empty .item-img { opacity: .22; filter: grayscale(1); }
.lvbadge { position: absolute; right: -3px; bottom: -3px; padding: 0 4px; font-size: 10px; line-height: 15px; border-radius: 6px; background: #0b0911; color: var(--gold); border: 1px solid var(--gold-dark); }
.item-meta { font-size: 11px; color: var(--muted); }
.item-side { flex: none; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; min-width: 52px; }
.item-name .lock { width: 13px; height: 13px; margin-left: 4px; vertical-align: -2px; }
.lack { color: var(--bad); }
.ico.big { width: 100%; height: 100%; }
.warn { color: var(--bad); margin: 8px 0; }

/* Dueño del objeto y diferencias */
.owner-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 2px 9px 2px 3px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #ffd9a0; background: #4a2c0d; border: 1px solid #d98a2b; }
.owner-face { width: 24px; height: 24px; border-radius: 50%; overflow: hidden; flex: none; border: 1px solid #d98a2b; background: #0b0911; }
.owner-face svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.owner-face.big { width: 44px; height: 44px; }
.item.taken { border-left: 4px solid #d98a2b; background: linear-gradient(90deg, #2c1d10, var(--panel) 60%); }
.diffs { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 2px; font-size: 12px; font-weight: 600; }
.d.up { color: var(--good); }
.d.down { color: var(--bad); }
.d { color: var(--muted); }
.gain { font-size: 15px; color: var(--muted); }
.gain.up { color: var(--good); }
.gain.down { color: var(--bad); }
.best-tag { font-style: normal; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: var(--good); color: #0b2415; text-transform: uppercase; }
.item.is-locked { border-color: #7a5f1f; }

/* Pestañas del inventario */
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.tab { min-height: 44px; padding: 6px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; font-weight: 600; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.tab b { font-size: 11px; color: var(--muted); font-weight: 500; }
.tab.on { border-color: var(--gold); color: var(--gold); background: var(--panel2); }
.inv-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip.on[style] { border-color: var(--c); color: var(--c); }
.cons-row .btn { flex: none; }
.mass-prev { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.mass-count b { font-size: 24px; font-family: var(--serif); color: var(--gold); }
.mass-yield { font-size: 16px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ticket-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; margin-bottom: 12px; }
.ticket-info { display: flex; align-items: center; gap: 10px; }
.ticket-info .drop-img { width: 40px; height: 40px; }
.ticket-btns { display: flex; gap: 6px; }

/* Apertura de cofres */
.chest-stage { position: relative; text-align: center; padding: 8px 0 4px; overflow: hidden; }
.chest-halo { position: absolute; left: 50%; top: 90px; width: 260px; height: 260px; margin: -130px 0 0 -130px; border-radius: 50%; opacity: 0; background: radial-gradient(circle, var(--c) 0%, transparent 65%); transition: opacity .5s; pointer-events: none; }
.chest-stage.opened .chest-halo { opacity: .55; animation: chest-pulse 2.4s ease-in-out infinite; }
.chest-stage.ssr .chest-halo { opacity: .9; background: radial-gradient(circle, #ffd35a 0%, transparent 65%); }
.chest-box { position: relative; width: 150px; height: 150px; margin: 0 auto; transform-origin: 50% 90%; }
.chest-img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 10px #000a); }
.chest-box.shaking { animation: chest-shake .9s ease-in-out infinite; }
.chest-stage.opened .chest-box { animation: chest-pop .6s ease-out; }
.chest-stage.opened .chest-img { filter: brightness(1.25) drop-shadow(0 0 18px var(--c)); }
.chest-flash { position: absolute; inset: -30%; border-radius: 50%; background: radial-gradient(circle, #fff 0%, #fff0 70%); opacity: 0; pointer-events: none; }
.chest-stage.opened .chest-flash { animation: chest-flash .8s ease-out; }
.chest-title { font-family: var(--serif); font-size: 18px; margin: 6px 0 10px; color: var(--c); }
.chest-rewards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; min-height: 40px; margin-bottom: 12px; }
.rw-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 12px; font-size: 11px; line-height: 1.2; background: var(--bg2); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); animation: rw-in .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.rw-card .rw-ico { width: 44px; height: 44px; }
.rw-card.rar-SR { box-shadow: 0 0 12px color-mix(in srgb, var(--c) 60%, transparent); }
.rw-card.rar-SSR { box-shadow: 0 0 18px var(--c); animation: rw-in .45s cubic-bezier(.2, 1.4, .4, 1) both, chest-pulse 1.6s ease-in-out .5s infinite; }
.chest-btns { display: flex; gap: 8px; justify-content: center; }
.chest-btns [data-action="chest-again"], .chest-btns [data-action="close-modal"] { display: none; }
.chest-stage.done .chest-btns [data-action="chest-again"], .chest-stage.done .chest-btns [data-action="close-modal"] { display: inline-block; }
.chest-stage.done [data-action="chest-skip"] { display: none; }
@keyframes chest-shake { 0%, 100% { transform: rotate(0) translateX(0); } 20% { transform: rotate(-5deg) translateX(-3px); } 40% { transform: rotate(5deg) translateX(3px); } 60% { transform: rotate(-4deg); } 80% { transform: rotate(4deg); } }
@keyframes chest-pop { 0% { transform: scale(1); } 35% { transform: scale(1.28) translateY(-8px); } 100% { transform: scale(1.05); } }
@keyframes chest-flash { 0% { opacity: 0; transform: scale(.4); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.6); } }
@keyframes chest-pulse { 50% { transform: scale(1.06); opacity: .75; } }
@keyframes rw-in { from { opacity: 0; transform: translateY(14px) scale(.6); } }
.slot { grid-template-columns: 46px 1fr; }
.slot-ico { width: 46px; height: 46px; }
.row-btns .btn .bl, .row-btns .btn .bs { display: block; }
.row-btns .btn .bs { font-size: 12px; font-weight: 500; }
.row-btns .btn .bs .ico { width: 1em; height: 1em; }
.chest-rewards { min-height: 150px; align-content: start; }

/* Margen interno: ningún ícono (armas en diagonal sobre todo) toca el borde de su recuadro. */
.item-img, .rw-img, .drop-img { box-sizing: border-box; padding: 13%; object-fit: contain; }
.item-ico, .slot-ico { overflow: hidden; }

/* Cofres: aro de color por calidad (madera marrón, plata celeste, oro dorado) y nombre visible */
.cico { --cc: #b9783f; position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; vertical-align: -0.35em;
  border-radius: 50%; padding: 1px; background: radial-gradient(circle, color-mix(in srgb, var(--cc) 35%, transparent) 0%, transparent 70%);
  box-shadow: 0 0 0 1.5px var(--cc), 0 0 6px color-mix(in srgb, var(--cc) 70%, transparent); }
.cico.ch-madera { --cc: #b9783f; }
.cico.ch-plata { --cc: #6ec8f5; }
.cico.ch-oro { --cc: #ffc933; box-shadow: 0 0 0 2px var(--cc), 0 0 10px var(--cc); }
.cico img { display: block; position: relative; }
.cico.big { border-radius: 14px; padding: 0; margin: 0; width: 100%; height: 100%; box-shadow: inset 0 0 0 2.5px var(--cc), inset 0 0 14px color-mix(in srgb, var(--cc) 65%, transparent); }
.cico.big img { width: 100%; height: 100%; }
.cico.ch-oro.big { box-shadow: inset 0 0 0 3px var(--cc), inset 0 0 18px var(--cc); animation: cico-glint 2.4s ease-in-out infinite; }
.cico em { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); font: 800 9.5px/1 var(--sans); font-style: normal; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 99px; background: var(--cc); color: #1a1426; white-space: nowrap; box-shadow: 0 1px 3px #0008; }
.cico.big em { bottom: auto; top: 3px; font-size: 8.5px; padding: 2px 5px; }
@keyframes cico-glint { 50% { box-shadow: inset 0 0 0 3px var(--cc), inset 0 0 28px var(--cc); } }
.chest-stage { --tier: #b9783f; }
.chest-stage.ch-plata { --tier: #6ec8f5; }
.chest-stage.ch-oro { --tier: #ffc933; }
.chest-stage .chest-box::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 3px var(--tier), 0 0 22px color-mix(in srgb, var(--tier) 75%, transparent), inset 0 0 26px color-mix(in srgb, var(--tier) 40%, transparent); }
.chest-stage .chest-title::after { content: ""; display: block; width: 56px; height: 3px; margin: 6px auto 0; border-radius: 3px; background: var(--tier); }

/* Equipar lo mejor y mejorar todo */
.eq-btns { margin-top: 12px; }
.ph-btns { display: inline-flex; gap: 6px; }
.eq-plan { display: block; max-height: 46vh; overflow: auto; margin-bottom: 8px; text-align: left; }
.eq-hero { display: block; margin-bottom: 8px; padding: 8px 10px; border-radius: 12px; background: var(--bg2); border: 1px solid #3d3558; }
.eq-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.eq-head .gain { margin-left: auto; }
.eq-head .owner-face { width: 28px; height: 28px; flex: none; }
.eq-row { display: flex; align-items: baseline; gap: 6px; font-size: 13px; padding: 2px 0; }
.eq-row small { color: var(--muted); }
.eq-row .gain { margin-left: auto; }
.eq-total { display: block; font-size: 14px; }
.gain.up { color: #6ee08a; }
