/* Oferta del refugio: precio visible, animación suave y movimiento reducido. */
#gift-shop-button{position:relative;flex:0 0 46px;width:46px;height:46px;padding:3px 4px 8px;border:2px solid #ffe68b;border-radius:50%;background:radial-gradient(circle at 40% 30%,#fff8c7,#f8c652 68%,#c97c25);box-shadow:0 0 14px #ffe27d90,0 3px 0 #352b27;color:#382c24;isolation:isolate}
#gift-shop-button img{width:32px;height:32px;image-rendering:pixelated;animation:gift-wiggle 4.2s ease-in-out infinite;transform-origin:50% 85%;filter:drop-shadow(0 1px 1px #6d3e3160)}
#gift-shop-button:hover{background:#fff1a1;box-shadow:0 0 20px #ffe27dc0,0 3px 0 #352b27}
#gift-shop-button:focus-visible{outline:3px solid #fff;outline-offset:5px}
.gift-price{position:absolute;left:50%;bottom:-8px;transform:translateX(-50%);white-space:nowrap;padding:2px 5px;border:1px solid #71542e;border-radius:7px;background:#fff6d7;color:#44351e;font:700 10px/1.1 system-ui,sans-serif}
.gift-spark{position:absolute;z-index:2;color:#fff8cf;text-shadow:0 0 5px #f4a82c;animation:gift-spark 2.8s ease-in-out infinite;pointer-events:none}.gift-spark.a{left:-5px;top:0;font-size:17px}.gift-spark.b{right:-4px;top:17px;font-size:12px;animation-delay:1.4s}
@keyframes gift-wiggle{0%,68%,100%{transform:translateY(0) rotate(0)}74%{transform:translateY(-3px) rotate(-9deg)}80%{transform:translateY(-3px) rotate(9deg)}86%{transform:translateY(-1px) rotate(-5deg)}92%{transform:rotate(4deg)}}
@keyframes gift-spark{0%,100%{opacity:.35;transform:scale(.75)}50%{opacity:1;transform:scale(1.15)}}
/* v0.19.0 · Tienda especial con estilo Pokémon (Rojo Fuego / Verde Hoja): marco de dos tonos, barra roja con Poké Ball,
 * montón de Ultra Balls en el mostrador, línea de producto como en la Tienda Pokémon y probabilidades como en la ficha. */
.gift-overlay{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:16px;background:rgba(16,24,40,.62);overflow:auto;color:var(--fr-ink,#383840)}
.gift-card{position:relative;width:min(100%,400px);max-height:calc(100dvh - 32px);overflow:auto;box-sizing:border-box;padding:10px;display:grid;gap:8px;text-align:left;
  background:var(--fr-paper,#f8f8f8);border:3px solid var(--fr-frame,#4a5878);border-radius:12px;
  box-shadow:inset 0 0 0 2px var(--fr-frame-in,#9cc0e0),inset 0 0 0 4px var(--fr-paper,#f8f8f8),0 0 0 2px var(--fr-dark,#202838),0 8px 0 2px rgba(0,0,0,.35),0 24px 70px #0009;
  font:14px/1.4 Pixel,var(--ui,system-ui);text-shadow:1px 1px 0 var(--fr-shade,#d0d0c8);image-rendering:pixelated}
.gift-card :focus-visible{outline:3px solid #f8d030;outline-offset:2px}
.gift-head{position:relative;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 8px 6px 36px;
  background:linear-gradient(180deg,#e85848,#c83020);border:2px solid #701810;border-radius:7px;box-shadow:inset 0 2px 0 #f89080,inset 0 -2px 0 #a02818}
.gift-head::before{content:"";position:absolute;left:10px;top:50%;width:18px;height:18px;margin-top:-9px;border-radius:50%;background:linear-gradient(180deg,#f04030 0 45%,#202020 45% 57%,#f8f8f8 57%);box-shadow:0 0 0 2px #202020}
.gift-head::after{content:"";position:absolute;left:16px;top:50%;width:6px;height:6px;margin-top:-3px;border-radius:50%;background:#f8f8f8;box-shadow:0 0 0 2px #202020}
.gift-card h2{margin:0;font:20px/1.1 Pixel,var(--ui,system-ui);color:#fff;text-shadow:2px 2px 0 #801810}
.gift-close{min-height:32px;padding:4px 10px;background:var(--fr-paper,#f8f8f8);color:var(--fr-ink,#383840);border:2px solid var(--fr-frame,#4a5878);border-radius:6px;box-shadow:inset 0 0 0 1px var(--fr-frame-in,#9cc0e0);font:13px Pixel,var(--ui,system-ui);text-shadow:1px 1px 0 var(--fr-shade,#d0d0c8);cursor:pointer}
.gift-close:hover{background:var(--fr-sel,#e4eef8)}
/* Mostrador: las 15 Ultra Balls apiladas en pirámide (5-4-3-2-1) */
.gift-show{position:relative;display:grid;place-items:end center;height:150px;padding-bottom:12px;border-radius:9px;border:2px solid #203870;overflow:hidden;
  background:linear-gradient(180deg,transparent 78%,#a86a38 78% 82%,#7a4a24 82%),repeating-linear-gradient(135deg,#4f9c90 0 14px,#438a80 14px 28px)}
.gift-pile{display:grid;justify-items:center;margin-bottom:4px}
.gift-pile div{display:flex;gap:2px;margin-top:-7px}
.gift-pile img{width:32px;height:32px;image-rendering:pixelated;filter:drop-shadow(0 2px 0 rgba(0,0,0,.3))}
.gift-pile div:first-child img{animation:gift-wobble 1.8s ease-in-out infinite;transform-origin:50% 90%}
@keyframes gift-wobble{0%,70%,100%{transform:rotate(0)}78%{transform:rotate(-16deg)}88%{transform:rotate(12deg)}}
/* Línea de producto, como en la Tienda Pokémon */
.gift-line{display:flex;align-items:baseline;gap:10px;padding:8px 10px;border-radius:7px;background:var(--fr-sel,#e4eef8);border:2px solid var(--fr-frame-in,#9cc0e0)}
.gift-line b{font-weight:400;font-size:18px;position:relative;padding-left:16px}
.gift-line b::before{content:'▶';position:absolute;left:0;top:3px;font-size:12px;animation:fr-cursor .5s steps(2) infinite}
.gift-x{font-size:18px;color:var(--fr-ink-2,#606068)}
.gift-total{margin-left:auto;font-size:24px;color:#e05838;text-shadow:1px 1px 0 #f8c8b8}
.gift-description{margin:0;padding:0 4px;font-size:13px;line-height:1.45;color:var(--fr-ink,#383840)}
/* Probabilidades, como las estadísticas de la ficha: etiqueta de color y valor */
.gift-odds{display:grid;grid-template-columns:1fr 1fr;gap:5px 8px;margin:0;padding:8px;border-radius:7px;background:#fff;border:2px solid #d8e0e8}
.gift-odds div{display:flex;align-items:center;justify-content:space-between;gap:6px}
.gift-odds dt{font-size:11px;color:#fff;background:#5880c8;border:1px solid #203868;border-radius:4px;padding:3px 6px 2px;text-shadow:1px 1px 0 #203868}
.gift-odds .shiny dt{background:#e0a020;border-color:#805010;text-shadow:1px 1px 0 #805010}
.gift-odds .legend dt{background:#9050c8;border-color:#4a2070;text-shadow:1px 1px 0 #4a2070}
.gift-odds dd{margin:0;font-size:15px}
.gift-odds-note{margin:-2px 4px 0;font-size:11px;color:var(--fr-ink-2,#606068)}
.gift-info{min-width:0;border:2px solid #d8e0e8;border-radius:7px;background:#fff}
.gift-info>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;padding:8px 10px;box-sizing:border-box;list-style:none;font-size:13px;cursor:pointer}
.gift-info>summary::-webkit-details-marker{display:none}
.gift-info>summary::before{content:none}
.gift-info>summary::after{content:'+';font:20px/1 system-ui,sans-serif}
.gift-info[open]>summary::after{content:'−'}
.gift-info>summary:hover{background:var(--fr-sel,#e4eef8)}
.gift-info .gift-odds{border:0;padding:2px 10px 8px}
.gift-info .gift-odds-note{margin:0;padding:0 10px 10px}
/* Caja de texto con ▼ */
.gift-status{position:relative;min-height:36px;margin:0;padding:8px 26px 8px 10px;border-radius:7px;background:#fff;border:2px solid #d0d8e0;font-size:13px;color:var(--fr-ink,#383840)}
.gift-status:not(:empty)::after{content:'▼';position:absolute;right:9px;bottom:6px;font-size:11px;color:#e05838;animation:gift-blink 1s steps(2) infinite}
.gift-status.error{color:#b03020}
.gift-status:empty{display:none}
@keyframes gift-blink{50%{opacity:0}}
/* Comprar: barra naranja con el cursor ▶ */
.gift-buy{position:relative;width:100%;min-height:52px;padding:8px 14px 8px 34px;border-radius:7px;border:2px solid #803818;color:#fff;font:20px Pixel,var(--ui,system-ui);
  background:linear-gradient(180deg,#f0a048,#e07828);box-shadow:inset 0 2px 0 #f8c878,inset 0 -3px 0 #c06020,0 3px 0 var(--fr-dark,#202838);text-shadow:2px 2px 0 #903810;cursor:pointer}
.gift-buy::before{content:'▶';position:absolute;left:12px;top:50%;margin-top:-8px;font-size:14px;line-height:16px;animation:fr-cursor .5s steps(2) infinite}
.gift-buy:hover:not(:disabled){filter:brightness(1.06)}
.gift-buy:active:not(:disabled){transform:translateY(2px)}
.gift-buy:disabled{background:#d8dce0;border-color:#a0a8b0;color:#808890;box-shadow:inset 0 2px 0 #f0f0f0;text-shadow:1px 1px 0 #f8f8f8;font-size:16px;cursor:default}
.gift-buy:disabled::before{display:none}
.gift-account{margin:0;text-align:center;font-size:11px;color:var(--fr-ink-2,#606068)}
.gift-odds dd{white-space:nowrap}
/* Móvil en horizontal: escaparate a la izquierda, compra a la derecha (sin desplazarse) */
@media(max-height:560px) and (min-width:600px){.gift-card{width:min(100%,760px);grid-template-columns:1fr 1fr;grid-template-areas:'head head' 'show line' 'show buy' 'show acct' 'info info' 'status status';align-content:start;column-gap:10px}.gift-head{grid-area:head}.gift-show{grid-area:show;height:auto;min-height:120px}.gift-line{grid-area:line}.gift-info{grid-area:info}.gift-status{grid-area:status}.gift-buy{grid-area:buy;min-height:46px}.gift-account{grid-area:acct}.gift-pile img{width:26px;height:26px}}
@media(max-height:560px) and (max-width:599px){.gift-show{height:112px}.gift-pile img{width:24px;height:24px}}
@media(prefers-reduced-motion:reduce){.gift-pile img,.gift-line b::before,.gift-buy::before,.gift-status::after{animation:none}}
@media(max-width:600px){#gift-shop-button{flex-basis:38px;width:38px;height:38px}#gift-shop-button img{width:27px;height:27px}.gift-price{font-size:9px;bottom:-9px}.lobby-res{gap:5px}}
@media(prefers-reduced-motion:reduce){#gift-shop-button img,.gift-spark{animation:none}}

.lobby-offer-settings{display:inline-flex;align-items:center;gap:8px;flex-shrink:0}
@media(max-width:600px){#menu .lobby-top{flex-wrap:wrap;gap:5px}#menu .lobby-brand{flex-basis:100%}#menu .lobby-brand h1{font-size:16px}#menu .lobby-res{flex-wrap:wrap;width:100%;justify-content:flex-end;gap:4px}#menu .lobby-res .res-pill{padding:0 6px;gap:4px;min-width:0}#menu .lobby-res .res-pill .pi{width:18px;height:18px}#menu #lobby-mute{width:44px;min-width:44px;height:44px;padding:4px;gap:0}#menu #lobby-mute b{display:none}.lobby-offer-settings{gap:5px}#gift-shop-button{flex-basis:44px;width:44px;height:44px}#menu #lobby-settings-button{width:44px;height:44px}}
/* v0.19.4 · El nombre de la oferta solo se ve en el botón grande del móvil. */
.gift-label{display:none}
/* v0.19.7 · Probabilidades de las Poké Balls en el Almacén (js/hub-storage.js). */
.storage-odds{grid-column:1/-1;margin-top:10px;padding:8px 10px;border:2px solid #d6cdb5;border-radius:10px;background:#fffbed;color:#3a3a32;font:12px/1.4 var(--ui)}
.storage-odds summary{cursor:pointer;width:fit-content;min-height:28px;padding:4px 0;font:14px/1.2 Pixel,var(--ui);color:#25303a}
.storage-odds table{width:100%;margin-top:6px;border-collapse:collapse;font:12px/1.3 var(--ui)}
.storage-odds th,.storage-odds td{padding:5px 4px;text-align:right;border-bottom:1px solid #ebe3cc;white-space:nowrap}
.storage-odds thead th{font:600 11px/1.2 var(--ui);color:#6a6a5a}
.storage-odds tbody th{display:flex;align-items:center;gap:6px;text-align:left;font-weight:600}
.storage-odds tbody th svg,.storage-odds tbody th img,.storage-odds tbody th canvas{flex:none}
.storage-odds .sh{color:#b0548c}.storage-odds .lg{color:#b8860b}
.storage-odds-pity{margin:8px 0 2px;font-weight:700;color:#7a5a12}
.storage-odds-note{margin:0;color:#6a6a5a}
@media (max-width:420px){.storage-odds table{font-size:11px}.storage-odds th,.storage-odds td{padding:4px 2px}.storage-odds tbody th span{font-size:11px}}
