/* v0.9.12j11b — final visual safety rules.
   Keep artwork roles distinct; text occupies the inner opening, not the ornaments. */
#heroDetails #growthTraining button.primary::before,
#heroDetails #shardBuy::before,
#heroDetails .meal-life-section button.primary::before{
 border-image-source:var(--reg-secondary);
 border-image-slice:100 105 100 105 fill;
}
#heroDetails #growthTraining button.primary,
#heroDetails #shardBuy,
#heroDetails .meal-life-section button.primary{
 color:#fff8df;text-shadow:0 1px 2px #173b37;
}
#heroDetails #growthTraining button:disabled,
#heroDetails #shardBuy:disabled,
#heroDetails .meal-life-section button:disabled{
 color:#fff8df;opacity:.58;text-shadow:0 1px 2px #173b37;
}
#heroDetails #growthTraining button,#heroDetails #shardBuy,
#heroDetails .meal-life-section button{
 padding-inline:12px!important;white-space:nowrap;
}
#heroDetails .detail-pane-scroll .growth-food-row button{
 flex-basis:clamp(96px,13vw,155px)!important;
}
#heroDetails .detail-sections button{
 padding-inline:6px!important;
}
#battle .controls>button{
 box-sizing:border-box;border:0!important;border-radius:0!important;
 background-color:transparent!important;box-shadow:none!important;
}
#battle .battle-roster button,#battle .battle-roster button.on{
 background-color:transparent!important;box-shadow:none!important;
 border:0!important;border-radius:0!important;
 padding-inline:12px;
}
#battle .battle-roster button>b{
 min-width:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;
}
@media(max-height:450px){
 #battle .battle-roster button,#battle .battle-roster button.on{padding-inline:9px}
 #heroDetails #growthTraining button,#heroDetails #shardBuy,#heroDetails .meal-life-section button{padding-inline:9px!important}
}

/* A transparent frame still needs its interior backing; never paint outside the corners. */
#battle .battle-roster button{
 background-image:var(--zp-card-normal),linear-gradient(#29434b,#20353d)!important;
 background-size:100% 100%,calc(100% - 8px) calc(100% - 8px)!important;
 background-position:center!important;background-repeat:no-repeat!important;
}
#battle .battle-roster button.on{
 background-image:var(--zp-card-selected),linear-gradient(#3a504a,#263e3b)!important;
}
.wallet:has(.wallet-token) .wallet-token{
 border-width:8px 15px 6px!important;
 padding:2px 4px!important;
}
#heroDetails .detail-header h2,#missionDialog .mission-header h2,#bookDialog .book-head h2,#wachaDialog .wacha-head h2{
 padding-top:4px!important;
}
@media(max-height:450px){
 .wallet:has(.wallet-token) .wallet-token{border-width:7px 13px 5px!important;padding:1px 3px!important}
 #heroDetails .detail-header h2,#missionDialog .mission-header h2,#bookDialog .book-head h2,#wachaDialog .wacha-head h2{padding-top:3px!important}
}

/* v0.9.12j11c: One frame per companion card, one paper per data pane.
   The roster is a scroll container, not another visible panel. */
#heroDetails .dossier-roster{
 background:none!important;border:0!important;border-radius:0!important;
 box-shadow:none!important;padding:0!important;
}
#heroDetails #detailTabs{
 overflow-y:auto;overflow-x:hidden;scrollbar-width:none!important;
 scrollbar-gutter:auto!important;scrollbar-color:auto;
 padding:3px 3px 3px 2px;overscroll-behavior:contain;touch-action:pan-y;
}
#heroDetails #detailTabs::-webkit-scrollbar{display:none;width:0;height:0}
#heroDetails #detailTabs .detail-tab::before,
#heroDetails #detailTabs .detail-tab::after{content:none!important}
#heroDetails #detailTabs .detail-tab{touch-action:pan-y}
/* Keep the outer paper panel; no second ornamental frame in its interior. */
#heroDetails .detail-pane-scroll{
 border:0!important;border-image:none!important;background:transparent!important;
 box-shadow:none!important;border-radius:0!important;
}
#heroDetails .detail-portrait{border:0!important;box-shadow:none!important;border-radius:0!important}
/* Opaque individual battle cards; state affects foreground only, never backing.
   The backing overlaps the inner gold edge, while the exterior remains clear. */
#battle .battle-roster button,
#battle .battle-roster button.on,
#battle .battle-roster button.unplaced:not(.on),
#battle .battle-roster button.dead,
#battle .battle-roster button:disabled{
 opacity:1!important;filter:none!important;
 background-size:100% 100%,94% 89%!important;
}
#battle .battle-roster button.unplaced:not(.on)>img{opacity:.7}
#battle .battle-roster button.dead>img{opacity:.55;filter:grayscale(1)}
#battle .battle-roster button.dead>b{color:#d5d1c5;text-decoration:line-through}
