@charset "UTF-8";
/* assets/css/game.css */
.opponent-card { display: block; text-align: center; padding: 2.4rem 1.6rem; cursor: pointer; position: relative; transition: border-color .25s, background .25s; height: 100%; }
.opponent-card input { position: absolute; opacity: 0; }
.opponent-card:hover { border-color: var(--line-2); }
.opponent-card:has(input:checked) { border-color: var(--gold); background: linear-gradient(180deg, var(--gold-dim), transparent 70%), var(--surface); }
.opp-avatar { width: 72px; height: 72px; margin: 0 auto 1.2rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.7rem; color: var(--gold); border: 1px solid rgba(111,76,177,.4); }
.opp-level { text-transform: uppercase; letter-spacing: .3em; font-size: .62rem; font-weight: 600; color: var(--muted); margin-bottom: .4rem; }
.opponent-card .h4 { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; }
body.in-game { overflow: hidden; }
body.in-game .arcana-nav, body.in-game .arcana-footer { display: none; }
.arena { position: fixed; inset: 0; z-index: 1500; display: grid; grid-template-columns: minmax(0, 1fr) 340px; background: radial-gradient(ellipse 70% 55% at 50% 50%, #18205a, var(--bg) 78%); user-select: none;
  --cw: clamp(96px, 8.4vw, 136px); }
.arena[hidden] { display: none; }
.arena-main { display: grid; grid-template-rows: auto 1fr auto 1fr auto auto; min-height: 0; padding: 14px 24px 0; gap: 8px; position: relative; }
.pbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color .25s, box-shadow .25s; }
.pbar-id { display: flex; align-items: center; gap: 12px; min-width: 240px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 1.15rem; color: var(--gold); border: 1px solid rgba(111,76,177,.45); flex-shrink: 0; }
.pname { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; line-height: 1.1; }
.cp { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.cp-bar { width: 170px; height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
.cp-fill { height: 100%; width: 100%; background: var(--c-green); transition: width .6s cubic-bezier(.2,.8,.2,1), background .4s; }
.cp-fill.mid { background: #f5d27a; } .cp-fill.low { background: var(--c-red); }
.cp-val { font-size: .78rem; color: var(--muted); white-space: nowrap; } .cp-val b { color: var(--text); font-size: 1rem; font-weight: 600; }
.piles { display: flex; gap: 16px; font-size: .82rem; color: var(--muted); }
.piles b { color: var(--text); font-weight: 600; }
.dead-btn { background: none; border: 0; color: var(--muted); padding: 0; font-size: .82rem; }
.dead-btn:hover { color: var(--text); }
.pbar.targetable { border-color: var(--c-red); box-shadow: 0 0 0 1px var(--c-red); cursor: crosshair; }
.field { display: flex; justify-content: center; align-items: center; gap: clamp(10px, 1.4vw, 22px); min-height: 0; }
.slot { width: var(--cw); aspect-ratio: 400 / 556; border-radius: 10px; border: 1px dashed rgba(255,255,255,.09); position: relative; flex-shrink: 0; margin-bottom: 26px; }
.tok { position: absolute; inset: 0; cursor: pointer; border-radius: 10px; transition: box-shadow .2s, transform .2s, opacity .3s; }
.tok img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; display: block; pointer-events: none; box-shadow: 0 10px 24px rgba(0,0,0,.55); }
.tok .st { position: absolute; left: 0; right: 0; top: calc(100% + 6px); display: flex; justify-content: center; gap: 6px; font-size: .78rem; font-weight: 600; pointer-events: none; }
.tok .st span { padding: .08rem .5rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); white-space: nowrap; }
.tok .st .a { color: #f3c98b; } .tok .st .d { color: #cfc6f5; }
.tok .st .up { color: var(--c-green); border-color: rgba(127,191,143,.5); } .tok .st .down { color: var(--c-red); border-color: rgba(217,119,107,.5); }
.tok .st .pop { animation: pop .45s; }
@keyframes pop { 40% { transform: scale(1.25); } }
.tok:hover { transform: translateY(-3px); }
.tok.ready { box-shadow: 0 0 0 2px rgba(127,191,143,.85); }
.tok.selected { box-shadow: 0 0 0 2px var(--gold), 0 0 24px rgba(111,76,177,.35) !important; transform: translateY(-4px); }
.tok.pickable { box-shadow: 0 0 0 2px var(--gold); }
.tok.picked { box-shadow: 0 0 0 3px var(--c-red); opacity: .55; }
.tok.target { box-shadow: 0 0 0 2px var(--c-red); cursor: crosshair; }
.tok.spent img { filter: grayscale(.6) brightness(.75); }
.tok .badge-out { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); font-size: .66rem; font-weight: 700; letter-spacing: .08em; padding: .2rem .55rem; border-radius: 999px; white-space: nowrap; pointer-events: none; z-index: 3; }
.tok .badge-out.win { background: var(--c-green); color: #08130b; } .tok .badge-out.lose { background: var(--c-red); color: #1a0806; } .tok .badge-out.even { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-2); }
.tok .flag { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; background: rgba(7,8,12,.85); border: 1px solid var(--line-2); pointer-events: none; }
.tok.summoning { animation: summon .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes summon { from { opacity: 0; transform: translateY(-18px) scale(1.06); } }
.tok.flash img { animation: flash-img .4s; }
@keyframes flash-img { 40% { filter: brightness(1.7); } }
.tok.dying { animation: dying .4s ease-in forwards; pointer-events: none; }
@keyframes dying { to { opacity: 0; transform: scale(.92); filter: grayscale(1); } }
.tok.hit, .pbar.hit { animation: hit .35s; }
@keyframes hit { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.center-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 6px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.turn-info { display: flex; align-items: center; gap: 14px; }
.turn-txt { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; white-space: nowrap; }
.turn-txt.theirs { color: var(--muted); }
.phase-track { display: flex; gap: 2px; }
.phase-track span { padding: .2rem .6rem; font-size: .62rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #55534f; border-bottom: 1px solid transparent; }
.phase-track span.on { color: var(--gold); border-bottom-color: var(--gold); }
.hint { text-align: center; color: var(--muted); font-size: .9rem; max-width: 560px; }
.hint b { color: var(--text); font-weight: 600; }
.phase-btn { justify-self: end; min-width: 170px; }
.phase-btn.nudge { box-shadow: 0 0 0 4px var(--gold-dim); }
.hand { display: flex; justify-content: center; align-items: flex-end; gap: 8px; }
.hand-me { height: calc(var(--cw) * 1.39 * .62 + 14px); padding: 0 0 10px; overflow: visible; }
.hcard { flex: 0 1 var(--cw); min-width: 56px; aspect-ratio: 400 / 556; cursor: pointer; position: relative; align-self: flex-start; }
.hcard .hc-in { position: absolute; inset: 0; transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s; border-radius: 9px; }
.hcard img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; display: block; pointer-events: none; box-shadow: 0 10px 22px rgba(0,0,0,.55); }
.hand-me .hcard:hover .hc-in { transform: translateY(-22px); }
.hcard.playable .hc-in { box-shadow: 0 0 0 2px rgba(127,191,143,.85); }
.hcard.selected .hc-in { transform: translateY(-30px); box-shadow: 0 0 0 2px var(--gold), 0 0 24px rgba(111,76,177,.35); }
.hcard.drawn .hc-in { animation: drawn .4s cubic-bezier(.2,.8,.2,1) both; }
@keyframes drawn { from { opacity: 0; transform: translateY(30px); } }
.hand-opp { gap: 0; }
.hand-opp .hcard { flex: 0 0 24px; min-width: 0; height: 34px; aspect-ratio: auto; cursor: default; margin-left: -8px; }
.hand-opp .hcard img { border-radius: 3px; box-shadow: 0 2px 6px rgba(0,0,0,.6); }
.arena-side { border-left: 1px solid var(--line); background: var(--bg-2); padding: 18px; display: flex; flex-direction: column; min-height: 0; gap: 12px; }
.detail-empty { border: 1px dashed var(--line-2); border-radius: 12px; padding: 2rem 1rem; text-align: center; color: var(--muted); font-size: .88rem; }
.detail-card { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: start; }
.detail-card img { width: 120px; border-radius: 8px; box-shadow: 0 10px 24px rgba(0,0,0,.6); }
.d-name { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; line-height: 1.1; }
.d-meta { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; margin: 4px 0 8px; }
.d-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.d-stats span { font-size: .78rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; border: 1px solid var(--line-2); }
.d-eff { font-size: .82rem; color: #cfcac0; line-height: 1.5; border-left: 1px solid var(--gold); padding-left: .6rem; margin-top: 10px; }
.d-eff.inactive { color: var(--muted); border-left-color: var(--line-2); }
.actions { display: flex; flex-direction: column; gap: 8px; }
.actions:empty { display: none; }
.actions .act-title { font-size: .64rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.actions .act-note { font-size: .82rem; color: var(--muted); }
.actions .btn { text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 8px; text-transform: none; letter-spacing: .02em; font-size: .86rem; padding: .7rem 1rem; border-radius: 10px; }
.actions .btn small { font-weight: 400; opacity: .75; }
.log-title { font-size: .62rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.log { height: 180px; overflow-y: auto; font-size: .78rem; display: flex; flex-direction: column; gap: 2px; }
.log div { padding: .2rem 0; color: var(--muted); border-bottom: 1px solid rgba(255,255,255,.03); }
.log .dmg { color: #e0a49b; } .log .heal { color: #a9d3b3; } .log .summon { color: var(--text); } .log .event { color: var(--gold-2); } .log .attack { color: #e3c08f; }
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 2400; }
.float-num { position: fixed; font-family: var(--serif); font-weight: 700; font-size: 2rem; transform: translate(-50%,-50%); animation: float-up 1.1s ease-out forwards; z-index: 2500; pointer-events: none; white-space: nowrap; text-shadow: 0 4px 16px rgba(0,0,0,.9); }
.float-num.small { font-family: var(--sans); font-size: .9rem; font-weight: 700; }
.float-num.dmg { color: var(--c-red); } .float-num.heal { color: var(--c-green); } .float-num.buff { color: var(--gold-2); } .float-num.debuff { color: #b7a3d8; }
@keyframes float-up { 0% { opacity: 0; transform: translate(-50%,-30%); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-150%); } }
.overlay-center { position: fixed; inset: 0 340px 0 0; z-index: 2450; pointer-events: none; display: grid; place-items: center; }
.cast { text-align: center; animation: cast 1.1s ease forwards; }
.cast img { width: min(260px, 36vw); border-radius: 14px; box-shadow: 0 40px 90px rgba(0,0,0,.85), 0 0 0 1px var(--line-2); }
.cast div { margin-top: 14px; font-family: var(--serif); font-size: 1.5rem; }
@keyframes cast { 0% { opacity: 0; transform: translateY(14px) scale(.96); } 18% { opacity: 1; transform: none; } 82% { opacity: 1; } 100% { opacity: 0; } }
.turn-pill { font-family: var(--serif); font-size: 2.2rem; padding: .4rem 2.2rem; border-radius: 999px; background: rgba(7,8,12,.92); border: 1px solid var(--line-2); animation: pill .9s ease forwards; letter-spacing: .06em; }
.turn-pill.mine { color: var(--gold-2); border-color: rgba(111,76,177,.5); }
@keyframes pill { 0% { opacity: 0; } 20% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }
.coin { width: 120px; height: 120px; position: relative; transform-style: preserve-3d; animation: coin-flip 1.1s cubic-bezier(.3,.6,.3,1) forwards; margin: 0 auto; }
.coin div { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; backface-visibility: hidden; font-family: var(--serif); font-weight: 700; font-size: 1.1rem; letter-spacing: .1em; background: radial-gradient(circle at 35% 30%, #fff3c4, #f5d27a 55%, #a67c2b); color: #3a2a06; border: 2px solid #9b7be0; }
.coin .tails { transform: rotateY(180deg); background: radial-gradient(circle at 35% 30%, #e4e2dc, #9b988f 55%, #55534d); border-color: #cfcac0; }
@keyframes coin-flip { from { transform: rotateY(0) translateY(0); } 50% { transform: rotateY(var(--spin)) translateY(-70px); } to { transform: rotateY(var(--spin)); } }
.reveal-title { text-align: center; font-family: var(--serif); font-size: 1.3rem; margin-bottom: 10px; }
.reveal-row { display: flex; gap: 10px; }
.reveal-row img { width: 120px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.7); }
.pick-stage { pointer-events: auto; background: rgba(7,8,12,.9); border: 1px solid var(--line-2); border-radius: 16px; padding: 18px 22px; max-width: 92vw; }
.pick-stage .reveal-row { flex-wrap: wrap; justify-content: center; }
.pick-card { padding: 0; border: 0; background: none; border-radius: 8px; cursor: pointer; transition: transform .15s; }
.pick-card:hover, .pick-card:focus-visible { transform: translateY(-6px); outline: 2px solid var(--gold-2); }
.pick-options { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.trap-tag { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; padding: 3px 9px; border-radius: 999px; font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  color: #f0e6ff; background: rgba(94, 31, 51, .9); border: 1px solid rgba(255,255,255,.18); box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.trap-tag[hidden] { display: none; }
.clash { position: fixed; z-index: 2500; transform: translate(-50%,-50%); font-weight: 700; font-size: .95rem; padding: .3rem .8rem; border-radius: 999px; background: rgba(7,8,12,.92); border: 1px solid var(--line-2); pointer-events: none; white-space: nowrap; animation: pill .9s ease forwards; }
.gameover { position: fixed; inset: 0; z-index: 2800; display: grid; place-items: center; background: rgba(5,6,9,.94); animation: fade .5s; pointer-events: auto; }
@keyframes fade { from { opacity: 0; } }
.go-box { text-align: center; padding: 2rem; max-width: 640px; }
.go-kicker { text-transform: uppercase; letter-spacing: .4em; font-size: .7rem; color: var(--muted); }
.go-title { font-family: var(--serif); font-weight: 500; font-size: clamp(3.4rem, 9vw, 6.4rem); line-height: 1; margin: .3rem 0 1rem; animation: go-in .9s ease both; }
.victory .go-title { color: var(--gold-2); }
.defeat .go-title { color: #cfcac0; }
@keyframes go-in { from { opacity: 0; letter-spacing: .3em; } }
.go-stats { display: flex; justify-content: center; gap: 2.4rem; margin: 1.6rem 0; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; }
.go-stats b { display: block; font-family: var(--serif); font-size: 2rem; color: var(--text); letter-spacing: 0; font-weight: 600; }
.go-reward { margin-bottom: 1.8rem; color: var(--muted); }
@media (max-width: 1100px) {
  .arena { grid-template-columns: 1fr; }
  .arena-side { position: fixed; right: 0; bottom: 0; width: 300px; max-height: 46vh; z-index: 20; border-top: 1px solid var(--line); border-radius: 14px 0 0 0; }
  .arena-side .log, .arena-side .log-title { display: none; }
  .overlay-center { inset: 0; }
}
@media (max-height: 820px) { .arena { --cw: clamp(84px, 7vw, 112px); } .log { height: 120px; } }
.fx-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 2470; }
.fx-shard { position: fixed; z-index: 2465; pointer-events: none; background-repeat: no-repeat; border-radius: 2px; box-shadow: 0 0 10px var(--c), inset 0 0 6px rgba(255,255,255,.35); }
.fx-ghost { position: fixed; z-index: 55; pointer-events: none; object-fit: cover; border-radius: 8px; opacity: .45; filter: brightness(1.6) saturate(1.4) blur(1px); animation: fx-ghost .42s ease-out forwards; }
@keyframes fx-ghost { to { opacity: 0; transform: scale(.94); } }
.fx-flash { position: fixed; inset: 0; z-index: 2480; pointer-events: none; background: radial-gradient(circle at 50% 50%, #fff 0%, var(--c) 35%, transparent 80%); mix-blend-mode: screen; animation: fx-flash .38s ease-out forwards; }
@keyframes fx-flash { from { opacity: .85; } to { opacity: 0; } }
.fx-pillar { position: fixed; width: 120px; height: 0; z-index: 2462; pointer-events: none; transform: translateX(-50%); }
.fx-pillar::before { content: ""; position: absolute; left: 50%; bottom: 0; width: 70px; height: 100vh; transform: translateX(-50%) scaleX(.2); transform-origin: bottom;
  background: linear-gradient(to top, #fff 0%, var(--c) 18%, color-mix(in srgb, var(--c) 40%, transparent) 55%, transparent 100%); filter: blur(6px); mix-blend-mode: screen; animation: fx-pillar 1.05s cubic-bezier(.2,.7,.3,1) forwards; }
.fx-pillar::after { content: ""; position: absolute; left: 50%; top: 0; width: 160px; height: 46px; transform: translate(-50%,-50%); border-radius: 50%;
  background: radial-gradient(ellipse, #fff 0%, var(--c) 35%, transparent 70%); mix-blend-mode: screen; animation: fx-pool 1.05s ease-out forwards; }
@keyframes fx-pillar { 0% { opacity: 0; transform: translateX(-50%) scaleX(.1); } 18% { opacity: 1; transform: translateX(-50%) scaleX(1.25); } 60% { opacity: .85; transform: translateX(-50%) scaleX(.9); } 100% { opacity: 0; transform: translateX(-50%) scaleX(.05); } }
@keyframes fx-pool { 0% { opacity: 0; scale: .3; } 25% { opacity: 1; scale: 1.2; } 100% { opacity: 0; scale: 1.6; } }
.fx-banner { position: fixed; inset: 0; z-index: 2490; pointer-events: none; display: grid; place-items: center; }
.fx-banner .fb-dim { position: absolute; inset: 0; background: radial-gradient(circle, transparent 20%, rgba(4,2,12,.78) 75%); animation: fb-dim 1.5s ease forwards; }
.fx-banner .fb-band { position: relative; width: 100%; display: flex; align-items: center; justify-content: center; gap: clamp(14px, 3vw, 34px); padding: 18px 16px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--c) 28%, rgba(8,5,20,.92)) 22%, color-mix(in srgb, var(--c) 28%, rgba(8,5,20,.92)) 78%, transparent);
  border-block: 1px solid color-mix(in srgb, var(--c) 70%, transparent); box-shadow: 0 0 60px color-mix(in srgb, var(--c) 45%, transparent); animation: fb-band 1.5s cubic-bezier(.2,.8,.2,1) forwards; }
.fx-banner img { height: clamp(90px, 16vh, 150px); border-radius: 8px; box-shadow: 0 0 0 2px var(--c), 0 0 40px var(--c); animation: fb-img 1.5s cubic-bezier(.2,.8,.2,1) forwards; }
.fx-banner small { display: block; font-size: .8rem; letter-spacing: .3em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.fx-banner b { display: block; font-family: var(--serif); font-size: clamp(2rem, 6vw, 3.6rem); line-height: 1; letter-spacing: .08em; text-transform: uppercase; color: var(--c);
  text-shadow: 0 0 24px var(--c), 0 4px 0 rgba(0,0,0,.5); }
.fx-banner span { display: block; margin-top: 6px; font-weight: 700; font-size: clamp(1rem, 2.4vw, 1.35rem); color: #fff; }
.fx-banner.r-mythic b { background: linear-gradient(90deg, #ff6fd0, #f3dc8f, #7fe3ff, #ff6fd0); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: fb-shine 1.5s linear; }
@keyframes fb-dim { 0% { opacity: 0; } 15%, 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes fb-band { 0% { opacity: 0; transform: scaleY(0); } 14% { opacity: 1; transform: scaleY(1.15); } 22% { transform: none; } 78% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateX(8%) scaleY(.6); } }
@keyframes fb-img { 0% { transform: translateX(-60px) rotate(-8deg) scale(.7); opacity: 0; } 20% { transform: none; opacity: 1; } 80% { transform: scale(1.04); opacity: 1; } 100% { opacity: 0; } }
@keyframes fb-shine { to { background-position: 300% 0; } }
.tok.summon-slam { animation: summon-slam .5s cubic-bezier(.5,0,.75,0) both; z-index: 30; }
.tok.summon-slam.big { animation-duration: .62s; }
@keyframes summon-slam { 0% { opacity: 0; transform: translateY(-120px) scale(1.5); filter: brightness(2.4) blur(3px); }
  70% { opacity: 1; transform: translateY(4px) scale(.97); filter: brightness(1.6) blur(0); } 85% { transform: translateY(-3px) scale(1.02); } 100% { transform: none; filter: none; } }
.tok.summon-glow::after { content: ""; position: absolute; inset: -6px; border-radius: 10px; pointer-events: none; box-shadow: 0 0 0 2px var(--sc), 0 0 28px var(--sc); animation: summon-glow 1.1s ease-out forwards; }
@keyframes summon-glow { from { opacity: 1; } to { opacity: 0; } }
.pbar.danger { animation: cp-danger 1s ease-in-out infinite; }
@keyframes cp-danger { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,60,80,0); } 50% { box-shadow: 0 0 0 2px rgba(255,60,80,.7), 0 0 26px rgba(255,60,80,.55); } }
.float-num.crit { font-size: 3.2rem; color: #ff3b55; -webkit-text-stroke: 1px rgba(255,255,255,.35); animation: float-crit 1.2s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes float-crit { 0% { opacity: 0; transform: translate(-50%,-50%) scale(2.2); } 12% { opacity: 1; transform: translate(-50%,-50%) scale(.9); } 22% { transform: translate(-50%,-50%) scale(1.05); } 100% { opacity: 0; transform: translate(-50%,-170%) scale(1); } }
#board.defeat-fade { transition: filter 1.2s ease; filter: grayscale(.85) brightness(.6); }
@media (prefers-reduced-motion: reduce) { .pbar.danger { animation: none; } }
.go-shop { display: inline-flex; align-items: center; gap: 12px; padding-left: 14px !important; text-align: left; line-height: 1.1; }
.go-shop img { width: 34px; height: auto; margin: -10px 0; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); transform: rotate(-6deg); }
.go-shop span { display: flex; flex-direction: column; }
.go-shop small { font-size: .72rem; font-weight: 600; opacity: .8; letter-spacing: .02em; text-transform: none; }
.go-shop s { opacity: .65; }
.coach-bubble { position: fixed; z-index: 3000; max-width: min(340px, calc(100vw - 24px)); padding: 14px 16px 12px; border-radius: 14px; color: #fff;
  background: linear-gradient(180deg, #2a1f5a, #17123a); box-shadow: 0 0 0 1px rgba(249,231,161,.55), 0 18px 40px rgba(0,0,0,.6), 0 0 30px rgba(155,123,224,.35);
  animation: coach-in .35s cubic-bezier(.2,.9,.3,1.3) both; }
.coach-bubble::after { content: ""; position: absolute; bottom: -7px; left: calc(var(--ax, 50%) - 7px); width: 14px; height: 14px; transform: rotate(45deg);
  background: #17123a; box-shadow: 1px 1px 0 rgba(249,231,161,.55); }
.coach-bubble p { margin: 0 0 8px; font-size: .9rem; line-height: 1.4; }
.coach-bubble button { float: right; border: 0; border-radius: 999px; padding: .25rem .85rem; font-size: .78rem; font-weight: 800; color: #1a1205;
  background: linear-gradient(180deg, #fff1c1, #e9bf55 55%, #b58a2c); }
.coach-bubble.out { opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; }
@keyframes coach-in { from { opacity: 0; transform: translateY(10px) scale(.96); } }
body.arena-page #hand0.hand-me { position: relative !important; display: block !important; overflow: visible !important; }
body.arena-page #hand0 .hcard { position: absolute !important; left: 0 !important; top: 0 !important; margin: 0 !important; flex: none !important;
  width: var(--hw, var(--cw)) !important; transform-origin: 50% 110% !important;
  transform: translate(var(--x, 0), var(--y, 0)) rotate(var(--r, 0deg)) !important;
  transition: transform .26s cubic-bezier(.2,.8,.2,1) !important; }
body.arena-page #hand0 .hcard + .hcard { margin-left: 0 !important; }
body.arena-page #hand0 .hcard:hover { transform: translate(var(--x, 0), var(--y, 0)) rotate(var(--r, 0deg)) !important; }
body.arena-page #hand0 .hcard:hover .hc-in, body.arena-page #hand0 .hcard .hc-in { transform: none !important; transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s !important; }
body.arena-page #hand0 .hcard.is-focus .hc-in { transform: translateY(calc(-1 * var(--lift, 38%))) scale(var(--zoom, 1.24)) !important; box-shadow: 0 24px 50px rgba(0,0,0,.7), 0 0 0 2px rgba(249,231,161,.6) !important; }
body.arena-page #hand0 .hcard.is-focus.playable .hc-in { box-shadow: 0 24px 50px rgba(0,0,0,.7), 0 0 0 2px #6be38f, 0 0 26px rgba(107,227,143,.5) !important; }
body.arena-page #hand0 .hcard.dragging { opacity: .35; }
#hand0 .hc-lv { position: absolute; left: 4%; top: 3%; z-index: 2; pointer-events: none; min-width: 2.1em; padding: .12em .38em; border-radius: 6px;
  font: 800 clamp(.58rem, .9vw, .78rem)/1.2 Roboto, sans-serif; letter-spacing: .02em; text-align: center; color: #1a1205;
  background: linear-gradient(180deg, #fff1c1, #e9bf55 60%, #b58a2c); box-shadow: 0 2px 6px rgba(0,0,0,.6); transition: opacity .2s; }
#hand0 .hc-lv.is-act { color: #fff; background: linear-gradient(180deg, #b48cff, #6f4cb1); }
#hand0 .hcard.is-focus .hc-lv { opacity: 0; }
@media (prefers-reduced-motion: reduce) { body.arena-page #hand0 .hcard, body.arena-page #hand0 .hcard .hc-in { transition: none !important; } }
@media (max-width: 575px) { body.arena-page .hand-row #hand0.hand-me { flex: none !important; } }
@media (max-width: 575px) { body.arena-page #arena { padding-top: 0 !important; } body.arena-page .arena-main.board-v8 { margin-top: 0 !important; } }
body.arena-page .arena-gate .ag-exit { position: absolute; top: max(14px, env(safe-area-inset-top)); left: 16px; z-index: 5; display: inline-flex; align-items: center; gap: 8px;
  padding: .5rem 1rem; border-radius: 999px; font-size: .85rem; font-weight: 700; color: #f2e6c4; text-decoration: none;
  background: rgba(10,8,24,.62); box-shadow: inset 0 0 0 1px rgba(249,231,161,.35), 0 6px 18px rgba(0,0,0,.45); transition: background .2s, color .2s; }
body.arena-page .arena-gate .ag-exit:hover { color: #fff; background: rgba(40,30,80,.85); }
body.arena-page .arena-gate.is-leaving .ag-exit { opacity: 0; pointer-events: none; }
body.arena-page .center-bar .cb-quit { display: none; }
@media (max-width: 575px) {
  body.arena-page .center-bar { position: relative; }
  body.arena-page .center-bar .cb-quit { display: grid; place-items: center; position: absolute; left: -24px; top: 50%; transform: translateY(-50%); z-index: 5;
    width: 34px; height: 34px; border-radius: 50%; border: 0; color: #f2e6c4; font-size: .95rem;
    background: rgba(10,8,24,.7); box-shadow: inset 0 0 0 1px rgba(249,231,161,.35); }
}
@media (max-width: 575px) {
  body.arena-page .arena-side { bottom: calc(100dvh - var(--hand-top, 70dvh) + 8px) !important; max-height: calc(var(--hand-top, 70dvh) - 24px) !important; }
}
@media (max-width: 575px) {
  body.arena-page .board-v8 .hand-row .hand-me { height: calc(var(--hw) * 1.39 + 10px) !important; }
  body.arena-page .board-v8 .hand-actions .phase-btn { min-height: 44px; }
  body.arena-page .center-bar .cb-quit { width: 44px; height: 44px; left: -22px; }
}
.vs-panel { max-width: 560px; padding: 28px 28px 24px; border-radius: 18px; text-align: left; }
.vs-title { font-size: 1.35rem; font-weight: 800; margin: 0 0 6px; color: #fff; display: flex; align-items: center; gap: 10px; }
.vs-title i { color: #ff6b7d; }
.vs-sub { color: rgba(242,230,196,.78); font-size: .92rem; margin: 0 0 18px; }
.vs-formats { border: 0; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.vs-format { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; cursor: pointer;
  background: rgba(10,8,24,.45); box-shadow: inset 0 0 0 1px rgba(249,231,161,.18); }
.vs-format:has(input:checked) { box-shadow: inset 0 0 0 2px #e9bf55; }
.vs-format:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.vs-format input { margin-top: 4px; accent-color: #e9bf55; }
.vs-format b { display: block; color: #fff; }
.vs-format small { color: rgba(242,230,196,.7); }
.vs-deck { margin: 0 0 16px; }
.vs-link { display: flex; gap: 8px; margin: 0 0 12px; }
.vs-link input { font-family: ui-monospace, Consolas, monospace; }
.vs-share { display: flex; gap: 8px; flex-wrap: wrap; }
.vs-share .btn { min-height: 44px; }
#vsView .btn-lg, .vs-link .btn { min-height: 44px; }
#vsView #vsConnect { margin-top: 0; }
#turnTxt.hurry { color: #ff6b7d; }
@media (max-width: 575px) { .vs-panel { padding: 20px 16px; } .vs-link { flex-direction: column; } }
.vs-clock { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font: 800 .78rem/1.5 Roboto, sans-serif;
  color: #1a1205; background: linear-gradient(180deg, #fff1c1, #e9bf55); vertical-align: middle; font-variant-numeric: tabular-nums; }
.vs-clock.hurry { color: #fff; background: linear-gradient(180deg, #ff8a96, #d8344a); animation: vs-clock-pulse 1s ease-in-out infinite; }
@keyframes vs-clock-pulse { 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .vs-clock.hurry { animation: none; } }
.gameover2.stopped .go-headline { color: #c9c3e0; }
.go-sub .go-name { text-transform: none; }
html.arena-anim-wait .arena-gate .vb-dust i, html.arena-anim-wait .arena-gate .ag-title, html.arena-anim-wait .arena-gate .ag-bg img,
html.arena-anim-wait .lobby .vb-dust i, html.arena-anim-wait .lobby .vb-rays, html.arena-anim-wait .lobby .vb-glow,
body.gate-open #lobby *, body.gate-open #lobby *::before, body.gate-open #lobby *::after,
html.arena-hidden body *, html.arena-hidden body *::before, html.arena-hidden body *::after { animation-play-state: paused !important; }
body.arena-page.gate-open #lobby { visibility: hidden; }
@media (max-width: 575px) {
  body.arena-page .arena-main.board-v8 { --cw: calc((100vw - 36px - 4 * 5px) / 5);
    grid-template-rows: auto auto auto auto 1fr auto !important; }
  body.arena-page .arena-main.board-v8 #field1 { margin-top: 8px; }
  body.arena-page .arena-main.board-v8 .pbar-me, body.arena-page .arena-main.board-v8 .pstat-me { align-self: end; }
  body.arena-page .board-v8 .hand-row #hand0.hand-me { --hw: calc(var(--cw) * 1.3); }
}
.mode-poster[data-mode="free"] .mp-cta { color: #1d1405; background: linear-gradient(180deg, #fff4c2, #e9bf55 55%, #b8862c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 10px 26px rgba(233, 191, 85, .4); }
@media (max-width: 575px) { body.card-sheet .coach-bubble { visibility: hidden; } }
body.arena-page .arena-gate .ag-other { position: absolute; left: 50%; top: calc(100% + 14px); transform: translateX(-50%); opacity: 0; pointer-events: none;
  background: none; border: 0; padding: 10px 14px; min-height: 44px; color: rgba(242,230,196,.78); font-size: .9rem; text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer; white-space: nowrap; transition: opacity .45s ease .25s, color .2s; }
body.arena-page .arena-gate.is-ready .ag-other { opacity: 1; pointer-events: auto; }
body.arena-page .arena-gate .ag-other:hover, body.arena-page .arena-gate .ag-other:focus-visible { color: #fff4c2; }
body.arena-page.arena-direct:not(.in-game) #lobby { visibility: hidden; }
body.arena-page.arena-direct:not(.in-game) .sound-toggle { visibility: hidden; } 
@media (max-width: 575px) { body.arena-page .board-v8 .hand-actions { min-height: 64px; } } 
body.arena-page .arena-gate:has(.ag-other:not([hidden])) { padding-bottom: calc(max(7vh, 40px) + 64px + env(safe-area-inset-bottom, 0px)); }
body.arena-page .arena-gate .ag-enter.is-busy { animation: none; cursor: progress; opacity: .92; } 
.go-next { display: inline-flex; align-items: center; gap: 12px; text-align: left; line-height: 1.1; }
.go-next > i { font-size: 1.5rem; }
.go-next span { display: flex; flex-direction: column; }
.go-next small { font-size: .72rem; font-weight: 600; opacity: .8; letter-spacing: .02em; text-transform: none; }
.go-challenges { display: grid; gap: 6px; margin: 4px auto 14px; max-width: 420px; text-align: left; }
.go-challenges .gc-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; font-size: .9rem; color: #f2e6c4;
  background: rgba(10,8,24,.6); box-shadow: inset 0 0 0 1px rgba(249,231,161,.25); }
.go-challenges .gc-row i { color: #e9bf55; font-size: 1.1rem; }
.go-challenges .gc-row em { margin-left: auto; font-style: normal; font-weight: 800; color: #fff4c2; white-space: nowrap; }
.go-challenges .gc-reward { box-shadow: inset 0 0 0 1px rgba(233,191,85,.6); }
.ch-panel { max-width: 760px; margin: 0 auto 26px; padding: 16px 18px 14px; border-radius: 18px; text-align: left;
  background: rgba(10,8,24,.62); box-shadow: inset 0 0 0 1px rgba(249,231,161,.22), 0 12px 30px rgba(0,0,0,.35); }
.ch-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ch-title { margin: 0; font-size: 1.05rem; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 8px; }
.ch-title i, .ch-seals i { color: #e9bf55; }
.ch-seals { font-size: .85rem; font-weight: 700; color: #f2e6c4; }
.ch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ch-item { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; padding: 10px 12px; border-radius: 12px;
  background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.ch-item.is-weekly { box-shadow: inset 0 0 0 1px rgba(155,109,255,.45); }
.ch-label { color: #f2e6c4; font-size: .92rem; font-weight: 600; }
.ch-label small { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #b48cff; }
.ch-reward { font-weight: 900; color: #1a1205; background: linear-gradient(180deg, #fff1c1, #e9bf55); border-radius: 999px; padding: 2px 10px; font-size: .8rem; }
.ch-item.is-done { box-shadow: inset 0 0 0 1px rgba(63,191,115,.45); } 
.ch-item.is-done .ch-reward { background: linear-gradient(180deg, #8ff0b0, #3fbf73); }
.ch-bar { grid-column: 1; height: 6px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; }
.ch-bar i { display: block; height: 100%; background: linear-gradient(90deg, #b8862c, #e9bf55); }
.ch-count { grid-column: 2; font-size: .75rem; color: rgba(242,230,196,.7); text-align: right; }
.ch-guest { margin: 12px 0 0; font-size: .88rem; color: rgba(242,230,196,.85); }
.ch-connect { background: none; border: 0; padding: 0 2px; color: #e9bf55; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 32px; }
.ch-trophies { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; min-height: 36px; color: #e9bf55; font-weight: 800; font-size: .88rem; text-decoration: underline; text-underline-offset: 3px; }
.ch-equip { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: .85rem; color: #f2e6c4; }
.ch-equip select { background: rgba(10,8,24,.8); color: #fff; border: 1px solid rgba(249,231,161,.35); border-radius: 10px; padding: 6px 10px; min-height: 36px; }
@media (max-width: 575px) { .ch-panel { margin: 0 12px 20px; padding: 14px; } }
.go-actions .go-discord { flex-basis: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  font-size: .9rem; font-weight: 700; color: rgba(242,230,196,.8); text-decoration: underline; text-underline-offset: 3px; }
.go-actions .go-discord i { color: #8f9cff; font-size: 1.1rem; }
.go-actions .go-discord:hover, .go-actions .go-discord:focus-visible { color: #fff4c2; }
body.arena-page #hand0 .hcard.selected:not(.is-focus) .hc-in { transform: translateY(-14px) !important; box-shadow: 0 0 0 2px var(--gold, #e9bf55), 0 0 18px rgba(233,191,85,.5) !important; }
.arena-side .sheet-close { position: absolute; top: 6px; right: 6px; z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 50%; background: rgba(10,8,24,.75); color: #f2e6c4; font-size: 1.05rem; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(249,231,161,.4); }
.arena-side .sheet-close:hover, .arena-side .sheet-close:focus-visible { background: rgba(40,30,70,.9); color: #fff; outline: 2px solid #e9bf55; outline-offset: 1px; }
.arena-side .detail:has(.sheet-close) .d-name { padding-right: 44px; }
@media (max-width: 1100px) { .arena-side { transition: transform .18s ease-out; } }
body.arena-page .board-v8 .pstat-opp, body.arena-page .board-v8 .pstat-me { pointer-events: none; }
body.arena-page .board-v8 .pstat-opp > *, body.arena-page .board-v8 .pstat-me > * { pointer-events: auto; }
body.arena-page .board-v8 .field { position: relative; z-index: 6; pointer-events: none; }
body.arena-page .board-v8 .field > .slot:has(> .tok) { pointer-events: auto; } 
@media (max-width: 575px) {
  body.arena-page .center-bar .cb-quit { z-index: 1; transform: translateY(calc(-50% - 9px)); }
}
body.arena-page.attack-mode .tok.selected { box-shadow: 0 0 0 3px #f3d27a, 0 0 26px rgba(243,210,122,.75) !important; transform: translateY(-6px); }
body.arena-page .tok.target { box-shadow: 0 0 0 3px #ff5d6c, 0 0 22px rgba(255,93,108,.55) !important; animation: tok-target 1.2s ease-in-out infinite; }
@keyframes tok-target { 50% { box-shadow: 0 0 0 3px #ff5d6c, 0 0 34px rgba(255,93,108,.8); } }
@media (prefers-reduced-motion: reduce) { body.arena-page .tok.target { animation: none; } }
@media (max-width: 575px) {
  body.arena-page.sheet-field .arena-side { max-height: calc(var(--hand-top, 70dvh) - var(--field-bottom, 40dvh) - 12px) !important; overflow-y: auto; } 
  body.arena-page.attack-mode .arena-side .inspect-card, body.arena-page.attack-mode .arena-side .d-eff,
  body.arena-page.attack-mode .arena-side .d-meta, body.arena-page.attack-mode .arena-side .d-stats, body.arena-page.attack-mode .arena-side .act-title,
  body.arena-page.attack-mode .arena-side > .d-flex { display: none !important; }
  body.arena-page.attack-mode .arena-side { padding: 8px 12px !important; gap: 6px !important; }
  body.arena-page.attack-mode .arena-side .detail .d-name { font-size: .95rem !important; padding-right: 40px; }
  body.arena-page.attack-mode .arena-side .sheet-close { top: 2px; right: 2px; }
  body.arena-page.attack-mode .arena-side .act-note { font-size: .74rem; margin: 0; line-height: 1.25; }
  body.arena-page.attack-mode .arena-side .actions .btn { padding: .4rem .8rem; }
}
@media (max-width: 575px) {
  body.arena-page .tok .badge-out { top: 4px; left: 3px; right: 3px; transform: none; white-space: normal; text-align: center; line-height: 1.1;
    font-size: .56rem; letter-spacing: .02em; padding: .18rem .2rem; }
}
.ft-notes { display: grid; gap: 8px; margin: 10px 0 4px; }
.ft-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0; padding: 10px 14px; border-radius: 14px; font-size: .88rem; color: #f2e6c4; background: rgba(233, 191, 85, .08); box-shadow: inset 0 0 0 1px rgba(233, 191, 85, .35); }
.ft-note > i { color: #e9bf55; }
.ft-note > span:first-of-type { flex: 1 1 220px; }
.ft-note a { color: #e9bf55; }
.ft-btns { display: flex; gap: 8px; font-weight: 700; }
.ft-btns .btn { min-height: 36px; min-width: 64px; }
.ag-invite { margin: 4px 0 10px; font-size: .9rem; font-weight: 600; color: #f9e7a1; text-shadow: 0 2px 8px rgba(0, 0, 0, .8); }
.go-invite { background: none; border: 0; cursor: pointer; font: inherit; }
.rk-line { margin: 0 0 8px; font-size: .9rem; color: #f2e6c4; }
.rk-hour { color: rgba(242, 230, 196, .75); font-size: .85rem; }
.rk-wait { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; font-weight: 700; color: #f9e7a1; }
.rk-banner { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 2000; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; max-width: min(560px, calc(100vw - 32px));
  padding: 12px 16px; border-radius: 14px; background: rgba(14, 10, 32, .96); box-shadow: 0 0 0 1px #e9bf55, 0 10px 30px rgba(0, 0, 0, .6); color: #fff4d2; font-size: .9rem; }
.rk-banner i { color: #e9bf55; }
.rk-banner .btn { min-height: 40px; }
.go-cards { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin: 14px 0 8px; }
.go-card { display: block; width: 84px; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px rgba(233, 191, 85, .5), 0 8px 18px rgba(0, 0, 0, .5); transition: transform .2s; }
.go-card:nth-child(2) { width: 92px; transform: translateY(-6px); }
.go-card:hover, .go-card:focus-visible { transform: translateY(-10px); }
.go-card img { display: block; width: 100%; height: auto; aspect-ratio: 400 / 556; object-fit: cover; }
.go-pitch { margin: 6px 0 2px; font-weight: 800; color: #fff; }
@media (max-width: 575px) { .go-card { width: 72px; } .go-card:nth-child(2) { width: 80px; } }
