
#character.v510-char{
  padding:7px!important;
  background:
    radial-gradient(circle at 50% 6%,rgba(41,98,45,.18),transparent 31%),
    #040806!important;
}

/* old visual wrappers no longer own the visible hero */
#character.v510-char > .hero-card{
  padding:0!important;
  margin:0 0 8px!important;
  border:0!important;
  background:none!important;
  box-shadow:none!important;
  overflow:visible!important;
}
#character.v510-char > .hero-card > .character-stage,
#character.v510-char > .hero-card > .v459-hero-bottom{
  display:none!important;
}

/* One real RPG frame, matching the reference composition. */
#v510HeroRoot{
  position:relative;
  overflow:hidden;
  border:3px solid #6f4723;
  border-radius:5px;
  background:#08100b;
  box-shadow:inset 0 0 0 1px #c6954a55,0 12px 28px #000c;
}
#v510HeroRoot:before,
#v510HeroRoot:after{
  content:'';
  position:absolute;z-index:2;pointer-events:none;
  top:53px;bottom:69px;width:15px;
  border-top:1px solid #bd8845aa;border-bottom:1px solid #bd8845aa;
  background:
    linear-gradient(90deg,#2c170c,#7c4c22 44%,#2b180c 100%);
  opacity:.92;
}
#v510HeroRoot:before{left:0}
#v510HeroRoot:after{right:0}

.v510-titlebar{
  position:relative;z-index:5;
  height:54px;
  display:flex;align-items:center;justify-content:center;
  border-bottom:2px solid #94602e;
  background:
    radial-gradient(circle at 13% 50%,#8b5527 0 2px,transparent 3px),
    radial-gradient(circle at 87% 50%,#8b5527 0 2px,transparent 3px),
    linear-gradient(180deg,#2e1c0f,#170d08);
  color:#f0d18c;
  font:900 18px/1 Georgia,serif;
  letter-spacing:.055em;
  text-shadow:0 2px 0 #231106,0 0 10px #d39b4544;
}
.v510-titlebar:before,.v510-titlebar:after{
  content:'🌿';position:absolute;top:13px;font-size:18px;filter:saturate(.8);opacity:.8
}
.v510-titlebar:before{left:15px;transform:rotate(-22deg)}
.v510-titlebar:after{right:15px;transform:scaleX(-1) rotate(-22deg)}

.v510-stage{
  position:relative;z-index:1;
  padding:8px 18px 7px;
  background:
    radial-gradient(circle at 50% 27%,rgba(93,195,72,.40),rgba(38,86,40,.18) 29%,transparent 48%),
    linear-gradient(90deg,transparent 0 11%,rgba(99,154,73,.035) 11% 12%,transparent 12% 88%,rgba(99,154,73,.035) 88% 89%,transparent 89%),
    linear-gradient(180deg,#17331f 0%,#0b1b11 55%,#071009 100%);
}
.v510-stage:before,.v510-stage:after{
  content:'🍃';
  position:absolute;top:10px;z-index:0;
  font-size:60px;opacity:.09;filter:saturate(.6)
}
.v510-stage:before{left:73px;transform:rotate(-25deg)}
.v510-stage:after{right:73px;transform:scaleX(-1) rotate(-25deg)}

.v510-layout{
  position:relative;z-index:3;
  display:grid;
  grid-template-columns:72px minmax(0,1fr) 72px;
  gap:7px;
  align-items:start;
}
.v510-col{
  display:grid;gap:7px;padding-top:2px;
}
#v510HeroRoot .slot{
  position:relative!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  height:86px!important;
  min-height:86px!important;
  padding:4px 2px!important;
  border:2px solid #657354!important;
  border-radius:5px!important;
  background:
    radial-gradient(circle at 50% 22%,rgba(255,255,255,.055),transparent 34%),
    linear-gradient(180deg,#121a13,#050907)!important;
  box-shadow:inset 0 0 16px #000b,0 3px 8px #000b!important;
  overflow:hidden!important;
}
#v510HeroRoot .slot:after{
  content:'';position:absolute;inset:3px;border:1px solid rgba(218,177,95,.13);border-radius:3px;pointer-events:none
}
#v510HeroRoot #slot-head{border-color:#a16e35!important}
#v510HeroRoot #slot-weapon,#v510HeroRoot #slot-weapon2,#v510HeroRoot #slot-ring{border-color:#2c8bd0!important}
#v510HeroRoot #slot-body,#v510HeroRoot #slot-amulet{border-color:#914fc9!important}
#v510HeroRoot #slot-boots{border-color:#779083!important}
#v510HeroRoot .slot-icon{
  width:54px!important;height:54px!important;min-height:54px!important;
  display:grid!important;place-items:center!important;
}
#v510HeroRoot .slot-icon img,
#v510HeroRoot .slot-icon svg,
#v510HeroRoot .slot-icon .v41-badge-art{
  width:52px!important;height:52px!important;max-width:52px!important;max-height:52px!important;
}
#v510HeroRoot .slot-label{
  margin-top:2px!important;
  font-size:6.6px!important;line-height:1!important;
  color:#d3cbb2!important;letter-spacing:.08em!important;
}
#v510HeroRoot .slot-name,
#v510HeroRoot .slot>.tiny,
#v510HeroRoot .slot .slot-actions,
#v510HeroRoot .slot .v123-item-effects,
#v510HeroRoot .slot .set-tag,
#v510HeroRoot .slot .v296-mystic-special{display:none!important}

.v510-center{
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
}
.v510-portrait{
  position:relative;
  width:100%;
  height:253px;
  display:flex;align-items:flex-end;justify-content:center;
  overflow:hidden;
}
.v510-portrait:before{
  content:'';
  position:absolute;
  left:50%;bottom:2px;transform:translateX(-50%);
  width:230px;height:230px;border-radius:50%;
  background:radial-gradient(circle,rgba(126,226,88,.28),rgba(56,112,52,.13) 54%,transparent 73%);
  filter:blur(1px);
}
#v510HeroRoot .avatar-scene{
  position:relative!important;
  width:238px!important;height:253px!important;min-height:253px!important;
  margin:0!important;
  display:flex!important;align-items:flex-end!important;justify-content:center!important;
  overflow:hidden!important;
  border:0!important;border-radius:0!important;background:none!important;
}
#v510HeroRoot .avatar-scene:before{display:none!important}
#v510HeroRoot .class-avatar-big{
  width:238px!important;height:253px!important;
  display:flex!important;align-items:flex-end!important;justify-content:center!important;
}
#v510HeroRoot .class-avatar-big img,
#v510HeroRoot .v080-class-avatar-img,
#v510HeroRoot .v41-portrait{
  width:232px!important;height:253px!important;
  max-width:none!important;max-height:none!important;
  object-fit:cover!important;object-position:center 18%!important;
  transform:none!important;
  border:0!important;border-radius:0!important;
  box-shadow:none!important;
  filter:drop-shadow(0 12px 10px #000c)!important;
}
#v510HeroRoot .avatar-prop,#v510HeroRoot .avatar-leaf{display:none!important}

#v510HeroRoot .center-name{
  margin:2px 0 0!important;
  font-size:22px!important;line-height:1!important;font-weight:1000!important;
  color:#fff8e9!important;text-shadow:0 2px 2px #000!important;
  overflow:visible!important;white-space:normal!important;
}
#v510HeroRoot .center-class{
  margin:4px 0 0!important;
  font-size:7.8px!important;line-height:1.2!important;
  color:#86e365!important;letter-spacing:.075em!important;
}
#v510HeroRoot .level-shield{
  margin:7px auto 0!important;padding:5px 15px 5px!important;
  border:2px solid #ad7433!important;border-radius:4px!important;
  background:linear-gradient(180deg,#492b13,#211209)!important;
  color:#f5e6c4!important;
  box-shadow:inset 0 0 0 1px #d5a85b44,0 3px 8px #0009!important;
}
#v510HeroRoot .level-shield b{font-size:22px!important;color:#ffe2a0!important}

#v510HeroRoot .center-xp{
  width:min(216px,100%)!important;
  margin:6px auto 0!important;padding:3px 6px 5px!important;
  border:1px solid #73572e!important;border-radius:4px!important;background:#061009!important;
}
#v510HeroRoot .center-xp-row{font-size:6.8px!important;margin-bottom:3px!important;color:#d7d0b5!important}
#v510HeroRoot .center-xp-track{height:9px!important;border:1px solid #76603a!important;background:#020503!important}

#v510HeroRoot #v106BookBtn{
  width:min(218px,100%)!important;
  min-height:46px!important;
  margin:7px auto 0!important;
  transform:none!important;
  border:2px solid #8b5b2b!important;border-radius:4px!important;
  background:linear-gradient(180deg,#4b2d14,#24150b)!important;
  box-shadow:inset 0 0 0 1px #c18a4055,0 3px 7px #0008!important;
}

/* Secondary status becomes one subtle strip, not a column of boxes. */
.v510-secondary{
  display:grid;grid-template-columns:repeat(3,1fr);gap:4px;
  margin:7px 1px 0;
}
.v510-secondary>*{
  min-width:0!important;min-height:31px!important;
  margin:0!important;padding:5px 4px!important;
  border:1px solid #3d5137!important;border-radius:4px!important;
  background:#08110b!important;
  color:#a9b8a4!important;
  font-size:6.2px!important;line-height:1.2!important;
  text-align:center!important;
  overflow:hidden!important;
}
.v510-secondary #v492CharGrowBuff .top,
.v510-secondary .v492-char-buff .top{display:block!important}
.v510-secondary #v492CharGrowBuff .lines,
.v510-secondary .v492-char-buff .lines{display:none!important}
.v510-secondary .v204-avatar-badge{display:block!important;border:0!important;padding:0!important;background:none!important}
.v510-secondary #v4156ClassPassive br{display:none!important}
.v510-secondary #v4156ClassPassive b{display:block!important;margin-bottom:2px!important}

.v510-footer{
  position:relative;z-index:5;
  padding:7px 10px 8px;
  border-top:2px solid #8e612f;
  background:linear-gradient(180deg,#0d160e,#050907);
}
.v510-stats{
  display:grid;grid-template-columns:1fr 1fr;gap:7px;
}
.v510-stats .combat-box{
  min-height:58px!important;
  display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:flex-start!important;
  padding:8px 10px!important;
  border:1px solid #66573a!important;border-radius:4px!important;
  background:linear-gradient(180deg,#151f17,#080d09)!important;
  box-shadow:inset 0 0 12px #0007!important;
}
.v510-stats .combat-box span{font-size:7px!important;color:#d9d2b8!important}
.v510-stats .combat-box b{font-size:24px!important;line-height:1!important}
.v510-stats .combat-box.hp b{color:#ef8b8e!important}
.v510-stats .combat-box.power b{color:#ebc067!important}
#v510HeroRoot #v459SetSummary{
  min-height:31px!important;margin:6px 0 0!important;padding:5px 8px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  border:1px solid #5b5336!important;border-radius:4px!important;
  background:#08110b!important;color:#d9d1b4!important;font-size:7px!important;
}

/* reference-style tabs under hero */
#character.v510-char #v459CharacterTabs{
  position:relative!important;top:auto!important;
  margin:8px 0 9px!important;padding:4px!important;gap:4px!important;
  border:2px solid #614522!important;border-radius:5px!important;
  background:linear-gradient(180deg,#131b13,#060a07)!important;
}
#character.v510-char #v459CharacterTabs button{
  min-height:58px!important;border:1px solid #344431!important;border-radius:4px!important;
  background:linear-gradient(180deg,#142019,#090e0b)!important;
}
#character.v510-char #v459CharacterTabs button.active{
  border-color:#c6a553!important;
  background:linear-gradient(180deg,#385328,#19231a)!important;
  box-shadow:inset 0 0 18px #8ed85d22,0 0 8px #e2bd4f33!important;
}
#character.v510-char #v459CharacterTabs button span{font-size:23px!important}
#character.v510-char #v459CharacterTabs button em{font-size:7.2px!important;color:#eee8d0!important}

@media(max-width:390px){
  .v510-layout{grid-template-columns:68px minmax(0,1fr) 68px;gap:5px}
  #v510HeroRoot .slot{height:82px!important;min-height:82px!important}
  #v510HeroRoot .slot-icon{width:49px!important;height:49px!important;min-height:49px!important}
  #v510HeroRoot .slot-icon img,#v510HeroRoot .slot-icon svg,#v510HeroRoot .slot-icon .v41-badge-art{width:47px!important;height:47px!important}
  .v510-portrait{height:235px}
  #v510HeroRoot .avatar-scene,#v510HeroRoot .class-avatar-big{width:220px!important;height:235px!important;min-height:235px!important}
  #v510HeroRoot .class-avatar-big img,#v510HeroRoot .v080-class-avatar-img,#v510HeroRoot .v41-portrait{width:216px!important;height:235px!important}
}
