/* Reading layout: level text, one alignment grid, quiet accents. */
body.ui-rebuild{--ui-rail:208px;font-size:15px;line-height:1.65}
body.ui-rebuild::before,body.ui-rebuild::after{display:none!important}
body.ui-rebuild :is(h1,h2,h3,h4){font-style:normal!important;letter-spacing:0;line-height:1.4;text-wrap:wrap;transform:none!important}
body.ui-rebuild h1{font-size:32px!important}
body.ui-rebuild :is(.panel-title h2,.section-top h2,.library h2,.editor h2,.battle-statistics-title,.recap-heading h3){font-size:20px!important;font-style:normal}
body.ui-rebuild .ui-rail{padding:28px 18px;gap:42px;background:var(--ui-page);border-right:1px solid color-mix(in srgb,var(--ui-line) 45%,transparent)}
body.ui-rebuild .ui-wordmark>span{font-size:38px;width:42px;letter-spacing:-6px}
body.ui-rebuild .ui-wordmark small,body.ui-rebuild .ui-rail-footer,body.ui-rebuild .ui-rail nav em,body.ui-rebuild .ui-rail nav a>span{display:none}
body.ui-rebuild .ui-rail nav{transform:none;padding:0;gap:8px}
body.ui-rebuild .ui-rail nav a{display:flex;align-items:center;margin:0;min-height:48px;padding:10px 14px;translate:none!important;transition:none}
body.ui-rebuild .ui-rail nav strong{font-size:17px;font-weight:700;font-style:normal;letter-spacing:0}
body.ui-rebuild .ui-rail nav a::before{inset:0;clip-path:polygon(0 0,100% 0,calc(100% - 9px) 100%,0 100%);transition:none}
body.ui-rebuild>header.ui-topbar{min-height:52px;padding:8px 32px!important}
body.ui-rebuild .ui-topbar .header-right{padding:0;border:0}
body.ui-rebuild.ui-frame>main{width:min(100%,1280px);max-width:1280px;margin:0 auto!important;padding:20px 32px 48px}
body.ui-rebuild:not(.ui-shell):not(.ui-frame)>main{max-width:1488px;padding:20px 32px 48px}
body.ui-rebuild.ui-frame[data-ui-page=updates]>header.ui-topbar,body.ui-rebuild.ui-frame[data-ui-page=mechanics]>header.ui-topbar{display:none!important}
body.ui-rebuild.ui-frame[data-ui-page=local-arena]>.ui-topbar>a,body.ui-rebuild.ui-frame[data-ui-page=local-arena]>.ui-topbar>strong{display:none}
body.ui-rebuild .ui-lobby-panel{animation:none}
body.ui-rebuild :is(button.primary,a.primary):hover:not(:disabled){transform:none}
body.ui-rebuild :is(button.primary,a.primary,.button.primary){clip-path:none;padding-inline:18px}
/* Lobby: art stays in the header, the list stays readable. */
body.ui-rebuild #lobbyIntro{height:184px;min-height:184px;padding:20px 0;margin:0 0 16px}
body.ui-rebuild #lobbyIntro::before,body.ui-rebuild #lobbyIntro::after,body.ui-rebuild #lobbyIntro .eyebrow{display:none}
body.ui-rebuild #lobbyIntro>div{transform:none;width:52%}
body.ui-rebuild #lobbyIntro h1{max-width:none;font-size:36px!important;font-style:normal;line-height:1.3;margin:0;text-shadow:none;letter-spacing:0}
body.ui-rebuild #lobbyIntro h1 span{display:inline;font-size:1em;margin:0 0 0 8px}
body.ui-rebuild #lobbyIntro .ui-banner-art,body.ui-rebuild[data-art-shape=portrait] #lobbyIntro .ui-banner-art{top:0;right:0;width:44%;height:184px;object-fit:contain;object-position:right center;mask-image:none}
body.ui-rebuild #lobbyIntro .create-menu{left:0;right:auto;bottom:16px}
body.ui-rebuild .create-menu>summary{clip-path:none;font-size:13px;padding:10px 16px;box-shadow:none;transform:none}
body.ui-rebuild .cloud-summary{margin-bottom:16px!important;gap:16px;font-size:12px}
body.ui-rebuild .feedback-admin{padding:12px 0!important;margin-bottom:16px;border-bottom:1px solid var(--ui-line)!important}
body.ui-rebuild .feedback-admin h2{font-size:16px}
body.ui-rebuild details.feedback-admin{max-height:none;overflow:visible;padding:0!important}
body.ui-rebuild .feedback-fold-title{padding:12px 0;min-height:44px;font-size:14px;font-weight:650;cursor:pointer;color:var(--ui-muted)}
body.ui-rebuild .feedback-admin .insight-heading h2{display:none}
body.ui-rebuild .feedback-admin[open]{padding-bottom:16px!important}
body.ui-rebuild .feedback-admin .insight-heading{justify-content:flex-end}
body.ui-rebuild .ui-lobby-tabs{transform:none;gap:24px;padding:0;border-bottom:1px solid var(--ui-line);margin:0 0 20px}
body.ui-rebuild .ui-lobby-tabs button{padding:10px 0;min-height:44px;font-size:17px;font-style:normal;font-weight:700;translate:none;transition:none}
body.ui-rebuild .ui-lobby-tabs button::before{display:none}
body.ui-rebuild .ui-lobby-tabs button[aria-selected=true]{color:var(--ui-accent)!important;translate:none;border-bottom:3px solid var(--ui-accent)!important}
body.ui-rebuild .lobby-filters{gap:12px;margin-bottom:16px}
body.ui-rebuild #uiPanel-arenas #arenaList{border-top:1px solid var(--ui-line)}
body.ui-rebuild #arenaList .arena-card{padding:18px 0!important;gap:8px 20px!important;min-height:0!important;grid-template-columns:minmax(0,1fr) auto!important;transition:none!important}
body.ui-rebuild #arenaList .arena-card::before,body.ui-rebuild #arenaList .arena-card::after{display:none}
body.ui-rebuild #arenaList .arena-card:hover{transform:none!important;translate:none!important;background:color-mix(in srgb,var(--ui-accent) 5%,transparent)!important}
body.ui-rebuild #arenaList .arena-card strong{font-size:20px;font-style:normal;line-height:1.5;letter-spacing:0}
body.ui-rebuild #arenaList .arena-card .arena-tags{gap:5px 12px}
body.ui-rebuild #arenaList .arena-card .arena-tags span{font-size:12px;padding:0;color:var(--ui-muted)}
body.ui-rebuild #arenaList .arena-card .card-bottom{font-size:12px;gap:12px;align-items:center}
body.ui-rebuild #arenaList .arena-card .card-bottom>span:last-child{font-size:13px;white-space:nowrap}
body.ui-rebuild #arenaList .arena-lobby-edit{padding-top:46px;border-bottom:1px solid var(--ui-line)}
body.ui-rebuild #arenaList .arena-lobby-edit .arena-card{border-bottom:0!important}
body.ui-rebuild .daily-layout{grid-template-columns:minmax(0,1fr) 300px;gap:28px}
body.ui-rebuild .arena-heading h2{font-size:26px;font-style:normal}
body.ui-rebuild :is(.arena-history,.player-ranking){padding:20px 0}
body.ui-rebuild .arena-table{font-size:14px;line-height:1.5;font-variant-numeric:tabular-nums}
body.ui-rebuild .arena-table :is(th,td){padding:12px 10px}
/* Build and playback: keep headings and numbers on the same grid. */
body.ui-rebuild[data-ui-page=local-arena] .local-privacy{padding:0 0 16px!important;margin:0 0 16px;border-bottom:1px solid var(--ui-line)!important}
body.ui-rebuild .ui-local-mark,body.ui-rebuild .local-privacy .eyebrow{display:none}
body.ui-rebuild .local-privacy h1{margin:0 0 6px}
body.ui-rebuild .local-privacy h1,body.ui-rebuild .mechanics-hero h1{font-style:normal}
body.ui-rebuild .local-privacy p{font-size:13px}
body.ui-rebuild .library{padding:0 20px 16px 0}
body.ui-rebuild .library h2{margin-top:0}
body.ui-rebuild .battle-stat-item b,body.ui-rebuild .recap-totals strong{font-size:24px;font-variant-numeric:tabular-nums}
body.ui-rebuild .battle-stat-item span{font-size:12px}
body.ui-rebuild .recap-panel{padding:20px 0}
body.ui-rebuild .recap-skill-name strong{font-size:15px}
body.ui-rebuild #loginDialog h2{font-size:36px;transform:none;letter-spacing:0;margin:16px 0 24px}
/* Reference: bounded line lengths and consistent section spacing. */
body.ui-rebuild .mechanics-hero{padding:0 0 20px!important;margin:0 0 20px;border-bottom:1px solid var(--ui-line)!important}
body.ui-rebuild .mechanics-hero h1{margin:0 0 8px}
body.ui-rebuild .mechanics-hero .eyebrow{display:none}
body.ui-rebuild .mechanics-hero::after{display:none}
body.ui-rebuild .mechanics-hero .hero-facts{display:none}
body.ui-rebuild .hero-facts{gap:20px}
body.ui-rebuild .hero-facts strong{font-size:24px}
body.ui-rebuild .category-panel{margin:12px 0 24px;padding:0!important}
body.ui-rebuild .category-panel nav{flex-direction:row;flex-wrap:wrap;gap:6px 12px;overflow:visible}
body.ui-rebuild .category-panel button{flex:0 0 auto;width:auto;min-height:44px;padding:8px 10px;font-size:13px;box-shadow:none}
body.ui-rebuild .mechanic-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 32px}
body.ui-rebuild .mechanic-card{padding:18px 0;border-top:1px solid var(--ui-line)!important;min-width:0}
body.ui-rebuild .mechanic-card h3{font-size:20px;font-style:normal;line-height:1.45}
body.ui-rebuild .mechanic-card :is(p,li,.card-summary){font-size:14px;line-height:1.75}
body.ui-rebuild .group-heading{margin:24px 0 14px}
body.ui-rebuild .group-heading h2{font-size:22px}
body.ui-rebuild .group-number{display:none}
/* Updates: newest open, history in compact rows. All original entries remain. */
body.ui-rebuild.ui-frame[data-ui-page=updates]>main{max-width:960px;padding-top:28px}
body.ui-rebuild .updates-heading{transform:none;gap:0;padding:0 0 20px;margin:0;border-bottom:1px solid var(--ui-line)}
body.ui-rebuild .updates-kicker{display:none}
body.ui-rebuild .updates-heading h1{font-size:30px!important;font-style:normal}
body.ui-rebuild #updatesList{max-width:none}
body.ui-rebuild .update-release{margin:0;padding:0;border:0;border-bottom:1px solid var(--ui-line);background:none}
body.ui-rebuild .update-release>details>summary{list-style:none;display:grid;grid-template-columns:minmax(0,1fr) auto 20px;align-items:center;gap:16px;padding:18px 0;min-height:64px;cursor:pointer}
body.ui-rebuild .update-release>details>summary::-webkit-details-marker{display:none}
body.ui-rebuild .update-release>details>summary::after{content:'+';color:var(--ui-muted);font-size:22px;font-weight:400;text-align:center}
body.ui-rebuild .update-release>details[open]>summary::after{content:'−'}
body.ui-rebuild .update-release h2{font-size:18px;font-style:normal;font-weight:700;line-height:1.5;margin:0}
body.ui-rebuild .update-release-meta{display:flex;align-items:center;gap:10px;font-size:12px;white-space:nowrap;color:var(--ui-muted);margin:0}
body.ui-rebuild .update-latest{font-size:11px;padding:1px 6px;border-radius:2px;background:var(--ui-accent);color:var(--ui-ink)}
body.ui-rebuild .update-body{padding:0 28px 22px 0;max-width:75ch}
body.ui-rebuild .update-body section+section{margin-top:16px}
body.ui-rebuild .update-body h3{font-size:14px;margin:0 0 8px;color:var(--ui-muted)}
body.ui-rebuild .update-body ul{margin:0;padding-left:20px}
body.ui-rebuild .update-body li{font-size:15px;line-height:1.75;margin:6px 0;color:var(--ui-text)}
@media(max-width:1100px){
 body.ui-rebuild .daily-layout{grid-template-columns:1fr}
 body.ui-rebuild .daily-feedback{position:static;border-left:0!important;padding:20px 0!important}
 body.ui-rebuild .lobby-filters{grid-template-columns:1fr}
 body.ui-rebuild #arenaLobbySearch{max-width:360px;font-size:14px}
 body.ui-rebuild .mechanic-grid{grid-template-columns:1fr}
 body.ui-rebuild .mechanic-card{max-width:80ch}
}
@media(max-width:850px){
 body.ui-rebuild{--ui-rail:0px}
 body.ui-rebuild .ui-rail{border:0;padding:8px 12px}
 body.ui-rebuild .ui-rail nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
 body.ui-rebuild .ui-rail nav a{justify-content:center;min-height:44px;padding:8px 2px}
 body.ui-rebuild .ui-rail nav strong{font-size:14px;white-space:nowrap}
 body.ui-shell>.ui-rail{height:60px}
 body.ui-shell>main.ui-shell-main{inset:60px 0 0}
 body.ui-shell.auth-locked>main.ui-shell-main{top:0}
 body.ui-rebuild.ui-frame>main,body.ui-rebuild:not(.ui-shell):not(.ui-frame)>main{padding:18px 20px 36px}
 body.ui-rebuild[data-ui-page=local-arena] .workspace{grid-template-columns:180px minmax(0,1fr)}
 body.ui-rebuild #lobbyIntro{height:156px;min-height:156px}
 body.ui-rebuild #lobbyIntro .ui-banner-art,body.ui-rebuild[data-art-shape=portrait] #lobbyIntro .ui-banner-art{height:156px;width:45%}
 body.ui-rebuild .composer-grid{grid-template-columns:minmax(0,1fr)}
 body.ui-rebuild .ui-selected-column{position:static}
}
@media(max-width:600px){
 body.ui-rebuild h1{font-size:26px!important}
 body.ui-rebuild.ui-frame>main,body.ui-rebuild:not(.ui-shell):not(.ui-frame)>main{padding:16px 16px 32px}
 body.ui-rebuild>header.ui-topbar{padding:6px 16px!important}
 body.ui-rebuild .ui-rail nav strong{font-size:13px}
 body.ui-rebuild #lobbyIntro h1{font-size:27px!important}
 body.ui-rebuild #lobbyIntro h1 span{display:inline;margin:0 0 0 4px}
 body.ui-rebuild .ui-lobby-tabs{gap:18px;margin-bottom:16px}
 body.ui-rebuild .ui-lobby-tabs button{font-size:15px;padding:10px 0;flex:none}
 body.ui-rebuild #arenaList .arena-card{grid-template-columns:1fr!important;padding:16px 0!important;gap:7px!important}
 body.ui-rebuild #arenaList .arena-card strong{font-size:18px}
 body.ui-rebuild #arenaList .arena-card .card-bottom{flex-wrap:wrap;font-size:12px}
 body.ui-rebuild #arenaList .arena-recommend-control{left:90px}
 body.ui-rebuild[data-ui-page=local-arena] .workspace{display:block}
 body.ui-rebuild .settings-fields{grid-template-columns:1fr;gap:12px}
 body.ui-rebuild .local-privacy{display:block}
 body.ui-rebuild .local-privacy p{font-size:12px}
 body.ui-rebuild .scope-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;overflow:visible}
 body.ui-rebuild .scope-tabs button{justify-content:space-between;padding:8px 10px;min-height:44px;font-size:14px}
 body.ui-rebuild .update-release>details>summary{grid-template-columns:minmax(0,1fr) 18px;gap:5px 12px;padding:16px 0}
 body.ui-rebuild .update-release h2{font-size:17px;grid-column:1;grid-row:1}
 body.ui-rebuild .update-release-meta{grid-column:1;grid-row:2}
 body.ui-rebuild .update-release>details>summary::after{grid-column:2;grid-row:1/3}
 body.ui-rebuild .update-body{padding-right:0}
 body.ui-rebuild .update-body li{font-size:14px}
 body.ui-rebuild .updates-heading h1{font-size:26px!important}
 body.ui-rebuild #loginDialog h2{font-size:30px}
}

/* XP cards follow the allocation column, not the page viewport. */
body.ui-rebuild #xpShop .xp-cards{grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:12px}
body.ui-rebuild #xpShop .xp-card{display:block;padding:14px;min-width:0;background:var(--ui-panel);border:1px solid var(--ui-line);border-radius:6px;color:var(--ui-text)}
body.ui-rebuild #xpShop .xp-card-heading{gap:12px}
body.ui-rebuild #xpShop .xp-card-heading h4{font-size:15px;white-space:nowrap}
body.ui-rebuild #xpShop .xp-card-heading>span{color:var(--ui-accent)}
body.ui-rebuild #xpShop .xp-total{margin-top:10px;color:var(--ui-muted)}
body.ui-rebuild #xpShop .xp-total>b{font-size:24px;color:var(--ui-text)}
body.ui-rebuild #xpShop .xp-total>small{font-size:12px}
body.ui-rebuild #xpShop .xp-sources{font-size:12px;color:var(--ui-muted)}
body.ui-rebuild #xpShop .xp-stepper{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:8px;align-items:center;margin:12px 0}
body.ui-rebuild #xpShop .xp-stepper button{width:44px;min-width:44px;height:44px;min-height:44px;padding:0;font-size:21px;line-height:1}
body.ui-rebuild #xpShop .xp-stepper>span{line-height:1.4}
body.ui-rebuild #xpShop .xp-stepper b{font-size:22px}
body.ui-rebuild #xpShop .xp-stepper small{font-size:11px;color:var(--ui-muted)}
body.ui-rebuild #xpShop .xp-unlocks{gap:8px;font-size:11px;color:var(--ui-muted);border-color:var(--ui-line)}
body.ui-rebuild #xpShop .xp-unlocks .is-ready{color:var(--ui-accent)}
body.ui-rebuild #xpShop .xp-card progress,body.ui-rebuild #xpShop .xp-card progress::-webkit-progress-bar{background:var(--ui-raised)}
body.ui-rebuild #xpShop .xp-card progress::-webkit-progress-value{background:var(--ui-accent)}
body.ui-rebuild #xpShop .xp-card progress::-moz-progress-bar{background:var(--ui-accent)}
body.ui-rebuild #xpShop .xp-overview{border-color:var(--ui-line)}
body.ui-rebuild #xpShop .xp-overview strong{color:var(--ui-text)}
body.ui-rebuild #xpShop .xp-overview>div>span,body.ui-rebuild #xpShop .xp-overview small,body.ui-rebuild #xpShop .xp-overview p,body.ui-rebuild #xpShop .xp-help{color:var(--ui-muted)}
body.ui-rebuild #xpShop .xp-overview .xp-warning{color:var(--ui-accent)}
