/* ═══════════════════════════════════════════════════════════════════════
   Apertura de sobre: entrada con rebote, temblor, estallido de luz con rayos,
   cartas con giro 3D y efectos por rareza, contador, progreso y resumen.
   Fases (data-phase en .po-root): intro → shake → burst → cards → summary.
   ═══════════════════════════════════════════════════════════════════════ */

.po-root {
  --pk: #ffc83a; --pk-l: #fff0b0; --ray: #ffe9a0;
  --cw: min(36vh, 15.5rem);
  position: fixed; inset: 0; z-index: 80; overflow: hidden;
  display: flex; flex-direction: column;
  padding: var(--safe-t) var(--safe-r) var(--safe-b) var(--safe-l);
  cursor: pointer; animation: fade-in .25s both;
}
.po-root.closing { animation: fade-in .25s reverse both; }
/* Fondo: el foco y la pizarra del kit (.hk-bg): dorado; la carta épica lo vuelve magenta y la
   legendaria, dorado intenso. El foco se centra en el sobre. */
.po-bg.hk-bg { --sy: 48%; --sw: 44%; --sh: 64%; transition: filter .5s; }
.po-rays {
  position: absolute; left: 50%; top: 50%; width: 200vmax; height: 200vmax; transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--ray) 60%, transparent) 0 6deg, transparent 6deg 18deg);
  -webkit-mask-image: radial-gradient(circle, #000 3%, rgba(0,0,0,.6) 14%, transparent 34%); mask-image: radial-gradient(circle, #000 3%, rgba(0,0,0,.6) 14%, transparent 34%);
  opacity: .45; animation: spin-c 36s linear infinite; transition: opacity .5s;
  pointer-events: none;
}
.po-root[data-phase="shake"] .po-rays { opacity: .75; animation-duration: 10s; }
.po-root[data-phase="burst"] .po-rays, .po-root[data-phase="cards"] .po-rays { opacity: 1; animation-duration: 18s; }
.po-root[data-phase="summary"] .po-rays { opacity: .35; }
.po-root[data-rarity="legendaria"] .po-bg { --a0: 255 244 130; --a1: 255 234 96; --a2: 242 164 42; --a3: 198 114 42; --a4: 110 76 74; --sw: 56%; --sh: 78%; }
.po-root[data-rarity="epica"] .po-bg { --a0: 255 200 250; --a1: 255 160 246; --a2: 200 60 212; --a3: 118 36 150; --a4: 64 42 104; --grid: rgba(255, 220, 255, .07); }
.po-root[data-rarity="rara"] .po-bg { --a0: 190 240 255; --a1: 150 220 255; --a2: 40 140 220; --a3: 26 90 160; --a4: 40 60 104; --grid: rgba(220, 245, 255, .07); }
.po-flash { position: absolute; inset: 0; z-index: 20; background: #fff; opacity: 0; pointer-events: none; }
.po-flash.flash { animation: po-flash .55s ease-out; }
.po-flash.flash-gold { animation: po-flash-gold 1.1s ease-out; }
@keyframes po-flash { 0% { opacity: 0; } 18% { opacity: 1; } 100% { opacity: 0; } }   /* destello seco a pantalla completa */
@keyframes po-flash-gold { 0% { opacity: .95; background: #fffbe0; } 30% { opacity: .7; background: #ffd23a; } 100% { opacity: 0; background: #ffb320; } }

/* ── Cabecera: botín, título y saltar ── */
.po-top { position: relative; z-index: 10; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .6rem; padding: .8rem var(--gutter) .2rem; }
.po-title { font-size: 2rem; animation: pop-in .5s .15s cubic-bezier(.2,1.4,.4,1) both; }
.po-loot { display: flex; gap: .5rem; flex-wrap: wrap; }
.po-loot-item {
  display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .85rem .1rem .25rem; border-radius: 999px;
  background: var(--well); border: 1.5px solid var(--ink); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.18), inset 0 2px 5px rgba(0,0,0,.5);
  font-family: var(--font-title); font-size: 1.25rem; -webkit-text-stroke: .2em var(--ink); paint-order: stroke fill;
}
.po-loot-item .ico { width: 1.9rem; height: 1.9rem; filter: drop-shadow(0 2px 0 rgba(0,0,0,.4)); }
.po-loot-item b { font-weight: 400; }
.po-loot-item.big { font-size: 1.7rem; }
.po-loot-item.big .ico { width: 2.5rem; height: 2.5rem; }
.po-root[data-phase="intro"] .po-loot, .po-root[data-phase="shake"] .po-loot { visibility: hidden; }
.po-skip { justify-self: end; }
.po-root[data-phase="summary"] .po-skip { visibility: hidden; }

/* ── Escenario ── */
.po-stage { position: relative; z-index: 5; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: clamp(1.5rem, 5vw, 4rem); padding: .5rem var(--gutter) 1rem; }

/* Sobre */
.po-pack { position: absolute; left: 50%; top: 50%; width: min(40vh, 15rem); aspect-ratio: 100 / 140; transform: translate(-50%, -50%); }
.po-pack-half { position: absolute; inset: 0; }
.po-pack-half .pack-art { width: 100%; height: 100%; filter: drop-shadow(0 10px 0 rgba(0,0,0,.35)); }
.po-pack-top { clip-path: inset(0 0 81% 0); }
.po-pack-bot { clip-path: inset(18.8% 0 0 0); }
.po-pack-glow { position: absolute; inset: -40%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--pk-l) 85%, transparent) 0%, color-mix(in srgb, var(--pk) 35%, transparent) 35%, transparent 65%); animation: glow-breathe 1.6s ease-in-out infinite; }
@keyframes glow-breathe { 0%, 100% { transform: scale(.92); opacity: .75; } 50% { transform: scale(1.06); opacity: 1; } }
.po-root[data-phase="intro"] .po-pack { animation: pack-drop .75s cubic-bezier(.3,1.45,.5,1) both, pack-float 2.4s ease-in-out .75s infinite; }
@keyframes pack-drop { 0% { transform: translate(-50%, -160%) rotate(-14deg) scale(.7); opacity: 0; } 60% { transform: translate(-50%, -46%) rotate(4deg) scale(1.04); opacity: 1; } 100% { transform: translate(-50%, -50%); } }
@keyframes pack-float { 0%, 100% { transform: translate(-50%, -50%) rotate(-2deg); } 50% { transform: translate(-50%, -53%) rotate(2deg); } }
.po-root[data-phase="shake"] .po-pack { animation: pack-shake .9s linear both; }
@keyframes pack-shake {
  0% { transform: translate(-50%, -50%) rotate(0); }
  10% { transform: translate(-51%, -50%) rotate(-3deg); } 20% { transform: translate(-49%, -50%) rotate(3deg); }
  30% { transform: translate(-52%, -50%) rotate(-5deg) scale(1.02); } 40% { transform: translate(-48%, -50%) rotate(5deg) scale(1.03); }
  50% { transform: translate(-53%, -51%) rotate(-7deg) scale(1.05); } 60% { transform: translate(-47%, -49%) rotate(7deg) scale(1.07); }
  70% { transform: translate(-54%, -51%) rotate(-9deg) scale(1.09); } 80% { transform: translate(-46%, -49%) rotate(9deg) scale(1.11); }
  90% { transform: translate(-53%, -50%) rotate(-6deg) scale(1.14); } 100% { transform: translate(-50%, -50%) rotate(0) scale(1.18); }
}
.po-root[data-phase="shake"] .po-pack-glow { animation: glow-breathe .25s ease-in-out infinite; }
.po-root[data-phase="burst"] .po-pack { transform: translate(-50%, -50%) scale(1.18); }
.po-root[data-phase="burst"] .po-pack-top { animation: pack-top-fly .8s cubic-bezier(.15,.8,.35,1) forwards; }
.po-root[data-phase="burst"] .po-pack-bot { animation: pack-bot-drop .75s cubic-bezier(.55,0,.85,.45) forwards; }
.po-root[data-phase="burst"] .po-pack-glow { animation: glow-burst .7s ease-out forwards; }
@keyframes pack-top-fly { 0% { transform: none; } 20% { transform: translate(4%, -30%) rotate(10deg); } 100% { transform: translate(70%, -260%) rotate(64deg); opacity: 0; } }
@keyframes pack-bot-drop { 0% { transform: none; } 25% { transform: translateY(-5%) scale(1.04); } 100% { transform: translateY(95%) rotate(-7deg) scale(.9); opacity: 0; } }
@keyframes glow-burst { to { transform: scale(3); opacity: 0; } }
/* Mazo de cartas que asoma por la boca del sobre recién rasgado */
.po-deck { position: absolute; left: 22%; right: 22%; top: 16%; height: 62%; z-index: 0; opacity: 0; }
.po-deck i { position: absolute; inset: 0; border-radius: 10px; border: 3px solid var(--ink);
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.2), transparent 60%), repeating-linear-gradient(45deg, #1f6a7c 0 8px, #185566 8px 16px);
  box-shadow: inset 0 0 0 4px #86c9dd, 0 0 18px var(--ray); }
.po-deck i:nth-child(1) { transform: rotate(-9deg) translateX(-10%); }
.po-deck i:nth-child(3) { transform: rotate(8deg) translateX(10%); }
.po-root[data-phase="burst"] .po-deck { animation: deck-rise .75s cubic-bezier(.2,1.2,.4,1) forwards; }
@keyframes deck-rise { 0% { opacity: 0; transform: translateY(25%) scale(.8); } 30% { opacity: 1; } 70% { opacity: 1; transform: translateY(-58%) scale(1.06); } 100% { opacity: 0; transform: translateY(-70%) scale(1.2); } }
.po-root:not([data-phase="intro"]):not([data-phase="shake"]):not([data-phase="burst"]) .po-pack { display: none; }

.po-hint {
  position: absolute; z-index: 6; left: 0; right: 0; bottom: calc(var(--safe-b) + 7%); text-align: center; font-size: 1.6rem;
  animation: hint-pulse 1.2s ease-in-out infinite; pointer-events: none;
  --sc: var(--ink); -webkit-text-stroke: .2em var(--sc); paint-order: stroke fill; text-shadow: 0 .07em 0 var(--sc);
}
.po-root:not([data-phase="intro"]) .po-hint { display: none; }
@keyframes hint-pulse { 0%, 100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.08); opacity: 1; } }

/* ── Carta ── */
.po-card-host { position: relative; flex: none; width: var(--cw); height: calc(var(--cw) * 1.4); perspective: 1400px; }
.po-root[data-phase="intro"] .po-card-host, .po-root[data-phase="shake"] .po-card-host, .po-root[data-phase="burst"] .po-card-host { display: none; }
.po-card { --rc: #8fd14f; --rd: #3f7d1c; --rg: #c8ff8a; --kit: #1f6a7c;
  position: absolute; inset: 0; transform-style: preserve-3d; animation: card-in .5s cubic-bezier(.2,1.25,.4,1) both; }
@keyframes card-in { 0% { transform: translateY(55vh) scale(.25) rotate(-24deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.po-card-host .po-card.leave, .po-card-host .po-card.flip.leave { animation: card-leave .42s cubic-bezier(.5,0,.8,.4) forwards; }
@keyframes card-leave { to { transform: translate(-60vw, 30vh) scale(.3) rotate(-35deg); opacity: 0; } }
.po-card-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .62s cubic-bezier(.3,1.35,.5,1); }
.po-card.flip .po-card-inner { transform: rotateY(180deg); }
.po-card.tease .po-card-inner { animation: tease .11s linear infinite; }
.po-card.tease { filter: drop-shadow(0 0 22px var(--rg)) drop-shadow(0 0 8px var(--rc)); }
@keyframes tease { 0%, 100% { transform: rotate(-1.5deg) scale(1.02); } 50% { transform: rotate(1.5deg) scale(1.04); } }
.po-face { position: absolute; inset: 0; border-radius: 20px; border: 4px solid var(--ink); overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.po-back {
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.18), transparent 60%), repeating-linear-gradient(45deg, #1f6a7c 0 14px, #185566 14px 28px);
  box-shadow: inset 0 0 0 6px #86c9dd, inset 0 0 0 10px rgba(10,8,7,.35);
}
.po-card.tease .po-back { box-shadow: inset 0 0 0 6px var(--rc), inset 0 0 40px var(--rg); }
.po-back-emblem { width: 44%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: rgba(10,8,7,.35); border: 4px solid rgba(190,232,242,.6); }
.po-back-emblem .ico { width: 78%; height: 78%; }
.po-front {
  transform: rotateY(180deg);
  background: radial-gradient(circle at 50% 36%, color-mix(in srgb, var(--kit) 50%, #fff) 0%, var(--kit) 42%, color-mix(in srgb, var(--kit) 45%, #000) 100%);
  box-shadow: inset 0 0 0 6px var(--rc), inset 0 0 0 9px rgba(0,0,0,.28);
}
.po-front::before { content: ''; position: absolute; inset: 0; background: repeating-conic-gradient(from 0deg at 50% 38%, rgba(255,255,255,.12) 0 9deg, transparent 9deg 22deg); }
.pf-art { position: absolute; left: 6%; right: 6%; top: 11%; height: 64%; display: grid; place-items: center; }
.pf-art canvas { width: 100%; height: 100%; filter: drop-shadow(0 6px 0 rgba(0,0,0,.25)); }
.po-card.is-item .pf-art { top: 14%; height: 58%; }
.pf-rarity {
  position: absolute; top: 5%; left: 50%; transform: translateX(-50%); z-index: 2;
  padding: .12rem .9rem; border-radius: 999px; background: var(--rc); border: 3px solid var(--ink);
  font-family: var(--font-title); font-size: 1rem; white-space: nowrap;
  --sc: var(--ink); -webkit-text-stroke: .2em var(--sc); paint-order: stroke fill; text-shadow: 0 .07em 0 var(--sc);
}
.pf-plate {
  position: absolute; left: 0; right: 0; bottom: 0; height: 22%; display: grid; place-items: center; padding: 0 .6rem;
  background: linear-gradient(180deg, var(--rc), var(--rd)); border-top: 4px solid var(--ink);
}
.pf-name { font-family: var(--font-title); font-size: 1.3rem; line-height: 1.05; text-align: center;
  --sc: var(--ink); -webkit-text-stroke: .2em var(--sc); paint-order: stroke fill; text-shadow: 0 .07em 0 var(--sc); }
.pf-new { position: absolute; top: 15%; right: -2%; z-index: 3; font-size: 1rem; animation: new-bounce .9s ease-in-out infinite; }
@keyframes new-bounce { 0%, 100% { transform: rotate(-8deg) scale(1); } 50% { transform: rotate(-4deg) scale(1.12); } }
.pf-holo {
  position: absolute; inset: -50%; z-index: 1; pointer-events: none; mix-blend-mode: overlay; opacity: .55;
  background: conic-gradient(from 0deg, #fff3a0, #ffb320, #fff, #ffd23a, #ff9a1f, #fff3a0, #ffffff, #fff3a0);
  animation: spin 5s linear infinite;
}
.po-front::after {   /* brillo que barre la carta (ver .shine en main.css) */
  content: ''; position: absolute; top: -20%; bottom: -20%; left: 0; width: 100%; z-index: 4;
  background: linear-gradient(100deg, transparent 32%, rgba(255,255,255,.55) 50%, transparent 68%); transform: translateX(-110%) skewX(-18deg);
  animation: shine-sweep 2.8s ease-in-out .6s infinite; pointer-events: none;
}
.po-card.flip.r-rara { filter: drop-shadow(0 0 16px rgba(63,169,245,.75)); }
.po-card.flip.r-epica { animation: none; filter: drop-shadow(0 0 22px rgba(180,76,240,.9)); }
.po-card.flip.r-legendaria { animation: legend-glow 1.4s ease-in-out infinite; }
@keyframes legend-glow { 0%, 100% { filter: drop-shadow(0 0 18px rgba(255,200,60,.9)) drop-shadow(0 0 40px rgba(255,160,20,.55)); } 50% { filter: drop-shadow(0 0 30px rgba(255,230,120,1)) drop-shadow(0 0 70px rgba(255,180,40,.75)); } }
.po-card.flip.r-legendaria .po-front { box-shadow: inset 0 0 0 6px #ffd23a, inset 0 0 0 9px #a0520a, inset 0 0 50px rgba(255,240,160,.5); }

/* ── Información de la carta ── */
.po-info { width: min(40vw, 25rem); display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; opacity: 0; transform: translateX(40px); transition: opacity .3s, transform .45s cubic-bezier(.2,1.3,.4,1); pointer-events: none; }
.po-info.show { opacity: 1; transform: none; }
.po-root[data-phase="summary"] .po-info { display: none; }
.pi-kind { --rc: #fff; padding: .1rem .8rem; border-radius: 999px; background: var(--well); border: 1.5px solid var(--ink); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.14); font-weight: 800; font-size: .95rem; color: var(--text-dim); }
.pi-kind b { color: var(--rc); }
.pi-name { font-size: 2.6rem; line-height: 1.02; color: var(--title); --sc: var(--title-ink); --sw: .2em; --sd: .09em; }
.pi-row { display: flex; align-items: center; gap: .8rem; }
.pi-count { font-size: 3.6rem; line-height: 1; color: #fff; --sc: var(--ink); animation: count-pop .6s .15s cubic-bezier(.2,1.8,.4,1) both; }
@keyframes count-pop { 0% { transform: scale(0) rotate(-20deg); } 100% { transform: none; } }
.pi-new { font-size: 1.1rem; animation: new-bounce .9s ease-in-out infinite; }
.pi-progress { display: flex; align-items: center; gap: .6rem; width: 100%; }
.pi-level { font-size: 1.25rem; white-space: nowrap; }
.pi-progress .bar { flex: 1; height: 1.7rem; }
.pi-progress .bar > i { transition: width 1.1s cubic-bezier(.2,.8,.2,1); }
.pi-progress .bar > span { font-size: 1rem; }
.pi-upgrade { display: inline-flex; align-items: center; gap: .35rem; font-size: 1.5rem; color: #c3fb0e; --sc: #173f00; animation: pulse .9s ease-in-out infinite, fade-in .3s .6s both; }
.pi-upgrade .ico { width: 1.3em; height: 1.3em; }
.pi-unlock { font-size: 1.35rem; color: var(--gold-2); --sc: #5a2c00; animation: fade-in .3s .5s both; }
/* Única instrucción de la pantalla: blanca con contorno sobre una píldora oscura (sobre los rayos
   claros de la rareza, el azul tenue de antes bajaba a 1,6:1 de contraste). */
.pi-next {
  margin-top: .4rem; padding: .15rem .9rem .2rem; border-radius: 999px;
  font-size: max(13px, .95rem); font-weight: 800; color: #fff; background: var(--well); border: 1.5px solid var(--ink);
  --sc: var(--ink); -webkit-text-stroke: .2em var(--sc); paint-order: stroke fill; text-shadow: 0 .07em 0 var(--sc);
  animation: hint-pulse 1.4s ease-in-out infinite;
}

/* Cartas restantes */
.po-remaining { position: absolute; z-index: 6; left: calc(var(--safe-l) + var(--gutter)); bottom: calc(var(--safe-b) + 1rem); display: flex; align-items: center; gap: .6rem; pointer-events: none; }
.po-remaining-stack { position: relative; width: 3rem; height: 4.1rem; }
.po-remaining-stack::before, .po-remaining-stack::after {
  content: ''; position: absolute; inset: 0; border-radius: 8px; border: 3px solid var(--ink);
  background: repeating-linear-gradient(45deg, #1f6a7c 0 6px, #185566 6px 12px); box-shadow: inset 0 0 0 3px #86c9dd;
}
.po-remaining-stack::before { transform: rotate(-9deg) translate(-4px, 2px); }
.po-remaining-stack::after { transform: rotate(4deg); }
.po-remaining b { font-size: 2.2rem; }

/* ── Resumen ── */
.po-summary { display: flex; flex-direction: column; align-items: center; gap: .8rem; width: min(100%, 62rem); max-height: 100%; min-height: 0; cursor: default; }
.po-sum-title { font-size: 2.6rem; animation: pop-in .5s cubic-bezier(.2,1.4,.4,1) both; }
.po-sum-loot { display: flex; gap: .8rem; animation: pop-in .5s .1s cubic-bezier(.2,1.4,.4,1) both; }
.po-sum-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; overflow-y: auto; padding: .6rem .3rem; min-height: 0; }
.po-mini {
  --rc: #8fd14f; --rd: #3f7d1c; --kit: #1f6a7c;
  position: relative; width: 7.2rem; display: flex; flex-direction: column; align-items: center; gap: .25rem;
  animation: pop-in .45s cubic-bezier(.2,1.4,.4,1) both; animation-delay: calc(.15s + var(--i) * 70ms);
}
.po-mini-art {
  position: relative; width: 100%; aspect-ratio: 1 / 1.12; display: grid; place-items: center; border-radius: 14px; border: 3px solid var(--ink); overflow: hidden;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--kit) 50%, #fff) 0%, var(--kit) 45%, color-mix(in srgb, var(--kit) 45%, #000) 100%);
  box-shadow: inset 0 0 0 4px var(--rc), 0 4px 0 rgba(0,0,0,.4);
}
.po-mini-art canvas { width: 88%; height: 88%; }
.po-mini.r-legendaria .po-mini-art { box-shadow: inset 0 0 0 4px #ffd23a, 0 0 18px rgba(255,200,60,.8), 0 4px 0 rgba(0,0,0,.4); }
.po-mini.r-epica .po-mini-art { box-shadow: inset 0 0 0 4px var(--rc), 0 0 14px rgba(180,76,240,.7), 0 4px 0 rgba(0,0,0,.4); }
.po-mini-count { position: absolute; top: 58%; right: -.2rem; font-size: 1.5rem; color: #fff; --sc: var(--ink); }
.po-mini-new { position: absolute; top: -.4rem; left: -.3rem; font-size: .72rem; }
.po-mini-up { position: absolute; top: -.6rem; right: -.45rem; width: 2.1rem; height: 2.3rem; display: grid; place-items: center; filter: drop-shadow(0 2px 0 rgba(0,0,0,.35)); animation: hk-bob 1.1s ease-in-out infinite; }
.po-mini-up .ico { width: 100%; height: 100%; }
.po-mini-name { font-family: var(--font-title); font-size: .85rem; line-height: 1.05; text-align: center; min-height: 2.1em; display: flex; align-items: center; -webkit-text-stroke: .2em var(--ink); paint-order: stroke fill; }
.po-mini .bar { width: 100%; height: .95rem; }
.po-mini .bar > span { font-size: .66rem; }
.po-continue { margin-top: .2rem; animation: pop-in .5s .5s cubic-bezier(.2,1.4,.4,1) both; }

/* ── Móvil apaisado ── */
@media (max-height: 500px) and (orientation: landscape) {
  .po-root { --cw: min(44vh, 12rem); }
  .po-top { padding-top: .45rem; }
  .po-title { font-size: 1.5rem; }
  .po-loot-item { font-size: 1.05rem; }
  .po-loot-item .ico { width: 1.6rem; height: 1.6rem; }
  .pi-name { font-size: 1.7rem; }
  .pi-count { font-size: 2.6rem; }
  .pi-upgrade { font-size: 1.15rem; }
  .pi-progress .bar { height: 1.35rem; }
  .po-mini { width: 5.6rem; }
  .po-sum-title { font-size: 1.8rem; }
  .po-summary { gap: .4rem; }
  .po-sum-grid { gap: .5rem; padding: .3rem; }
  .po-remaining b { font-size: 1.6rem; }
  .po-remaining-stack { width: 2.2rem; height: 3rem; }
  .pf-name { font-size: 1.05rem; }
  .pf-rarity { font-size: .8rem; }
}

/* ── Vertical ── */
@media (orientation: portrait) {
  .po-root { --cw: min(58vw, 15rem); }
  .po-top { grid-template-columns: 1fr auto; grid-template-areas: "title title" "loot skip"; row-gap: .5rem; }
  .po-title { grid-area: title; justify-self: center; }
  .po-loot { grid-area: loot; }
  .po-skip { grid-area: skip; }
  .po-stage { flex-direction: column; gap: 1rem; }
  .po-info { width: 100%; align-items: center; text-align: center; transform: translateY(20px); }
  .pi-name { font-size: 1.8rem; }
  .pi-count { font-size: 2.8rem; }
  .po-mini { width: 6.2rem; }
}
