/* =====================================================================
   DRIP WARS UI v2 — one visual language + motion layer (loads after style.css)
   Sticker-comic panels, WACK brand colours, spring entrances, live HUD.
   html.calm (reduced motion / "reduced visuals") switches the motion off.
   ===================================================================== */
:root{--wk-y:#ffe03a;--wk-b:#38b6ff;--wk-w:#ffffff;--wk-p:#ff3d8e;--wk-g:#7ed745;--ink:#0b0812;
  --panel:#100c1ae8;--panel-2:#191329;--line:#ffffff1f;--spring:cubic-bezier(.2,1.25,.32,1);--out:cubic-bezier(.16,1,.3,1);
  --stripe:linear-gradient(90deg,var(--wk-y) 0 25%,var(--wk-b) 25% 50%,var(--wk-w) 50% 75%,var(--wk-p) 75%)}

/* ---------- keyframes ---------- */
@keyframes fx-panel-in{from{opacity:0;translate:0 26px;scale:.965}to{opacity:1;translate:0 0;scale:1}}
@keyframes fx-item-in{from{opacity:0;translate:0 12px}to{opacity:1;translate:0 0}}
@keyframes fx-pop{0%{scale:.6;opacity:0}60%{scale:1.08;opacity:1}100%{scale:1}}
@keyframes fx-stripe{to{background-position:200% 0}}
@keyframes fx-shine{from{translate:-120% 0}to{translate:220% 0}}
@keyframes fx-wobble{0%,100%{rotate:0deg}30%{rotate:-8deg}60%{rotate:6deg}}
@keyframes fx-float{0%,100%{translate:0 0}50%{translate:0 -6px}}
@keyframes fx-glow{0%,100%{box-shadow:0 0 0 0 #ff3d8e00}50%{box-shadow:0 0 22px 2px #ff3d8e66}}
@keyframes fx-hit{0%,100%{translate:0 0}20%{translate:-5px 1px}40%{translate:4px -1px}60%{translate:-3px 0}80%{translate:2px 0}}
@keyframes fx-low{0%,100%{filter:none}50%{filter:brightness(1.6) saturate(1.4)}}
@keyframes fx-tick{0%{scale:1.25;color:#ff3d8e}100%{scale:1}}
@keyframes fx-drift{from{background-position:0 0,0 0}to{background-position:420px -840px,-300px -600px}}
@keyframes fx-ticker{from{translate:0 0}to{translate:-50% 0}}
@keyframes fx-fade-away{to{opacity:0}}
@keyframes fx-notice-in{from{opacity:0;translate:0 -14px;scale:.9}to{opacity:1;translate:0 0;scale:1}}

/* ---------- ambient menu backdrop: drifting doodles behind the menus ---------- */
#fxBackdrop{position:absolute;inset:0;z-index:3;pointer-events:none;opacity:0;transition:opacity .6s;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cg fill='none' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M60 70l8 18 20 2-15 13 5 19-18-10-17 10 4-19-15-13 20-2z' stroke='%23ffe03a55'/%3E%3Cellipse cx='300' cy='90' rx='22' ry='28' stroke='%237ed74555'/%3E%3Cellipse cx='292' cy='92' rx='5' ry='8' fill='%237ed74533'/%3E%3Cellipse cx='308' cy='92' rx='5' ry='8' fill='%237ed74533'/%3E%3Cpath d='M180 300c10-14 30-14 30 4 0 16-30 30-30 30s-30-14-30-30c0-18 20-18 30-4z' stroke='%23ff3d8e55'/%3E%3Cpath d='M350 290l10 10m0-10l-10 10M90 330l14 0m-7-7v14' stroke='%2338b6ff66'/%3E%3Ccircle cx='230' cy='190' r='6' stroke='%23ffffff33'/%3E%3C/g%3E%3C/svg%3E"),
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cg fill='none' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M50 220l6 12 13 1-10 9 3 13-12-7-11 7 3-13-10-9 13-1z' stroke='%2338b6ff44'/%3E%3Ccircle cx='220' cy='60' r='9' stroke='%23ffe03a44'/%3E%3Cpath d='M240 230q20-20 40 0' stroke='%23ff3d8e44'/%3E%3C/g%3E%3C/svg%3E");
  animation:fx-drift 90s linear infinite}
body:is(.menu,.adventure,.story,.scores,.cards,.duels,.profile,.event) #fxBackdrop{opacity:1}

/* ---------- panels: one family ---------- */
:is(.story-card,.scores-card,.adventure-card,.duel-card,.lobby-card,.profile-card,.code-tournament-card,.share-panel,.accounts-panel,.help-card,.result-card,.settings-panel,.game-menu .game-menu-inner,.cards-card){
  border-radius:18px;box-shadow:0 0 0 1px #000,8px 8px 0 #00000080,0 24px 70px #000a;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);position:relative}
:is(.story-card,.scores-card,.adventure-card,.duel-card,.lobby-card,.profile-card,.code-tournament-card,.share-panel,.accounts-panel,.help-card,.result-card,.settings-panel){
  background:radial-gradient(120% 60% at 0% 0%,#ff3d8e14,transparent 60%),radial-gradient(90% 60% at 100% 100%,#38b6ff12,transparent 60%),var(--panel)!important;border:1px solid var(--line)!important}
/* brand stripe across the top of every panel */
:is(.story-card,.scores-card,.adventure-card,.duel-card,.lobby-card,.profile-card,.code-tournament-card,.share-panel,.accounts-panel,.help-card,.result-card,.settings-panel,.cards-card)::before{
  content:'';position:absolute;top:0;left:18px;right:18px;height:4px;border-radius:0 0 4px 4px;background:var(--stripe);background-size:200% 100%;animation:fx-stripe 6s linear infinite;z-index:5;pointer-events:none}
.fx-enter{animation:fx-panel-in .42s var(--spring) backwards}
.fx-item{animation:fx-item-in .38s var(--out) backwards;animation-delay:calc(var(--i,0) * 32ms + 80ms)}

/* headings */
:is(.story-card,.scores-card,.adventure-card,.duel-card,.lobby-card,.profile-card,.code-tournament-card,.cards-card,.result-card) h2{
  font-family:Bangers,Impact,sans-serif!important;letter-spacing:.02em;text-shadow:3px 3px 0 #ff3d8e,6px 6px 0 #00000088;rotate:-1.5deg;transform-origin:left}
.eyebrow{display:inline-block;padding:4px 10px;border-radius:999px;background:#ffe03a1a;border:1px solid #ffe03a55;color:var(--wk-y)!important}
:is(.story-card,.scores-card,.adventure-card,.cards-card,.duel-card,.code-tournament-card) h3{font-family:Bangers,Impact,sans-serif;letter-spacing:1px;font-weight:400}

/* ---------- buttons ---------- */
.primary{position:relative;overflow:hidden;border-radius:6px;transition:translate .18s var(--spring),box-shadow .18s,background .15s,filter .15s!important}
.primary::after{content:'';position:absolute;top:0;bottom:0;left:0;width:38%;background:linear-gradient(100deg,transparent,#ffffffb0,transparent);translate:-120% 0;pointer-events:none}
.primary:hover::after,.primary:focus-visible::after{animation:fx-shine .7s ease}
.primary:hover:not(:disabled){translate:-2px -2px;box-shadow:8px 8px 0 #6a2b96}
.primary:active:not(:disabled){translate:2px 2px;box-shadow:2px 2px 0 #6a2b96;filter:brightness(.95)}
.setting-button,.text-button{border-radius:999px!important;transition:background .15s,border-color .15s,translate .18s var(--spring),box-shadow .2s}
.setting-button:hover:not(:disabled){border-color:var(--wk-y);box-shadow:0 0 14px #ffe03a44;translate:0 -1px}
.panel-close{border-radius:50%!important;transition:rotate .3s var(--spring),background .15s,border-color .15s}
.panel-close:hover{rotate:90deg;background:#ff3d8e!important;border-color:#fff!important}

/* menu mode buttons: brand edge, slide + icon wobble */
.mode-button{position:relative;border-radius:12px!important;overflow:hidden;transition:translate .22s var(--spring),border-color .15s,box-shadow .2s,background .2s!important}
.mode-button::before{content:'';position:absolute;left:0;top:0;bottom:0;width:5px;background:var(--stripe);background-size:100% 400%;opacity:.9}
.mode-button:hover,.mode-button:focus-visible{translate:6px 0;box-shadow:-6px 0 0 #ff3d8e inset,0 8px 24px #0008}
.mode-button:hover>b,.mode-button:focus-visible>b{animation:fx-wobble .5s ease}
.mode-daily>b{animation:fx-float 2.4s ease-in-out infinite}
.start-card h1{animation:fx-pop .6s var(--spring) backwards}
.start-card h1 em{display:inline-block;animation:fx-float 3.2s ease-in-out infinite}

/* inputs */
:is(select,input:not([type=range]):not([type=checkbox]),textarea){border-radius:10px!important;transition:border-color .15s,box-shadow .15s}
:is(select,input,textarea):focus{border-color:var(--wk-y)!important;box-shadow:0 0 0 3px #ffe03a33}

/* tables: hover lift, medal ranks */
.scores-table table{border-collapse:separate;border-spacing:0 4px}
.scores-table th{background:transparent!important;color:#bdb3cf!important;font-size:11px;letter-spacing:1.5px;text-transform:uppercase;border:0!important}
.scores-table td{background:#ffffff08;border:0!important;transition:background .15s}
.scores-table tr td:first-child{border-radius:10px 0 0 10px;font-weight:900}.scores-table tr td:last-child{border-radius:0 10px 10px 0}
.scores-table tr:hover td{background:#ffffff14}
.scores-table tr:nth-child(2) td:first-child{color:var(--wk-y)}.scores-table tr:nth-child(3) td:first-child{color:#d8e2f0}.scores-table tr:nth-child(4) td:first-child{color:#ff9f5a}

/* tabs as pills */
.score-tabs [role=tab],.trial-floors button{border-radius:999px!important;transition:background .2s,color .2s,translate .2s var(--spring)}
.score-tabs [role=tab][aria-selected=true],.trial-floors button[aria-selected=true]{box-shadow:0 0 18px #ffe03a55;translate:0 -2px}

/* scrollbars */
*{scrollbar-width:thin;scrollbar-color:#ff3d8e66 transparent}
::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-thumb{background:#ff3d8e66;border-radius:8px}

/* live ticker on the main menu */
.fx-ticker{margin-top:14px;overflow:hidden;border-radius:999px;border:1px solid #ffffff22;background:#0008;mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent)}
.fx-ticker>div{display:flex;width:max-content;animation:fx-ticker 38s linear infinite}
.fx-ticker span{white-space:nowrap;padding:7px 18px;font-size:11px;font-weight:900;letter-spacing:1.5px;color:#e9e3f6}
.fx-ticker b{color:var(--wk-y);margin-right:6px}
.fx-ticker:hover>div{animation-play-state:paused}

/* result card + callouts pop */
.result-card:not([hidden]) #resultTitle{animation:fx-pop .5s var(--spring) .1s backwards;display:inline-block}

/* ---------- fight HUD: damage trail, hit shake, low health ---------- */
.health{position:relative}
.health>div{position:relative;z-index:1}
.health .hp-trail{position:absolute;top:0;bottom:0;left:0;z-index:0;background:#fff;opacity:.85;transition:width .55s cubic-bezier(.3,.7,.2,1)}
.enemy .health .hp-trail{left:auto;right:0}
.fighter-hud.fx-hit{animation:fx-hit .32s ease}
.fighter-hud.fx-low .health>div{animation:fx-low .7s ease-in-out infinite}
#timer.fx-tick{animation:fx-tick .45s ease;display:inline-block}
/* controls cheat-sheet fades away once you're playing (hover the bottom to bring it back) */
body.playing .desktop-controls{animation:fx-fade-away .8s ease 7s forwards}
body.playing .desktop-controls:hover{animation:none;opacity:1}

/* ---------- ADVENTURE HUD: compact, out of the way ---------- */
html[data-play=adventure] .hud{grid-template-columns:minmax(0,300px) 1fr minmax(0,240px);gap:12px;top:max(64px,calc(env(safe-area-inset-top) + 56px))}
html[data-play=adventure] .fighter-hud{background:#0b0812b8;border:1px solid #ffffff1c;border-radius:14px;padding:8px 10px;backdrop-filter:blur(6px)}
html[data-play=adventure] .name-row{margin-bottom:5px}
html[data-play=adventure] .name-row strong{font-size:15px;letter-spacing:1px;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html[data-play=adventure] .name-row span{font-size:9px}
html[data-play=adventure] .name-row b{font-size:13px;letter-spacing:3px}
html[data-play=adventure] .health{height:9px}
html[data-play=adventure] .health-number{font-size:9px;margin-top:2px}
html[data-play=adventure] .energy{height:3px;margin-top:4px}
html[data-play=adventure] .surge{height:12px;margin-top:5px;max-width:none;border-radius:6px}
html[data-play=adventure] .surge span{font-size:8px;line-height:11px}
html[data-play=adventure] .round-hud{justify-self:center;background:#0b0812b8;border:1px solid #ffffff1c;border-radius:999px;padding:4px 16px;flex-direction:row;gap:10px;align-items:baseline;height:max-content}
html[data-play=adventure] .round-hud>strong{font-size:20px;line-height:1.2}
html[data-play=adventure] .round-hud>span,html[data-play=adventure] .round-hud>small{font-size:9px;letter-spacing:1px}
/* the current target shrinks to a slim tag (bosses stay bigger) */
html[data-play=adventure] .fighter-hud.enemy{opacity:.92}
html[data-play=adventure] .fighter-hud.enemy .surge,html[data-play=adventure] .fighter-hud.enemy .energy{display:none}
html[data-play=adventure]:not([data-boss]) .fighter-hud.enemy .health-number{display:none}
/* objective: compact pill under the floor timer; the hint folds away after a few seconds */
html[data-play=adventure] .adventure-notice{--adventure-notice-top:116px;padding:5px 14px;border-radius:999px;background:#0b0812c4;border-color:#64f8de44;max-width:min(560px,80vw);animation:fx-notice-in .35s var(--spring)}
html[data-play=adventure] .adventure-notice strong{display:inline;font-size:15px}
html[data-play=adventure] .adventure-notice .drip-count{display:inline;margin:0 0 0 10px;font-size:14px}
html[data-play=adventure] .adventure-notice span{display:block;font-size:11px;max-height:40px;overflow:hidden;transition:max-height .35s ease,opacity .35s}
html[data-play=adventure] .adventure-notice:not(.fx-fresh) span{max-height:0;opacity:0}
/* minimap: smaller, see-through, grows on hover */
html[data-play=adventure] .adventure-navigation{top:auto;bottom:22px;right:16px;width:96px;opacity:.78;border-radius:12px;transition:width .25s var(--spring),opacity .2s}
html[data-play=adventure] .adventure-navigation:hover{width:150px;opacity:1}
html[data-play=adventure] .adventure-navigation span{display:none}
@media (max-width:700px){
  html[data-play=adventure] .hud{grid-template-columns:minmax(0,1fr) auto minmax(0,.8fr);gap:6px;left:8px;right:8px}
  html[data-play=adventure] .fighter-hud{padding:5px 7px;border-radius:10px}
  html[data-play=adventure] .name-row strong{font-size:12px;max-width:110px}
  html[data-play=adventure] .name-row span{display:none}
  html[data-play=adventure] .surge{height:9px}
  html[data-play=adventure] .surge span{display:none}
  html[data-play=adventure] .round-hud{flex-direction:column;gap:0;padding:3px 9px;border-radius:12px}
  html[data-play=adventure] .round-hud>strong{font-size:14px}
  html[data-play=adventure] .round-hud>small{display:none}
  html[data-play=adventure] .adventure-notice{--adventure-notice-top:auto;top:calc(var(--fx-hud-bottom,110px) + 6px);padding:3px 10px}
  html[data-play=adventure] .adventure-notice strong{font-size:12px}
  html[data-play=adventure] .adventure-notice .drip-count{font-size:12px}
  html[data-play=adventure] .adventure-navigation{bottom:auto;top:calc(var(--fx-hud-bottom,110px) + 44px);right:8px;width:64px}
}

/* ---------- calm mode: no motion ---------- */
html.calm *,html.calm *::before,html.calm *::after{animation:none!important;transition:none!important}
html.calm #fxBackdrop{display:none}

/* ---------- tab bars (Adventure) ---------- */
.fx-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:14px 0 12px;padding:5px;border-radius:999px;background:#00000059;border:1px solid #ffffff14;width:max-content;max-width:100%}
.fx-tabs button{border:0;background:transparent;color:#cfc6de;padding:9px 16px;border-radius:999px;font-weight:900;font-size:12px;letter-spacing:1px;cursor:pointer;transition:background .2s,color .2s,translate .2s var(--spring)}
.fx-tabs button:hover{color:#fff;background:#ffffff12}
.fx-tabs button[aria-selected=true]{background:var(--wk-y);color:#140d1f;box-shadow:0 0 18px #ffe03a55}
.fx-tab:not([hidden]){animation:fx-item-in .35s var(--out)}
.adventure-card .daily-panel{margin-top:0}
.adventure-card .boss-manual>div{border-radius:12px}
@media (max-width:600px){.fx-tabs{width:100%;border-radius:14px}.fx-tabs button{flex:1 1 40%;padding:8px 6px;font-size:11px}}

/* ---------- main menu: grouped tile grid instead of a 12-button list ---------- */
@media (min-width:851px){.start-card{grid-template-columns:minmax(0,1.3fr) minmax(0,.8fr)!important;width:min(1180px,100%)!important;gap:clamp(24px,4vw,60px)!important}}
.main-actions{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px!important}
.main-actions .mode-button{grid-column:span 3;min-height:62px;padding:10px 14px 10px 16px}
.main-actions .mode-button small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
.main-actions .mode-button>span{min-width:0}
.mode-story{order:1}.mode-adventure{order:2}.mode-daily{order:3}.mode-primary{order:4}.mode-duel{order:5}.mode-discord{order:6}
.main-actions :is(.mode-cards,.mode-roster,.mode-codes,.mode-record,.mode-scores,.mode-exit){grid-column:span 2;order:10;min-height:70px;flex-direction:column-reverse;justify-content:center;align-items:center;text-align:center;gap:4px;padding:8px 6px}
.main-actions :is(.mode-cards,.mode-roster,.mode-codes,.mode-record,.mode-scores,.mode-exit) small{display:none}
.main-actions :is(.mode-cards,.mode-roster,.mode-codes,.mode-record,.mode-scores,.mode-exit)>span{font-size:11px;letter-spacing:1px}
.main-actions :is(.mode-cards,.mode-roster,.mode-codes,.mode-record,.mode-scores,.mode-exit)>b{font-size:20px;line-height:1}
.main-actions :is(.mode-cards,.mode-roster,.mode-codes,.mode-record,.mode-scores,.mode-exit):hover{translate:0 -3px;box-shadow:0 -4px 0 #ff3d8e inset,0 10px 24px #0008}
.mode-roster>b{font-size:13px!important;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.mode-exit{opacity:.75}
.menu-player{padding:10px 12px!important;border-radius:14px}
.menu-player p{margin:4px 0 0!important}
.start-card h1{font-size:clamp(48px,6vw,80px)!important;line-height:.88;margin:10px 0 12px!important}
.menu-feature{animation:fx-float 6s ease-in-out infinite;transition:rotate .4s var(--spring)}
.menu-feature:hover{rotate:-1.5deg}
@media (max-width:600px){
  .main-actions .mode-button{grid-column:span 6;min-height:54px}
  .main-actions :is(.mode-cards,.mode-roster,.mode-codes,.mode-record,.mode-scores,.mode-exit){grid-column:span 2;min-height:58px}
  .main-actions .mode-story,.main-actions .mode-adventure,.main-actions .mode-daily,.main-actions .mode-primary,.main-actions .mode-duel,.main-actions .mode-discord{grid-column:span 3}
  .main-actions .mode-button small{font-size:9px}
}

/* fight HUD polish */
.health{border-radius:3px}
.player .health>div{background:linear-gradient(90deg,#ffe03a,#fff36b 70%,#fffbd0)!important}
.enemy .health>div{background:linear-gradient(270deg,#ff3d8e,#ff6fb0 70%,#ffd0e6)!important}
.name-row strong{font-family:Bangers,ImpactLocal,'Arial Black',sans-serif!important;letter-spacing:1.5px!important;text-shadow:2px 2px 0 #000}
.round-hud>strong{text-shadow:0 0 18px #ffe03a55}
.daily-panel .scores-table,#adventureTimes{min-height:0!important;height:auto!important}
.fx-ripple{position:absolute;border-radius:50%;background:radial-gradient(circle,#ffffff66,#ffffff00 70%);pointer-events:none;scale:0;animation:fx-ripple .55s ease-out forwards}
@keyframes fx-ripple{to{scale:1;opacity:0}}
.menu-feature{transition:transform .25s var(--out),rotate .4s var(--spring)}

/* Quick Match */
.quick-box{margin:14px 0 6px}
.quick-match{font-size:20px!important;min-height:64px!important;letter-spacing:2px!important;background:linear-gradient(90deg,#ffe03a,#fff36b)!important;animation:fx-glow 2.6s ease-in-out infinite}
.quick-status{display:flex;align-items:center;gap:14px;padding:12px 16px;border-radius:14px;border:2px solid #ffe03a;background:#ffe03a12}
.quick-status[hidden]{display:none}
.quick-status>div{flex:1;min-width:0}.quick-status strong{display:block;font:22px Bangers,Impact,sans-serif;letter-spacing:1px;color:#ffe03a}.quick-status span{font-size:12px;color:#d9d1e8}
.quick-radar{width:38px;height:38px;border-radius:50%;border:2px solid #ffe03a88;position:relative;flex:none;background:conic-gradient(from 0deg,#ffe03a66,transparent 30%);animation:fx-spin 1.2s linear infinite}
@keyframes fx-spin{to{rotate:360deg}}
.quick-or{text-align:center;font-size:11px;letter-spacing:2px;color:#9f95b3;margin:12px 0 6px;font-weight:900}

/* Trades */
.trade-open{position:relative}.trade-open i{font-style:normal;position:absolute;top:-6px;right:-6px;min-width:18px;height:18px;border-radius:9px;background:#ff3d8e;color:#fff;font-size:11px;line-height:18px;text-align:center;font-weight:900;animation:fx-pop .4s var(--spring)}
.trade-panel,.trade-gift{position:absolute;inset:12px;z-index:30;overflow:auto;padding:18px 20px;border-radius:16px;background:#0e0a18f5;border:1px solid #ffffff22;box-shadow:0 20px 60px #000c;animation:fx-panel-in .35s var(--spring)}
.trade-gift{inset:12px 12px auto auto;width:min(380px,calc(100% - 24px));z-index:45}
.trade-panel[hidden],.trade-gift[hidden]{display:none}
.trade-panel header{display:flex;justify-content:space-between;align-items:center}.trade-panel h3,.trade-gift h3{font:28px Bangers,Impact,sans-serif;letter-spacing:1px;margin:0;color:#ffe03a}
.trade-panel h4{font:16px Bangers,Impact,sans-serif;letter-spacing:1px;margin:14px 0 6px;color:#e9e3f6}.trade-panel h4 small{font:600 11px system-ui,sans-serif;color:#9f95b3;margin-left:6px}
.trade-chip{display:inline-flex;align-items:center;gap:5px;padding:4px 9px;margin:2px;border-radius:999px;border:1px solid var(--rar);background:color-mix(in srgb,var(--rar) 16%,transparent);font-size:12px;font-weight:700;white-space:nowrap}.trade-chip b{color:var(--rar);font-size:10px}
.trade-row{padding:12px 14px;margin:8px 0;border-radius:12px;background:#ffffff0a;border:1px solid #ffffff14;animation:fx-item-in .35s var(--out)}
.trade-row>strong{display:block;margin-bottom:6px}.trade-side{display:flex;flex-wrap:wrap;align-items:center;gap:2px;margin:3px 0}.trade-side em{font-style:normal;font-size:10px;font-weight:900;letter-spacing:1.5px;color:#9f95b3;width:68px}
.trade-actions{display:flex;gap:10px;align-items:center;margin-top:8px}.trade-actions .primary{width:auto;min-height:40px;padding:8px 18px}
.trade-note{font-style:italic;color:#cfc6de;font-size:13px;margin:6px 0 0}.trade-empty{color:#9f95b3;font-size:13px}.trade-free{font-size:12px;color:#7ed745}
.trade-find{display:flex;gap:8px;margin:10px 0}.trade-find input{flex:1}
.trade-cols{display:grid;grid-template-columns:1fr 1fr;gap:14px}.trade-pick{max-height:34vh;overflow:auto;display:flex;flex-direction:column;gap:4px;padding-right:4px}
.trade-pick-card{display:flex;align-items:center;justify-content:space-between;gap:6px;background:#ffffff08;border:1px solid #ffffff14;border-radius:10px;padding:3px 8px;color:#fff;cursor:pointer;text-align:left}
.trade-pick-card[data-used]{border-color:#ffe03a;background:#ffe03a18}.trade-pick-card small{color:#9f95b3;font-weight:900}
.trade-summary{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:12px 0;padding:10px;border-radius:12px;background:#0006}.trade-summary b{display:block;font-size:10px;letter-spacing:1.5px;color:#9f95b3}
#tradeNote{width:100%;margin-bottom:10px}
.card-trade-actions{display:flex;gap:8px;margin:8px 0}
@media (max-width:640px){.trade-cols,.trade-summary{grid-template-columns:1fr}}

/* merged hit popups punch when the count goes up */
.comic-word.comic-combo{animation:fx-combo-punch .25s var(--spring)}
@keyframes fx-combo-punch{0%{filter:brightness(2.2)}100%{filter:none}}

/* ---------- Adventure boss bar + intro ---------- */
.boss-bar{position:absolute;z-index:3;left:50%;translate:-50% 0;top:calc(var(--fx-hud-bottom,120px) + 46px);width:min(620px,86vw);padding:8px 14px 6px;border-radius:14px;background:#0b0812d0;border:2px solid #a35cff;box-shadow:0 0 30px #a35cff55;pointer-events:none;animation:fx-panel-in .4s var(--spring)}
.boss-bar[hidden]{display:none}
.boss-bar-top{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.boss-bar-top strong{font:22px Bangers,Impact,sans-serif;letter-spacing:1.5px;color:#fff;text-shadow:2px 2px 0 #a35cff}
.boss-bar-top span{font-size:11px;font-weight:900;letter-spacing:1.5px;color:#ffe03a}
.boss-bar-track{position:relative;height:14px;margin-top:5px;border-radius:7px;background:#221a33;overflow:hidden;border:1px solid #ffffff30}
.boss-bar-track i{position:absolute;left:0;top:0;bottom:0;width:100%}
.boss-bar-trail{background:#fff;opacity:.85;transition:width .6s cubic-bezier(.3,.7,.2,1)}
.boss-bar-fill{background:linear-gradient(90deg,#7b2cff,#c45bff 60%,#ff3d8e)}
.boss-bar small{display:block;text-align:right;font-size:10px;font-weight:800;color:#cfc6de;margin-top:2px}
.boss-bar.hit{animation:fx-hit .3s ease}
.boss-bar.low .boss-bar-fill{animation:fx-low .6s ease-in-out infinite}
html[data-play=adventure][data-boss] .fighter-hud.enemy{visibility:hidden}
html[data-play=adventure][data-boss] .adventure-notice{display:none}
.boss-intro{position:absolute;inset:0;z-index:6;pointer-events:none;display:flex;flex-direction:column;justify-content:space-between}
.boss-intro[hidden]{display:none}
.boss-intro>i{height:0;background:#000;transition:height .35s var(--out)}
.boss-intro.go>i{height:11vh;animation:fx-bars 2.5s ease forwards}
.boss-intro>div{position:absolute;left:0;right:0;top:50%;translate:0 -50%;text-align:center}
.boss-intro span{display:inline-block;padding:4px 14px;border-radius:999px;background:#ff3d8e;color:#fff;font-weight:900;letter-spacing:4px;font-size:13px}
.boss-intro strong{display:block;font:clamp(44px,9vw,110px) Bangers,Impact,sans-serif;letter-spacing:3px;color:#fff;text-shadow:4px 4px 0 #a35cff,8px 8px 0 #0009}
.boss-intro small{display:block;font-weight:900;letter-spacing:3px;color:#ffe03a}
.boss-intro.go>div{animation:fx-boss-title 2.5s var(--out) forwards}
@keyframes fx-boss-title{0%{opacity:0;scale:1.6}12%{opacity:1;scale:1}80%{opacity:1;scale:1.04}100%{opacity:0;scale:1.1}}
@keyframes fx-bars{0%,85%{height:11vh}100%{height:0}}
@media (max-width:700px){.boss-bar{top:calc(var(--fx-hud-bottom,110px) + 8px);padding:5px 10px}.boss-bar-top strong{font-size:16px}.boss-bar-track{height:10px}}

/* ---------- Tournament broadcast view ---------- */
.broadcast{position:absolute;inset:0;z-index:7;pointer-events:none;font-family:system-ui,sans-serif}
.broadcast[hidden]{display:none}
html.broadcast-on .topline,html.broadcast-on .desktop-controls,html.broadcast-on #networkStatus{opacity:0!important}
html.broadcast-on .hud{top:max(18px,env(safe-area-inset-top))}
html.broadcast-on .spectator-bar{opacity:.18;transition:opacity .2s;bottom:auto;top:max(10px,env(safe-area-inset-top));left:auto;width:min(560px,60vw)}
html.broadcast-on .spectator-bar:hover,html.broadcast-on .spectator-bar:focus-within{opacity:1}
.bc-bug{position:absolute;left:18px;top:110px;display:flex;gap:10px;align-items:center;padding:8px 14px 8px 8px;border-radius:12px;background:#0b0812d8;border:1px solid #ffffff22}
.bc-bug i{font-style:normal;font-weight:900;font-size:12px;letter-spacing:1.5px;color:#fff;background:#ff2b4f;border-radius:6px;padding:4px 8px;animation:fx-glow 1.6s ease-in-out infinite}
.bc-bug strong{display:block;font:20px Bangers,Impact,sans-serif;letter-spacing:1px;color:#ffe03a}.bc-bug span{font-size:11px;font-weight:800;letter-spacing:1px;color:#d9d1e8}
.bc-bracket{position:absolute;right:18px;top:110px;width:240px;padding:10px 12px;border-radius:12px;background:#0b0812c8;border:1px solid #ffffff22}
.bc-bracket h4{margin:0 0 6px;font:16px Bangers,Impact,sans-serif;letter-spacing:1px;color:#38b6ff}
.bc-match{display:grid;grid-template-columns:1fr auto 1fr;gap:6px;align-items:center;font-size:12px;font-weight:700;padding:4px 6px;border-radius:8px;margin:3px 0;background:#ffffff08}
.bc-match em{font-style:normal;font-size:9px;color:#9f95b3}.bc-match span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bc-match span:last-child{text-align:right}
.bc-match.live{background:#ff2b4f22;outline:1px solid #ff2b4f88}.bc-match .win{color:#7ed745}.bc-match.complete span:not(.win){opacity:.45;text-decoration:line-through}
.bc-plate{position:absolute;left:50%;translate:-50% 0;bottom:max(22px,env(safe-area-inset-bottom));display:grid;grid-template-columns:1fr auto 1fr;align-items:stretch;width:min(900px,94vw);filter:drop-shadow(0 10px 30px #000c)}
.bc-side{padding:10px 18px;display:flex;flex-direction:column;justify-content:center}
.bc-side strong{font:clamp(22px,3vw,40px) Bangers,Impact,sans-serif;letter-spacing:1.5px;line-height:1;color:#111;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bc-side span{font-size:16px;letter-spacing:4px;color:#111}
.bc-side.p1{background:linear-gradient(90deg,#ffe03a,#fff36b);clip-path:polygon(0 0,100% 0,96% 100%,0 100%);border-radius:12px 0 0 12px}
.bc-side.p2{background:linear-gradient(270deg,#ff3d8e,#ff7cb6);clip-path:polygon(4% 0,100% 0,100% 100%,0 100%);text-align:right;align-items:flex-end;border-radius:0 12px 12px 0}
.bc-mid{background:#0b0812;padding:6px 20px;display:flex;flex-direction:column;align-items:center;justify-content:center;border-top:3px solid #fff;border-bottom:3px solid #fff}
.bc-mid b{font-size:11px;letter-spacing:2px;color:#cfc6de}.bc-mid em{font:normal 34px Bangers,Impact,sans-serif;color:#fff;line-height:1}
.bc-splash{position:absolute;left:0;right:0;top:38%;text-align:center;opacity:0}
.bc-splash strong{display:block;font:clamp(56px,11vw,150px) Bangers,Impact,sans-serif;letter-spacing:3px;color:#ffe03a;text-shadow:5px 5px 0 #ff3d8e,10px 10px 0 #000a}
.bc-splash[data-tone=p] strong{color:#fff;text-shadow:5px 5px 0 #ff3d8e,10px 10px 0 #000a}.bc-splash[data-tone=g] strong{color:#7ed745;text-shadow:5px 5px 0 #0b3d12,10px 10px 0 #000a}
.bc-splash span{display:inline-block;margin-top:8px;padding:6px 16px;border-radius:999px;background:#0b0812d8;font-weight:900;letter-spacing:2px;color:#fff}
.bc-splash.go{animation:fx-boss-title 2.2s var(--out) forwards}
@media (max-width:700px){.bc-bracket{display:none}.bc-bug{top:90px;left:8px}.bc-side{padding:6px 10px}.bc-mid{padding:4px 10px}}
html.broadcast-on .hud .name-row{visibility:hidden}
.trade-panel input,.trade-gift input{background:#1b1528!important;border:1px solid #ffffff33!important;color:#fff!important;padding:10px 12px;border-radius:10px}

/* Fighter select: the 3D fighter renders in the game canvas behind this panel, so it must stay see-through */
.loadout-card{background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:none!important;border:0!important}
.loadout-card .roster-panel{background:var(--panel);border:1px solid var(--line);border-radius:18px;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);box-shadow:0 0 0 1px #000,8px 8px 0 #00000080}
/* leaderboard tabs: only the selected tab is yellow */
.score-tabs [role=tab]{background:#241a33!important;color:#e9e3f6!important;border:1px solid #ffffff2a!important}
.score-tabs [role=tab][aria-selected=true]{background:#ffe03a!important;color:#140d1f!important;border-color:#ffe03a!important}
/* phones: slim boss bar that never sits over the fight */
@media (max-width:700px),(max-height:500px){
  .boss-bar{padding:4px 10px 5px;border-radius:10px;border-width:1.5px;box-shadow:0 0 14px #a35cff44;width:min(420px,86vw)}
  .boss-bar-top strong{font-size:14px;letter-spacing:1px;text-shadow:1px 1px 0 #a35cff}
  .boss-bar-top span{font-size:9px;letter-spacing:1px}
  .boss-bar-track{height:7px;margin-top:3px;border-radius:4px}
  .boss-bar small{display:none}
}
@media (max-height:500px) and (orientation:landscape){
  .boss-bar{top:calc(var(--fx-hud-bottom,150px) + 6px);left:auto;right:max(18px,env(safe-area-inset-right,0px));translate:none;width:min(260px,34vw)}
  .boss-bar-top{flex-wrap:nowrap;min-width:0}.boss-bar-top strong,.boss-bar-top span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
}
