/* Rise of Legends v2.20.138 – scoped layout corrections, no gameplay/DB changes. */
/* Skill Builder: a previous global rule colored the entire grid background.
   Empty final grid cells must not form a large opaque rectangle. */
body[data-design="legends-120"].is-subpage .wiki-builder-page .db-skill-grid {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px; background:transparent!important; border:0!important;
  padding:0!important; min-height:0; align-items:stretch;
}
body[data-design="legends-120"].is-subpage .wiki-builder-page .db-skill-section,
body[data-design="legends-120"].is-subpage .wiki-builder-content .rol-skill-category-panel{
  background:transparent; min-height:0; padding-bottom:0;
}
body[data-design="legends-120"].is-subpage .wiki-builder-page .db-skill-card{
  min-width:0; min-height:102px; box-sizing:border-box; border-radius:7px;
  background:linear-gradient(120deg,#182833,#111e27); border:1px solid #405661;
  padding:14px; overflow:visible;
}
body[data-design="legends-120"].is-subpage .wiki-builder-page .db-skill-card .rol-skill-info{
  flex:1 1 auto; min-width:0; overflow:hidden;
}
body[data-design="legends-120"].is-subpage .wiki-builder-page .db-skill-card .rol-skill-info strong,
body[data-design="legends-120"].is-subpage .wiki-builder-page .db-skill-card .rol-skill-info small{
  overflow-wrap:anywhere; line-height:1.4;
}
/* Builder and community CTA controls: consistent sizes & wrapping, not highlighted text. */
body[data-design="legends-120"].is-subpage :is(.wiki-builder-page,.wiki-page) :is(a.db-button,button.db-button){
  display:inline-flex!important; align-items:center; justify-content:center;
  box-sizing:border-box; min-height:46px; width:auto; max-width:100%;
  border:1px solid #aa8654; border-radius:7px;
  padding:10px 18px; line-height:1.35; font-size:14px;
  font-weight:700; text-transform:none; letter-spacing:0;
  text-align:center; white-space:normal; overflow-wrap:break-word;
  color:#1b211f; background:linear-gradient(180deg,#e4c78f,#bf9358);
  text-decoration:none!important; cursor:pointer; vertical-align:middle;
  box-shadow:none; flex:0 1 auto;
}
body[data-design="legends-120"].is-subpage :is(.wiki-builder-page,.wiki-page) :is(a.db-button.secondary,button.db-button.secondary){
  background:#253943; color:#f1e5cf; border-color:#68808c;
}
body[data-design="legends-120"].is-subpage :is(.wiki-builder-page,.wiki-page) :is(a.db-button,button.db-button):hover{
  filter:brightness(1.08); transform:none;
}
body[data-design="legends-120"].is-subpage :is(.wiki-builder-page,.wiki-page) :is(a.db-button,button.db-button):focus-visible{
  outline:2px solid #efc987; outline-offset:3px;
}
body[data-design="legends-120"].is-subpage .wiki-builder-page .db-build-actions{
  display:flex; flex-wrap:wrap; gap:11px; align-items:stretch;
  margin:20px 0; min-height:0;
}
body[data-design="legends-120"].is-subpage .wiki-builder-page .db-build-actions>*{
  margin:0; flex:0 1 auto;
}
body[data-design="legends-120"].is-subpage .rol-community-intro-card{
  align-items:center; min-width:0; gap:22px;
}
body[data-design="legends-120"].is-subpage .rol-community-intro-copy{
  flex:1 1 350px; min-width:0;
}
body[data-design="legends-120"].is-subpage .rol-community-actions{
  display:flex; flex:0 1 400px; min-width:0; align-items:center;
  justify-content:flex-end; flex-wrap:wrap; gap:12px;
}
body[data-design="legends-120"].is-subpage .rol-community-actions .db-button{
  min-width:160px; flex:1 1 170px;
}
body[data-design="legends-120"].is-subpage .rol-community-empty{
  padding:28px; text-align:center; min-width:0;
}
body[data-design="legends-120"].is-subpage .rol-community-empty .db-button{
  min-width:180px; margin:8px auto 0;
}
/* PvP: five real controls, not a 7-column grid that stretches Reset. */
body[data-design="legends-120"].is-subpage .arena-page .arena-filter-toolbar{
  display:grid!important;
  grid-template-columns:minmax(150px,195px) minmax(195px,330px) minmax(112px,140px) minmax(92px,115px) minmax(100px,1fr)!important;
  gap:12px; align-items:end; padding:20px 22px;
  border:1px solid #465761; background:#172732;
}
body[data-design="legends-120"].is-subpage .arena-page .arena-filter-toolbar>*{
  min-width:0; width:100%; grid-column:auto!important; margin:0;
}
body[data-design="legends-120"].is-subpage .arena-page .arena-filter-field>span{
  font-size:12px; line-height:1.3; color:#dac49f;
}
body[data-design="legends-120"].is-subpage .arena-page .arena-filters :is(select,input){
  min-width:0; width:100%; height:44px; font-size:14px; border-radius:6px;
  background:#101c26; color:#f1e5d6; border-color:#586876;
}
body[data-design="legends-120"].is-subpage .arena-page :is(.arena-search-button,.arena-reset-button){
  display:inline-flex; align-items:center; justify-content:center;
  height:44px; min-width:0; padding:0 16px; border-radius:6px;
  font-size:13px; font-family:inherit; font-weight:700; letter-spacing:0;
  line-height:1.3; white-space:nowrap; box-sizing:border-box;
}
body[data-design="legends-120"].is-subpage .arena-page .arena-last-updated{
  align-self:center; justify-self:end; text-align:right; padding:0;
  white-space:normal; line-height:1.45; font-size:12px; color:#b9c7ca;
}
body[data-design="legends-120"].is-subpage .arena-page .arena-table-wrap{
  overflow-x:auto; max-width:100%;
}
/* Referral: only its lengthy rewards card should be tall; code card remains compact. */
body[data-design="legends-120"].is-subpage .rol-referral-hero-grid{
  align-items:start; gap:22px;
}
body[data-design="legends-120"].is-subpage .rol-referral-hero-grid>.rol-referral-code-panel{
  align-self:start; height:auto; min-height:0; margin-bottom:0;
}
body[data-design="legends-120"].is-subpage .rol-referral-hero-grid>.rol-referral-reward-panel{
  align-self:start; height:auto; min-height:0; margin-bottom:0;
}
body[data-design="legends-120"].is-subpage .rol-referral-code-card{
  max-width:100%; margin-bottom:0;
}
body[data-design="legends-120"].is-subpage .rol-referral-link-row{
  grid-template-columns:minmax(0,1fr) auto;
}
body[data-design="legends-120"].is-subpage .rol-referral-link-row input{
  min-width:0; max-width:100%;
}
@media(max-width:1200px){
  body[data-design="legends-120"].is-subpage .arena-page .arena-filter-toolbar{
    grid-template-columns:minmax(150px,1fr) minmax(190px,1.6fr) 130px 110px!important;
  }
  body[data-design="legends-120"].is-subpage .arena-page .arena-last-updated{
    grid-column:1/-1!important; justify-self:start; text-align:left;
  }
}
@media(max-width:1000px){
  body[data-design="legends-120"].is-subpage .wiki-builder-page .db-skill-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  body[data-design="legends-120"].is-subpage .rol-community-intro-card{
    flex-direction:column; align-items:stretch;
  }
  body[data-design="legends-120"].is-subpage .rol-community-actions{
    flex:0 1 auto; justify-content:flex-start;
  }
}
@media(max-width:760px){
  body[data-design="legends-120"].is-subpage .arena-page .arena-filter-toolbar{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body[data-design="legends-120"].is-subpage .arena-page .arena-last-updated{
    grid-column:1/-1!important;
  }
  body[data-design="legends-120"].is-subpage .rol-referral-hero-grid{
    grid-template-columns:minmax(0,1fr);
  }
  body[data-design="legends-120"].is-subpage .rol-referral-link-row{
    grid-template-columns:minmax(0,1fr);
  }
  body[data-design="legends-120"].is-subpage .rol-referral-copy-button{width:100%}
}
@media(max-width:620px){
  body[data-design="legends-120"].is-subpage .wiki-builder-page .db-skill-grid,
  body[data-design="legends-120"].is-subpage .arena-page .arena-filter-toolbar{
    grid-template-columns:minmax(0,1fr)!important;
  }
  body[data-design="legends-120"].is-subpage .wiki-builder-page .db-build-actions>*{
    width:100%; flex-basis:100%;
  }
  body[data-design="legends-120"].is-subpage .rol-community-actions .db-button{
    flex:1 1 100%;
  }
  body[data-design="legends-120"].is-subpage .arena-page .arena-last-updated{
    grid-column:1!important;
  }
}
