/* Warfront 4.55 - Faction Themed Victory/Defeat, scoped to existing result panel.
   Every image comes from the current, approved in-repository chapter collection. */
#wf342-result.wf455-themed.wf420-result{
 border-color:var(--wf455-accent)!important;
 background:
   radial-gradient(ellipse at 0% 20%,color-mix(in srgb,var(--wf455-glow) 22%,transparent),transparent 55%),
   linear-gradient(140deg,var(--wf455-shadow),#0b101a 76%)!important;
 box-shadow:0 16px 60px #000d,inset 0 0 0 1px color-mix(in srgb,var(--wf455-accent) 34%,transparent)!important;
}
#wf342-result.wf455-themed .wf361-root{gap:11px!important;padding:9px 12px 12px!important}
#wf342-result.wf455-themed .wf361-banner.wf455-banner{
 box-sizing:border-box!important;grid-area:banner!important;position:relative!important;isolation:isolate;
 min-height:clamp(152px,27vh,232px)!important;
 display:flex!important;flex-direction:column!important;justify-content:center!important;
 padding:10px 60px!important;margin:0!important;gap:3px!important;overflow:hidden!important;
 border:1px solid color-mix(in srgb,var(--wf455-accent) 58%,#1b1b28)!important;
 border-radius:12px!important;
 background-image:linear-gradient(90deg,#050a16c9 3%,#09101892 45%,#050a16d3 100%),var(--wf455-poster)!important;
 background-size:cover!important;background-repeat:no-repeat!important;
 background-position:center 30%!important;
 box-shadow:inset 0 0 65px #000b,0 8px 26px #0006!important;
}
#wf342-result.wf455-themed .wf361-banner.wf455-banner::before{
 content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
 background:radial-gradient(ellipse at 50% 100%,color-mix(in srgb,var(--wf455-glow) 31%,transparent),transparent 73%);
}
#wf342-result.wf455-themed .wf361-banner.wf455-banner>*{position:relative;z-index:1}
#wf342-result.wf455-themed .wf455-crest{
 display:grid;place-items:center;width:59px;height:59px;flex:0 0 auto;margin:0 auto 1px!important;
 border:2px solid var(--wf455-accent);border-radius:50%;color:var(--wf455-accent);
 background:radial-gradient(circle at 50% 40%,#353e46ee,#070d19ec);
 box-shadow:0 0 27px color-mix(in srgb,var(--wf455-glow) 59%,transparent),inset 0 0 14px #121e27;
 font:36px/1 Georgia,serif;
}
#wf342-result.wf455-themed .wf455-crest img{max-width:80%;max-height:80%;width:auto;height:auto;object-fit:contain}
#wf342-result.wf455-themed .wf361-banner h3{
 font:700 clamp(32px,5.4vw,62px)/.98 Georgia,'Times New Roman',serif!important;
 color:var(--wf455-accent)!important;letter-spacing:.07em!important;margin:4px 0!important;
 text-shadow:0 4px 3px #060a16,0 0 35px var(--wf455-glow)!important;
}
#wf342-result.wf455-themed .wf455-faction-name{
 font:700 clamp(10px,1.5vw,14px)/1.3 Georgia,serif;
 color:#fff3d6;letter-spacing:.24em;text-align:center;text-transform:uppercase;
}
#wf342-result.wf455-themed .wf455-message{
 font:500 clamp(11px,1.6vw,15px)/1.25 system-ui,sans-serif;
 color:#f3e9d8;text-align:center;text-shadow:0 2px 9px #000e;max-width:460px;
}
#wf342-result.wf455-themed .wf455-skip{
 position:absolute!important;z-index:3!important;bottom:8px;right:9px;
 display:block;width:auto!important;min-height:28px;padding:4px 9px;border-radius:7px;
 background:#121926d8;color:#eee4cf;border:1px solid #c9bca777;
 font:600 11px system-ui,sans-serif;cursor:pointer;
}
#wf342-result.wf455-themed .wf455-skip[hidden]{display:none!important}
#wf342-result.wf455-themed .wf361-rewards,
#wf342-result.wf455-themed .wf342-xp-card,
#wf342-result.wf455-themed .wf373-mvp{
 border-color:color-mix(in srgb,var(--wf455-accent) 66%,#4d3c41)!important;
 background:linear-gradient(145deg,color-mix(in srgb,var(--wf455-shadow) 60%,#17253c),#0c1424)!important;
 box-shadow:inset 0 1px 0 color-mix(in srgb,var(--wf455-accent) 15%,transparent)!important;
}
#wf342-result.wf455-themed .wf342-reward-total,
#wf342-result.wf455-themed .wf373-ribbon,
#wf342-result.wf455-themed .wf373-mvp-name{color:var(--wf455-accent)!important}
#wf342-result.wf455-themed .wf455-xp-count{
 display:block;margin:4px 0 8px;padding:8px 11px;min-height:25px;
 background:linear-gradient(90deg,color-mix(in srgb,var(--wf455-glow) 18%,#0f1d29),#121b2d 75%);
 border:1px solid color-mix(in srgb,var(--wf455-accent) 52%,#30354a);
 border-radius:7px;color:var(--wf455-accent);text-align:center;
 font:800 clamp(15px,2.2vw,23px)/1.15 Georgia,serif;
 text-shadow:0 0 12px color-mix(in srgb,var(--wf455-glow) 45%,transparent);
 font-variant-numeric:tabular-nums;
}
#wf342-result.wf455-themed .wf342-result-xp-track{height:15px!important;min-height:15px!important;overflow:hidden!important;border-radius:11px!important}
#wf342-result.wf455-themed .wf342-result-xp-fill{
 background:linear-gradient(90deg,var(--wf455-glow),var(--wf455-accent),#fff8da)!important;
 box-shadow:0 0 14px var(--wf455-glow)!important;
}
#wf342-result.wf455-themed .wf373-title{
 display:block!important;margin:5px 1px 3px!important;color:var(--wf455-accent)!important
}
#wf342-result.wf455-themed .wf373-highlights,
#wf342-result.wf455-themed:not(.wf418-details-open) .wf373-highlights{
 display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;
}
#wf342-result.wf455-themed .wf373-highlight{
 min-width:0;min-height:100px;background:linear-gradient(150deg,#1d2c3a,#111927)!important;
 border:1px solid color-mix(in srgb,var(--wf455-accent) 45%,#405065)!important;
}
#wf342-result.wf455-themed .wf418-details-toggle{color:var(--wf455-accent)!important}
#wf342-result.wf455-themed .wf361-bottom{
 border-top-color:var(--wf455-accent)!important;
 background:linear-gradient(180deg,var(--wf455-shadow),#0f1425)!important;
}
#wf342-result.wf455-themed .wf342-result-buttons button:first-child{
 border-color:var(--wf455-accent)!important;color:#100d0b!important;
 background:linear-gradient(160deg,#fff3ca,var(--wf455-accent))!important;
}
#wf342-result.wf455-themed .wf455-mvp-hidden{opacity:0!important;transform:translateY(9px) scale(.98)!important;pointer-events:none!important}
#wf342-result.wf455-themed .wf455-mvp-shown{animation:wf455-award-pop .4s ease-out both}
@keyframes wf455-award-pop{
 0%{opacity:0;transform:translateY(12px) scale(.97);filter:brightness(1.8)}
 75%{opacity:1;filter:brightness(1.2)}
 100%{opacity:1;transform:none;filter:brightness(1)}
}
/* Defeat intentionally uses the player's faction banner, but subdued and battle-scarred. */
#wf342-result.wf455-themed.wf455-defeat{
 border-color:#aa7a79!important;
 background:linear-gradient(145deg,#211d2a,#0d111d 75%)!important;
}
#wf342-result.wf455-themed.wf455-defeat .wf361-banner{
 filter:saturate(.62);border-color:#b9a6a0!important;
 background-image:linear-gradient(90deg,#150f1ce5,#16121da6,#130b15dc),var(--wf455-poster)!important;
}
#wf342-result.wf455-themed.wf455-defeat .wf361-banner h3{
 color:#e1b3ac!important;text-shadow:0 3px 15px #180d16!important
}
#wf342-result.wf455-themed.wf455-defeat .wf455-crest{filter:grayscale(.6);box-shadow:0 0 10px #261517}
#wf342-result.wf455-themed.wf455-defeat .wf455-xp-count{color:#e6c9a9}
#wf342-result.wf455-themed.wf455-defeat .wf342-result-buttons button:first-child{
 background:linear-gradient(140deg,#e2c4a0,#b78b84)!important
}
/* Faction-specific treatments on top of their matching artwork and crest. */
#wf342-result[data-wf455-faction="frogs"] .wf361-banner{background-position:center 40%!important}
#wf342-result[data-wf455-faction="rats"] .wf361-banner{background-position:center 55%!important}
#wf342-result[data-wf455-faction="wasps"] .wf361-banner{background-position:center 24%!important}
#wf342-result[data-wf455-faction="clock"] .wf361-banner{background-position:center 45%!important}
#wf342-result[data-wf455-faction="worms"] .wf361-banner{background-position:center 58%!important}
#wf342-result[data-wf455-faction="crabs"] .wf361-banner{background-position:center 39%!important}
#wf342-result[data-wf455-faction="bats"] .wf361-banner{background-position:center 30%!important}
#wf342-result[data-wf455-faction="snakes"] .wf361-banner{background-position:center 48%!important}
@media(max-width:700px){
 #wf342-result.wf455-themed .wf361-root{padding:6px!important;gap:7px!important}
 #wf342-result.wf455-themed .wf361-banner.wf455-banner{padding:7px 34px!important;min-height:150px!important}
 #wf342-result.wf455-themed .wf455-crest{width:43px;height:43px;font-size:26px}
 #wf342-result.wf455-themed .wf361-banner h3{font-size:31px!important}
 #wf342-result.wf455-themed .wf455-faction-name{font-size:10px;letter-spacing:.1em}
 #wf342-result.wf455-themed .wf455-message{font-size:11px}
 #wf342-result.wf455-themed .wf373-highlights{gap:3px!important}
 #wf342-result.wf455-themed .wf373-highlight{min-height:79px!important;padding:4px!important}
 #wf342-result.wf455-themed .wf373-highlight-label{font-size:8px!important}
 #wf342-result.wf455-themed .wf455-xp-count{font-size:16px;padding:5px;margin:2px 0 5px}
}
@media(orientation:landscape) and (max-height:480px){
 #wf342-result.wf455-themed .wf361-banner.wf455-banner{min-height:103px!important;padding:5px 48px!important}
 #wf342-result.wf455-themed .wf455-crest{width:34px;height:34px;font-size:22px}
 #wf342-result.wf455-themed .wf361-banner h3{font-size:29px!important}
 #wf342-result.wf455-themed .wf455-message{font-size:10px}
}
@media(prefers-reduced-motion:reduce){
 #wf342-result.wf455-themed .wf455-mvp-hidden{opacity:1!important;transform:none!important}
 #wf342-result.wf455-themed .wf455-mvp-shown{animation:none!important}
 #wf342-result.wf455-themed .wf342-result-xp-fill{transition:none!important}
}