
/* Hard-hide every legacy location/banner above the rebuilt hero. V4.x has a later
   #character > .v038-location rule with !important, so this final block must win. */
#character > .v038-location,
#character > .v052-scene-banner,
#character > .v052-character,
#character > .v459-page-kicker{
  display:none!important;
  visibility:hidden!important;
  height:0!important;
  min-height:0!important;
  max-height:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  overflow:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}

/* V5.22 proved the new frame is active, but the bright vertical rails were too dominant.
   Keep a thin wood/metal edge behind the content, closer to the approved reference. */
#character.v514-reference-hero #v510HeroRoot::before,
#character.v514-reference-hero #v510HeroRoot::after{
  z-index:3!important;
  top:45px!important;
  bottom:45px!important;
  width:5px!important;
  opacity:.94!important;
  border-left:1px solid rgba(225,166,77,.34)!important;
  border-right:1px solid rgba(18,9,4,.92)!important;
  background:
    radial-gradient(circle at 50% 6%,rgba(255,172,63,.55) 0 4%,rgba(118,64,25,.35) 5% 13%,transparent 14%),
    radial-gradient(circle at 50% 94%,rgba(255,172,63,.42) 0 4%,rgba(118,64,25,.28) 5% 13%,transparent 14%),
    linear-gradient(90deg,#1a0e07 0%,#6b401d 36%,#9a642f 50%,#452710 66%,#120a05 100%)!important;
  box-shadow:0 0 0 1px rgba(0,0,0,.62),0 0 6px rgba(0,0,0,.72)!important;
}
#character.v514-reference-hero #v510HeroRoot::before{left:2px!important}
#character.v514-reference-hero #v510HeroRoot::after{right:2px!important}

/* Title: still ornamental, but less like a large banner. */
#character.v514-reference-hero .v510-titlebar{
  width:min(58%,276px)!important;
  height:32px!important;
  margin:6px auto 3px!important;
  padding:0 27px!important;
  border-color:#9d672f!important;
  background:linear-gradient(180deg,#4d2b14 0%,#311a0c 58%,#1b0e07 100%)!important;
  font-size:13.4px!important;
  letter-spacing:.018em!important;
}
#character.v514-reference-hero .v510-titlebar::before,
#character.v514-reference-hero .v510-titlebar::after{
  top:3px!important;
  width:38px!important;
  height:26px!important;
}
#character.v514-reference-hero .v510-titlebar::before{left:-31px!important}
#character.v514-reference-hero .v510-titlebar::after{right:-31px!important}
#character.v514-reference-hero .v514-kicker{
  height:18px!important;
  background:linear-gradient(180deg,#10351d,#07170d)!important;
  border-top-color:#523417!important;
  border-bottom-color:#68431e!important;
}

/* Give the upper stage a little more dark breathing room at the sides; keep the hero dominant. */
#character.v514-reference-hero .v510-stage{
  padding-left:13px!important;
  padding-right:13px!important;
  background:
    radial-gradient(circle at 6% 17%,rgba(255,126,26,.19),transparent 12%),
    radial-gradient(circle at 94% 17%,rgba(255,126,26,.19),transparent 12%),
    radial-gradient(ellipse at 50% 28%,rgba(78,174,60,.28),transparent 48%),
    linear-gradient(90deg,#07110a 0 7%,rgba(7,17,10,.10) 20% 80%,#07110a 93% 100%),
    linear-gradient(180deg,#174225 0%,#0a2615 56%,#06110a 100%)!important;
}
#character.v514-reference-hero .v510-stage::before,
#character.v514-reference-hero .v510-stage::after{
  width:17px!important;
  height:62px!important;
  top:7px!important;
  opacity:.76!important;
  filter:drop-shadow(0 0 4px rgba(255,111,18,.72))!important;
}
#character.v514-reference-hero .v510-stage::before{left:3px!important}
#character.v514-reference-hero .v510-stage::after{right:3px!important}

/* Slightly refine slot proportions without moving any item/handler. */
#character.v514-reference-hero .v510-layout{
  grid-template-columns:56px minmax(0,1fr) 56px!important;
  gap:3px!important;
}
#character.v514-reference-hero #v510HeroRoot .slot{
  height:59px!important;
  min-height:59px!important;
  border-radius:7px!important;
}
#character.v514-reference-hero #v510HeroRoot .slot-icon,
#character.v514-reference-hero #v510HeroRoot .slot-icon img,
#character.v514-reference-hero #v510HeroRoot .slot-icon svg,
#character.v514-reference-hero #v510HeroRoot .slot-icon .v41-badge-art{
  width:40px!important;height:40px!important;max-width:40px!important;max-height:40px!important;min-height:40px!important;
}

/* Keep torso visible but stop the portrait from swallowing the whole stage. */
#character.v514-reference-hero .v510-portrait{height:180px!important;margin:0 -25px!important}
#character.v514-reference-hero #v510HeroRoot .avatar-scene,
#character.v514-reference-hero #v510HeroRoot .class-avatar-big,
#character.v514-reference-hero #v510HeroRoot .class-avatar-big img,
#character.v514-reference-hero #v510HeroRoot .v080-class-avatar-img,
#character.v514-reference-hero #v510HeroRoot .v41-portrait{
  width:208px!important;height:184px!important;min-height:184px!important;
}
#character.v514-reference-hero #v510HeroRoot .v080-class-avatar-img,
#character.v514-reference-hero #v510HeroRoot .class-avatar-big img{
  object-position:center 31%!important;
  transform:scale(.965)!important;
}
#character.v514-reference-hero #v510HeroRoot .center-name{margin:-35px -26% 0!important;font-size:16.4px!important}

/* Book: V5.22's icon/title were visually cramped. The JS below wraps the existing
   text into a copy column; click handler and achievement logic stay on the same button. */
#character.v514-reference-hero #v106BookBtn{
  min-height:43px!important;
  padding:5px 30px 5px 8px!important;
  display:grid!important;
  grid-template-columns:31px minmax(0,1fr)!important;
  grid-template-rows:auto!important;
  align-items:center!important;
  column-gap:8px!important;
  text-align:left!important;
}
#character.v514-reference-hero #v106BookBtn .book{
  position:relative!important;
  inset:auto!important;
  width:25px!important;
  height:31px!important;
  margin:0!important;
  transform:rotate(-3deg)!important;
  grid-column:1!important;
  align-self:center!important;
}
#character.v514-reference-hero #v106BookBtn .v523-book-copy{
  grid-column:2!important;
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  gap:2px!important;
}
#character.v514-reference-hero #v106BookBtn .v523-book-title{
  display:block!important;
  color:#f4e0ac!important;
  font-size:8.4px!important;
  font-weight:900!important;
  line-height:1.05!important;
  white-space:nowrap!important;
}
#character.v514-reference-hero #v106BookBtn .v106-book-info{
  display:block!important;
  margin:0!important;
  color:#eee3ca!important;
  font-size:6.1px!important;
  line-height:1.15!important;
  white-space:nowrap!important;
}
#character.v514-reference-hero #v106BookBtn::after{right:9px!important;font-size:23px!important}

/* Lower stack: retain the now-correct values, just bring them visually closer to the reference. */
#character.v514-reference-hero .v510-footer{padding:4px 7px 5px!important}
#character.v514-reference-hero .v510-stats>.combat-box{min-height:41px!important}
#character.v514-reference-hero #v459SetSummary{min-height:26px!important;margin-top:4px!important}
#character.v514-reference-hero #v459SetSummary .v519-set-cell,
#character.v514-reference-hero #v459SetSummary .v519-talent-cell{min-height:26px!important;padding:4px 7px!important}
#character.v514-reference-hero .v514-passive-row{margin-top:4px!important}
#character.v514-reference-hero .v514-nav-host{margin-top:4px!important}
