/* Exploding Pufferfish (framework version) */
.pf { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
@media (max-width: 1000px) { .pf { grid-template-columns: 1fr; } }
.pf-main { min-width: 0; } .pf-side { display: flex; flex-direction: column; gap: 12px; } .pf-side .card { padding: 12px; }
.pf-players { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.pf-pl { display: flex; gap: 6px; align-items: center; background: #0a2633; border: 3px solid #2a6a86; border-radius: 999px; padding: 4px 12px 4px 4px; }
.pf-pl .av { width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 3px solid var(--pc); display: grid; place-items: center; line-height: 0; box-sizing: border-box; }
.pf-pl .n { color: var(--muted); font-size: .85rem; } .pf-pl .x2 { background: #d8443a; color: #fff; border-radius: 999px; padding: 0 8px; font-weight: 900; }
.pf-pl.cur { border-color: #ffd24a; box-shadow: 0 0 14px rgba(255,210,74,.5); } .pf-pl.out { opacity: .45; }
.pf-table { padding: 14px; display: flex; flex-direction: column; gap: 12px; background: radial-gradient(ellipse at 50% 40%, #1d6a87, #0e3c52); }
.pf-piles { display: flex; gap: 18px; align-items: center; justify-content: center; flex-wrap: wrap; }
.pf-deck { width: 120px; height: 170px; border-radius: 14px; border: 4px solid #f3ead2; background: repeating-linear-gradient(45deg, #0b2a3a, #0b2a3a 10px, #123d52 10px, #123d52 20px); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 8px 16px rgba(0,0,0,.4); }
.pf-deck:disabled { cursor: default; opacity: .85; } .pf-deck:not(:disabled):hover { transform: translateY(-3px); box-shadow: 0 0 18px #ffd24a; }
.pf-deck .ic { font-size: 3rem; } .pf-deck b { font-size: 1.6rem; }
.pf-odds { color: #cfe3ec; text-align: center; } .pf-odds b { font-size: 1.6rem; color: #ffb3a8; }
.pc-card { width: 120px; min-height: 170px; border-radius: 14px; background: #f3ead2; color: #1d1a17; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; padding: 10px 8px; box-sizing: border-box; text-align: center; border: 4px solid #8a6d3b; box-shadow: 0 6px 12px rgba(0,0,0,.35); }
.pc-card .ic { font-size: 2.6rem; line-height: 1.2; } .pc-card b { font-size: .92rem; line-height: 1.15; } .pc-card small { font-size: .68rem; color: #5a4a35; line-height: 1.2; }
.pc-card.boom { background: #ffd9d2; border-color: #d8443a; } .pc-card.safe { background: #d9f5e1; border-color: #2f9e5b; } .pc-card.act { background: #d9ecff; border-color: #2f7fd1; } .pc-card.nope { background: #f0dcff; border-color: #9b5de5; }
.pc-card.sm { width: 90px; min-height: 120px; } .pc-card.sm small { display: none; } .pc-card.sm .ic { font-size: 2rem; }
.pf-pending { display: flex; gap: 14px; align-items: center; justify-content: center; background: rgba(8,28,38,.7); border-radius: 14px; padding: 10px; color: #fff; }
.pf-pending.noped .pc-card { filter: grayscale(.8); }
.pf-pending .bar { height: 8px; background: #12384b; border-radius: 4px; margin: 8px 0; overflow: hidden; min-width: 180px; } .pf-pending .bar i { display: block; height: 100%; background: #ffd24a; width: 100%; transform-origin: left center; will-change: transform; }
@keyframes pfNahBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.pf-pending .nopes { color: #e3c8ff; font-weight: 800; }
.pf-pending .nopebtn { background: #9b5de5; color: #fff; margin-right: 8px; }
.pf-seen { color: #fff; } .pf-seen .row { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.pf-me { margin-top: 12px; padding: 12px; }
.pf-status { font: 800 1.1rem system-ui; color: var(--muted); margin-bottom: 8px; } .pf-status.me { color: #ffd24a; }
.pf-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; } .pf-btns .btn { flex: 1 1 200px; }
.pf-insert { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; } .pf-insert input { flex: 1 1 160px; }
.pf-hand { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-h { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 14px; transition: transform .12s; }
.pf-h:hover { transform: translateY(-4px); } .pf-h.sel { transform: translateY(-10px); box-shadow: 0 0 0 4px #ffd24a; }
.pf-targets { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
@media (max-width: 600px) { .pc-card { width: 92px; min-height: 132px; padding: 6px 4px; } .pc-card .ic { font-size: 2rem; } .pc-card small { font-size: .6rem; } .pf-deck { width: 92px; height: 132px; } }
.pf .endbox { margin-top: 12px; }

/* card drawings (art.js) and the pop-up */
.pc-art { display: inline-block; line-height: 0; border-radius: 10px; box-shadow: 0 3px 10px rgba(0,0,0,.3); }
.pc-art svg { display: block; }
.pf-pending.noped .pc-art { filter: grayscale(.8); }
.pf-pop { position: fixed; inset: 0; z-index: 900; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(4,18,28,0); transition: background .25s; cursor: pointer; }
.pf-pop.on { background: rgba(4,18,28,.55); }
.pf-popcard { width: min(300px, 70vw); animation: pfFly .55s cubic-bezier(.2,1.4,.4,1) both, pfWob 2.2s .6s ease-in-out infinite; }
.pf-popcard svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 14px 30px rgba(0,0,0,.55)); }
.pf-popcap { color: #fff; font: 800 1.2rem system-ui, sans-serif; text-shadow: 0 2px 6px #000; text-align: center; padding: 0 12px; }
.pf-poptap { position: absolute; bottom: 6vh; color: #cfe6ee; font-size: .85rem; opacity: .8; }
@keyframes pfFly { 0% { transform: translate(0, 45vh) scale(.2) rotate(-25deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes pfWob { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg) translateY(-6px); } }
.pf-bub { position: absolute; border-radius: 50%; border: 2px solid rgba(191,230,255,.8); animation: pfRise 1.8s ease-out forwards; pointer-events: none; }
@keyframes pfRise { from { transform: translateY(0) scale(.6); opacity: 1; } to { transform: translateY(-55vh) scale(1.2); opacity: 0; } }
.pf-pop.boom { animation: pfShake .5s .45s 2; }
.pf-pop.boom.on { background: rgba(120,10,20,.6); }
.pf-pop.boom .pf-popcard, .pf-pop.saved .pf-popcard { animation: pfFly .45s cubic-bezier(.2,1.4,.4,1) both, pfPuff .5s .45s ease-in-out 3; }
.pf-pop.saved.on { background: rgba(10,60,30,.55); }
@keyframes pfPuff { 50% { transform: scale(1.12) rotate(3deg); } }
@keyframes pfShake { 0%, 100% { transform: none; } 20% { transform: translate(-10px, 4px); } 40% { transform: translate(9px, -6px); } 60% { transform: translate(-7px, -3px); } 80% { transform: translate(6px, 5px); } }
.pf-boomtxt { position: absolute; font: 900 clamp(56px, 12vw, 150px)/1 'Arial Black', Impact, sans-serif; color: #ffd166; -webkit-text-stroke: 6px #7a0019; paint-order: stroke; transform: rotate(-12deg); animation: pfBt .9s .5s both; pointer-events: none; }
.pf-boomtxt.saved { color: #b7f5c8; -webkit-text-stroke-color: #0b4d26; font-size: clamp(40px, 9vw, 110px); }
@keyframes pfBt { 0% { transform: scale(.2) rotate(-12deg); opacity: 0; } 60% { transform: scale(1.15) rotate(-8deg); opacity: 1; } 100% { transform: scale(1) rotate(-12deg); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pf-popcard, .pf-pop.boom, .pf-boomtxt, .pf-bub { animation: none !important; } }
