/* style-qiyu.css — 奇遇獎勵 3-pick (request 40) and the prep strip of active 奇遇 effects */
.qy-modal { background: radial-gradient(ellipse at 50% 40%, rgba(60,18,8,.84), rgba(8,2,1,.93)); transition: background .4s; overflow: hidden; }
.qy-modal.lit { background: radial-gradient(ellipse at 50% 30%, rgba(120,58,14,.84), rgba(12,3,1,.94)); }
.qy-wrap { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(96vw, 860px); max-height: 96vh; color: var(--cream); font-family: var(--font); }
.qy-rays { position: absolute; left: 50%; top: 64px; width: 1000px; height: 1000px; margin: -500px 0 0 -500px; pointer-events: none; opacity: 0; transition: opacity .6s;
  background: repeating-conic-gradient(from 0deg, rgba(255,214,110,.26) 0 9deg, rgba(255,214,110,0) 9deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 0, rgba(0,0,0,.6) 28%, transparent 62%); mask: radial-gradient(circle, #000 0, rgba(0,0,0,.6) 28%, transparent 62%);
  animation: qy-spin 22s linear infinite; }
.qy-modal.lit .qy-rays { opacity: 1; }
@keyframes qy-spin { to { transform: rotate(360deg); } }
.qy-top { position: relative; display: flex; flex-direction: column; align-items: center; }
.qy-chest { position: relative; width: 124px; height: 124px; animation: qy-drop .45s cubic-bezier(.3,1.6,.5,1) both; }
.qy-chest img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 0 rgba(30,6,2,.7)); }
.qy-chest.wobble img { animation: qy-wob .45s ease-in-out; }
.qy-chest.open img { animation: qy-openpop .55s cubic-bezier(.3,1.6,.5,1); filter: drop-shadow(0 0 18px #ffd86a) drop-shadow(0 6px 0 rgba(30,6,2,.7)) brightness(1.12); }
.qy-flash { position: absolute; inset: -45%; border-radius: 50%; pointer-events: none; opacity: 0; transform: scale(.3);
  background: radial-gradient(circle, rgba(255,246,200,.95), rgba(255,200,80,.45) 38%, rgba(255,170,40,0) 70%); }
.qy-chest.open .qy-flash { animation: qy-flash 1s ease-out both; }
@keyframes qy-drop { 0% { transform: translateY(-90px) scale(.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes qy-wob { 20% { transform: rotate(-9deg); } 45% { transform: rotate(8deg); } 70% { transform: rotate(-5deg); } 100% { transform: none; } }
@keyframes qy-openpop { 0% { transform: scale(1); } 40% { transform: scale(1.22, .9); } 100% { transform: scale(1); } }
@keyframes qy-flash { 0% { opacity: 0; transform: scale(.3); } 25% { opacity: 1; transform: scale(1.1); } 100% { opacity: .35; transform: scale(1.35); } }
.qy-title { position: relative; z-index: 2; margin: -16px 0 0; font-size: 22px; padding: 4px 36px 7px; }

.qy-cards { display: flex; gap: 14px; justify-content: center; perspective: 900px; }
.qy-card { position: relative; width: 200px; height: 252px; padding: 0; border: 0; background: none; cursor: pointer; font-family: inherit; transition: transform .14s, filter .14s; }
.qy-card:not(.flip) { opacity: 0; pointer-events: none; }
.qy-card.flip { animation: qy-cardin .38s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes qy-cardin { 0% { opacity: 0; transform: translateY(40px) scale(.8); } 100% { opacity: 1; transform: none; } }
.qy-in { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateY(180deg); transition: transform .55s cubic-bezier(.3,1.3,.5,1) .12s; }
.qy-card.flip .qy-in { transform: rotateY(0deg); }
.qy-face { position: absolute; inset: 0; box-sizing: border-box; border-radius: 16px; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.qy-back { transform: rotateY(180deg); display: flex; align-items: center; justify-content: center; border: 4px solid var(--gold);
  background: repeating-linear-gradient(45deg, rgba(255,214,110,.12) 0 6px, transparent 6px 14px), linear-gradient(#9a2216, #4a0c08); box-shadow: 0 6px 0 #3a0e08; }
.qy-back span { font-size: 64px; font-weight: 900; color: var(--gold-hi); text-shadow: var(--outline); }
.qy-front { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 10px 12px; color: #4a1c10;
  background: linear-gradient(180deg, #fff4da, #efd6a2); border: 4px solid var(--gold); box-shadow: 0 6px 0 #5a2412, 0 0 18px rgba(255,210,100,.45); }
.qy-ic { flex: none; width: 100px; height: 100px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle, rgba(255,226,140,.95), rgba(255,200,90,0) 70%); }
.qy-ic img { width: 92px; height: 92px; object-fit: contain; filter: drop-shadow(0 3px 0 rgba(80,30,10,.35)); }
.qy-nm { font-size: 18px; font-weight: 900; color: #fff3cf; line-height: 1.15; text-align: center; }
.qy-ds { margin: 0; font-size: 13px; font-weight: 700; line-height: 1.3; text-align: center; color: #5a2614; }
.qy-card:not(:disabled):hover, .qy-card.focus { transform: translateY(-6px) scale(1.04); filter: brightness(1.08) drop-shadow(0 0 12px rgba(255,214,110,.9)); }
.qy-card:not(:disabled):active { transform: scale(.96); }
.qy-card.chosen { z-index: 3; animation: qy-chosen 1.25s ease-in forwards; }
.qy-card.gone { animation: qy-gone .38s ease-in forwards; }
@keyframes qy-chosen { 0% { opacity: 1; transform: scale(1); } 28% { opacity: 1; transform: scale(1.2); } 72% { opacity: 1; transform: scale(1.24); filter: brightness(1.15) drop-shadow(0 0 22px #ffd86a); } 100% { opacity: 0; transform: scale(1.55); } }
@keyframes qy-gone { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(40px) scale(.8); } }
.qy-got { margin-top: auto; font-size: 16px; font-weight: 900; color: #ffe08a; text-align: center; }
.qy-hint { min-height: 20px; font-size: 15px; font-weight: 900; color: #f3dcae; animation: qy-pulse 1.4s ease-in-out infinite; }
@keyframes qy-pulse { 50% { opacity: .55; } }

.qy-heroes { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 780px; animation: eq-pop .22s cubic-bezier(.3,1.5,.5,1) both; }
.qy-hero { width: 104px; height: 126px; padding: 4px; box-sizing: border-box; border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 1px; cursor: pointer; font-family: inherit; color: var(--cream);
  background: linear-gradient(#6a2018, #3a0e0a); border: 3px solid var(--gold); box-shadow: 0 4px 0 #2a0805; transition: transform .12s; }
.qy-hero img { width: 74px; height: 74px; object-fit: contain; }
.qy-hero b { font-size: 13px; line-height: 1.1; }
.qy-hero small { font-size: 12px; color: #ffd86a; }
.qy-hero:hover, .qy-hero.focus { transform: translateY(-4px) scale(1.05); filter: brightness(1.12); }
.qy-back2 { align-self: center; min-width: 104px; min-height: 48px; }

.qy-scout { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 92vw; padding: 8px 12px; border-radius: 14px; background: rgba(42,12,8,.92); border: 3px solid var(--gold); animation: eq-pop .22s cubic-bezier(.3,1.5,.5,1) both; }
.qy-scT { font-size: 16px; font-weight: 900; color: #ffe2a0; }
.qy-scRow { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.qy-en { display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 10px; background: rgba(255,240,200,.08); border: 2px solid rgba(230,194,126,.6); }
.qy-en img { width: 34px; height: 34px; object-fit: contain; }
.qy-en b { font-size: 14px; color: var(--cream); }
.qy-en small { font-size: 14px; font-weight: 900; color: #ffd86a; }
.qy-en.boss { border-color: #ff7a5a; }
.qy-en.boss small { color: #ff9a7a; }
.qy-ok { position: relative; z-index: 2; min-width: 160px; min-height: 48px; flex: none; }
.qy-en.mini { padding: 3px 10px; border-style: dashed; border-color: #ffb45a; }
.qy-en.mini small { color: #ffc27a; font-size: 13px; }
/* the scout report replaces the cards: it scrolls inside itself so 確定 always stays on screen */
.qy-wrap.scouting { max-height: 94vh; }
.qy-wrap.scouting .qy-scout { min-height: 0; flex: 0 1 auto; overflow-y: auto; }

/* prep: the active 奇遇 effects (tap: what they do) */
.pp-right .qy-strip { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 1px; min-width: 48px; padding: 0 8px; }
.qy-strip img { width: 26px; height: 26px; object-fit: contain; pointer-events: none; }
.qy-strip b { font-size: 13px; font-weight: 900; color: var(--cream); }
.qy-info { width: min(92vw, 560px); max-height: 92vh; box-sizing: border-box; overflow: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 14px 14px; color: var(--cream); font-family: var(--font); animation: eq-pop .22s cubic-bezier(.3,1.5,.5,1) both; }
.qy-info .qy-title { margin: 0; }
.qy-list { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.qy-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; background: rgba(255,240,200,.08); }
.qy-row img { flex: none; width: 44px; height: 44px; object-fit: contain; }
.qy-row b { font-size: 16px; }
.qy-row p { margin: 0; font-size: 13px; color: #ecd9b2; }

.qy-modal.now, .qy-modal.now * { animation-duration: 0s !important; animation-delay: 0s !important; transition: none !important; }
@media (max-height: 520px) {
  .qy-wrap { gap: 5px; }
  .qy-rays { top: 36px; }
  .qy-chest { width: 66px; height: 66px; }
  .qy-title { margin-top: -10px; font-size: 17px; padding: 3px 26px 5px; }
  .qy-cards { gap: 10px; }
  .qy-card { width: 158px; height: 196px; }
  .qy-front { padding: 6px 7px 8px; gap: 2px; }
  .qy-ic { width: 66px; height: 66px; }
  .qy-ic img { width: 60px; height: 60px; }
  .qy-nm { font-size: 15px; }
  .qy-ds { font-size: 12px; line-height: 1.22; }
  .qy-got { font-size: 14px; }
  .qy-back span { font-size: 46px; }
  .qy-hint { font-size: 14px; min-height: 18px; }
  .qy-hero { width: 86px; height: 104px; }
  .qy-hero img { width: 56px; height: 56px; }
  .qy-en img { width: 26px; height: 26px; }
  .qy-en b, .qy-en small { font-size: 13px; }
  .pp-right .qy-strip { min-width: 44px; padding: 0 4px; }
  .qy-strip img { width: 22px; height: 22px; }
}
@media (max-width: 560px) {
  .qy-card { width: 30vw; }
}
