
/* Lore logo mockup — FVF lore faction logos — options A+B+C */
.flog{
  display:block;
  width:52px;height:52px;flex:none;
  background:currentColor;
  color:#fff;
  -webkit-mask:var(--logo) center/contain no-repeat;
  mask:var(--logo) center/contain no-repeat;
  filter:drop-shadow(0 0 8px rgba(0,232,255,.35));
}
.flog[data-logo="crown"]{--logo:url("img/faction-logos/faction-crown.svg")}
.flog[data-logo="squid"]{--logo:url("img/faction-logos/faction-squid.svg")}
.flog[data-logo="shield-planet"]{--logo:url("img/faction-logos/faction-shield-planet.svg")}
.flog[data-logo="nova-eagle"]{--logo:url("img/faction-logos/faction-nova-eagle.svg")}
.flog[data-logo="hammer"]{--logo:url("img/faction-logos/faction-hammer.svg")}
.flog[data-logo="hexagon"]{--logo:url("img/faction-logos/faction-hexagon.svg")}

/* Option A/B: logo sits on the kicker row only, so titles keep full width */
.fcard>.flog{
  position:absolute;
  top:12px;right:12px;
  width:36px;height:36px;
  z-index:1;
}
.fcard:has(>.flog) small{padding-right:46px}
@media(min-width:1000px){
  .fcard>.flog{width:32px;height:32px;top:11px;right:10px}
  .fcard:has(>.flog) small{padding-right:42px}
}
.fcard:target{
  box-shadow:0 0 0 1px var(--cy),0 0 20px rgba(0,232,255,.35);
}

/* Faction / Sovereign article title */
.fpage-head{
  display:flex;
  align-items:center;
  gap:16px 18px;
  margin:1.1em 0 .35em;
}
.fpage-head h1{margin:0 !important}
.fpage-head .flog{
  width:84px;height:84px;
  color:#fff;
  filter:drop-shadow(0 0 10px rgba(0,232,255,.45));
}
@media(max-width:600px){
  .fpage-head{gap:12px}
  .fpage-head .flog{width:64px;height:64px}
  .fcard>.flog{width:40px;height:40px;top:14px;right:14px}
  .fcard:has(>.flog) small{padding-right:52px}
}

/* Beyond Sol Sovereign card: logo to the left of the stacked label + title */
.ccard:has(>.flog){
  display:grid;
  grid-template-columns:40px 1fr;
  grid-template-rows:auto auto;
  column-gap:12px;
  align-items:center;
}
.ccard>.flog{width:40px;height:40px;color:#fff;grid-row:1 / span 2}
.ccard:has(>.flog) small{grid-column:2}

/* Option B: badge index at the top of the Lore section */
.fnav-k{margin:22px 0 10px}
.fnav{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:0 0 10px;
}
.fbadge{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  flex:1 1 90px;
  padding:12px 8px 10px;
  border:1px solid var(--line);
  border-radius:14px;
  background:linear-gradient(180deg,rgba(0,232,255,.08),rgba(0,13,28,.85));
  color:#fff;
  text-decoration:none;
  font:700 11px/1.2 system-ui,-apple-system,"Segoe UI",sans-serif;
  letter-spacing:.1em;
  text-transform:uppercase;
  transition:box-shadow .2s,border-color .2s,transform .2s;
}
.fbadge .flog{
  width:44px;height:44px;
  color:#fff;
  filter:drop-shadow(0 0 6px rgba(0,232,255,.4));
}
.fbadge:hover,.fbadge:focus-visible{
  border-color:var(--cy);
  color:var(--cy);
  box-shadow:0 0 16px rgba(0,232,255,.35);
  transform:translateY(-1px);
  outline:none;
}
.fbadge.is-special{
  border-color:color-mix(in srgb,var(--or) 45%,transparent);
  background:linear-gradient(180deg,rgba(255,149,0,.1),rgba(0,13,28,.85));
}
.fbadge.is-special:hover,.fbadge.is-special:focus-visible{
  border-color:var(--or);
  color:var(--or);
  box-shadow:0 0 16px rgba(255,149,0,.35);
}
@media(max-width:600px){
  .fnav{gap:8px}
  .fbadge{flex:1 1 28%;padding:10px 6px 8px;font-size:10px}
  .fbadge .flog{width:38px;height:38px}
}

/* Option C: replace the faint corner circle on nation cards with a cropped logo watermark.
   Tone and opacity match the original ring: var(--b) cyan at .14.
   Minor-faction .fcard elements keep the plain circle (they have no .flog).
   The Sovereign Beyond Sol card is a .ccard and has no circle, so it is left as-is. */
.fcard:has(>.flog[data-logo="shield-planet"]){--wm-logo:url("img/faction-logos/faction-shield-planet.svg")}
.fcard:has(>.flog[data-logo="hammer"]){--wm-logo:url("img/faction-logos/faction-hammer.svg")}
.fcard:has(>.flog[data-logo="hexagon"]){--wm-logo:url("img/faction-logos/faction-hexagon.svg")}
.fcard:has(>.flog[data-logo="squid"]){--wm-logo:url("img/faction-logos/faction-squid.svg")}
.fcard:has(>.flog[data-logo="nova-eagle"]){--wm-logo:url("img/faction-logos/faction-nova-eagle.svg")}
.fcard:has(>.flog)::after{
  border:0;
  border-radius:0;
  width:168px;
  height:168px;
  right:-48px;
  bottom:-48px;
  background:var(--b);
  opacity:.14;
  -webkit-mask:var(--wm-logo) center/contain no-repeat;
  mask:var(--wm-logo) center/contain no-repeat;
  pointer-events:none;
}
.fcard:has(>.flog) small,
.fcard:has(>.flog) b,
.fcard:has(>.flog) p{
  position:relative;
  z-index:1;
}
.fcard:has(>.flog)>.flog{z-index:1}
@media(max-width:600px){
  .fcard:has(>.flog)::after{
    width:180px;
    height:180px;
    right:-52px;
    bottom:-52px;
  }
}
