/* Preserve painted button endcaps: extend the paper center instead of
   stretching an entire illustration into every possible button shape. */
@media(min-width:1000px){
body .primary:not(.painted-action),body #page-shop .product-buy,body .filter-tabs button[aria-pressed=true],body .rank-tabs button[aria-pressed=true],body #page-shop .shop-tabs button[aria-pressed=true]{--button-art:url('./assets/painted-ui/button-red.webp');background:none!important;border:solid transparent!important;border-width:12px 26px!important;border-image:var(--button-art) 50 110 fill / 12px 26px / 0 stretch!important;border-radius:0!important;box-shadow:none!important;outline:none!important;padding:4px 8px!important;min-height:52px;line-height:1.3}
body .primary:disabled:not(.painted-action),body #page-shop .product-buy:disabled,body #page-shop .product-buy.owned{--button-art:url('./assets/painted-ui/button-jade.webp');background:none!important}
body .filter-tabs button[aria-pressed=true],body .rank-tabs button[aria-pressed=true],body #page-shop .shop-tabs button[aria-pressed=true]{--button-art:url('./assets/painted-ui/tab-red.webp');border-image-slice:35 80!important;border-image-width:12px 27px!important}
body .honor-tabs button{flex:0 1 260px;min-height:62px;font-size:clamp(22px,1.7vw,28px);line-height:1.2;padding:5px 12px!important}
body .honor-tabs .secondary{background:none!important;border:solid transparent!important;border-width:12px 26px!important;border-image:url('./assets/painted-ui/button-paper.webp') 50 110 fill /12px 26px/0 stretch!important;box-shadow:none!important;border-radius:0!important}
}
/* Match the broad, low reference header. Never stretch its icons. */
@media(min-width:1100px){body .app-header{height:clamp(100px,7.2vw,132px);padding-top:10px;grid-template-columns:minmax(170px,210px) minmax(0,1fr) auto;gap:clamp(8px,1.2vw,24px);padding-inline:clamp(12px,1.3vw,28px)}body .app-nav{gap:clamp(8px,1.5vw,28px)}body .brand .brand-wordmark{max-width:210px}body .painted-nav-icon{width:clamp(33px,2.8vw,44px);height:clamp(36px,3vw,47px)}body .painted-nav-icon img{object-fit:contain;width:100%;height:100%}}
/* Give cards and score plaques more of the usable screen width. */
body[data-view=stats] #main-content{max-width:2048px;padding-inline:clamp(10px,1.1vw,22px)}
body .honor-wall{gap:clamp(10px,1vw,20px);padding:clamp(6px,.65vw,12px)}
body .honor-wall .journey-metric{padding:3px 0 10px!important}body .honor-wall .journey-metric strong{width:calc(100% + 12px);max-width:none;align-self:center;padding:10px 14px;font-size:clamp(21px,2.9cqi,35px)!important}
body .honor-theme-row b,body .honor-recent-row>b{min-width:112px;text-align:center;padding:9px 17px;font-variant-numeric:tabular-nums}
@media(min-width:1200px){body .honor-wall .journey-metrics{gap:clamp(10px,.9vw,18px)}body .honor-themes,body .honor-recent{padding-inline:3px}.honor-theme-row{grid-template-columns:clamp(70px,8cqi,115px) minmax(0,1fr) auto}.honor-theme-row b,.honor-recent-row>b{min-width:125px}}
@media(max-width:599px){body .honor-wall .journey-metric strong{font-size:clamp(18px,5cqi,26px)!important;width:100%;padding:8px 5px}body .honor-theme-row b,body .honor-recent-row>b{min-width:100px}}
/* Screenshot-driven corrections: constrain tab geometry independently of
   generic .primary flex rules and reserve the viewport for the actual board. */
body:has(#page-stats:not([hidden])) #main-content{width:100%!important;max-width:2048px!important;margin-inline:auto!important;padding-inline:clamp(10px,1.3vw,28px)!important;background:transparent}
body #page-stats{width:100%;max-width:none;margin-inline:0}body .honor-wall{width:100%;max-width:none}
body .honor-tabs{display:grid!important;grid-template-columns:repeat(2,minmax(0,260px));justify-content:start;align-items:center;gap:18px}
body .honor-tabs button{display:flex!important;justify-content:center!important;align-items:center!important;text-align:center!important;width:100%!important;min-width:0!important;max-width:100%!important;flex:none!important;margin:0;letter-spacing:1px}
body .honor-wall .journey-metric strong{display:flex;justify-content:center;align-items:baseline;gap:8px;text-align:center}
body .honor-wall .honor-medal{height:clamp(130px,12vw,185px)}body .honor-theme-row img{height:90px}
@media(max-width:959px){body .honor-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}body .honor-tabs button{font-size:21px!important;min-height:54px}}
@media(max-width:599px){body .honor-wall .honor-medal{height:100px}body .honor-theme-row img{height:75px}body .honor-tabs button{font-size:18px!important}}
body .honor-wall,body .honor-sidebar,body .honor-themes,body .honor-recent,body .honor-titles,body .honor-wall .journey-metric{background:#fff6e9 url('./assets/painted-ui/approved-honor-paper.webp') center/512px 512px repeat!important;border:18px solid transparent!important;border-image:url('./assets/painted-ui/approved-honor-frame.webp') 120 /18px/0 stretch!important;box-shadow:none!important;border-radius:0!important}
body .honor-wall .journey-metric strong,body .honor-theme-row b,body .honor-recent-row>b{background:none!important;border:solid transparent;border-width:10px 18px;border-image:url('./assets/painted-ui/currency-plaque.webp') 35 65 fill /10px 18px/0 stretch;padding:2px 8px;min-height:44px;line-height:1.2}
@media(max-width:599px){body .honor-wall,body .honor-sidebar,body .honor-themes,body .honor-recent,body .honor-titles,body .honor-wall .journey-metric{border-width:9px!important;border-image-width:9px!important}}

/* One continuous, viewport-sized landscape behind the transparent header. */
html{min-height:100%}
body,body:has(#page-stats:not([hidden])){min-height:100vh;min-height:100svh;background:#faf0df url('./assets/theme/color-mountains.webp') center center/cover no-repeat fixed!important}
body .app-header{background:transparent!important;background-image:none!important;backdrop-filter:none;box-shadow:none}
