/* Shared compact working layout. Loaded after page themes. */
body.tactenio-modern{font-family:Arial,'Segoe UI',sans-serif!important;font-size:14px!important;line-height:1.4!important}
body.tactenio-modern :is(#game-content,#arena-app) :is(button,input,select,textarea){font-family:inherit!important}
body.tactenio-modern :is(#game-content,#arena-app) :is(h1,h2,h3,h4){font-family:inherit!important;letter-spacing:0!important;line-height:1.25!important}
body.tactenio-modern :is(#game-content,#arena-app) h1{font-size:20px!important;margin:0 0 8px!important}
body.tactenio-modern :is(#game-content,#arena-app) h2{font-size:18px!important;margin:0 0 7px!important}
body.tactenio-modern :is(#game-content,#arena-app) h3{font-size:15px!important;margin:0 0 6px!important}
body.tactenio-modern :is(#game-content,#arena-app) .eyebrow{font-size:12px!important;letter-spacing:.5px!important}
body.tactenio-modern :is(#game-content,#arena-app) :is(.panel,.page-title){padding:12px!important;border-radius:6px!important;box-shadow:none!important}
body.tactenio-modern :is(#game-content,#arena-app) :is(.page-title,.panel-head,.heading){margin-bottom:10px!important;min-height:0!important}
body.tactenio-modern :is(#game-content,#arena-app) :is(.page-title,.panel-head,.heading) p{margin:4px 0!important;font-size:13px!important}
body.tactenio-modern :is(#game-content,#arena-app) :is(.button,.back-button,.shared-tools button,.champ-tabs button){min-height:32px!important;padding:6px 10px!important;font-size:13px!important;border-radius:5px!important}
body.tactenio-modern #game-content .app-header{padding:7px 14px!important;gap:3px 14px!important;grid-template-columns:170px minmax(0,1fr)!important}
body.tactenio-modern #game-content .app-header .brand h1{font-size:16px!important;letter-spacing:1px!important;margin:0!important}
body.tactenio-modern #game-content .app-header .brand .eyebrow{font-size:12px!important;letter-spacing:0!important}
body.tactenio-modern #game-content .tactenio-mark{width:32px!important;height:32px!important}
body.tactenio-modern #game-content .app-header .main-nav{display:flex!important;justify-content:flex-start!important;gap:4px!important;flex-wrap:wrap!important}
body.tactenio-modern #game-content .app-header .main-nav .nav-button{flex:0 1 auto!important;min-height:34px!important;height:34px!important;padding:5px 12px!important;border-radius:5px!important;gap:6px!important}
body.tactenio-modern #game-content .app-header .main-nav .nav-button span{font-size:13px!important;font-weight:600!important}
body.tactenio-modern #game-content .app-header .main-nav .nav-picture{width:22px!important;height:22px!important;flex-basis:22px!important;border-radius:4px!important}
body.tactenio-modern #game-content .app-header .section-nav{padding:0!important;gap:3px!important}
body.tactenio-modern #game-content .section-nav button{min-height:28px!important;padding:4px 8px!important;font-size:13px!important;border-radius:4px!important}
body.tactenio-modern #game-content .section-picture{width:17px!important;height:17px!important}
body.tactenio-modern #game-content .manager-sidebar{padding:9px!important;gap:5px!important;border-radius:6px!important}
body.tactenio-modern #game-content .manager-sidebar :is(.manager-strip-item,.mailbox-button){padding:6px!important;gap:7px!important}
body.tactenio-modern #game-content .manager-sidebar :is(.status-copy strong,.points-content strong,.mailbox-button>strong,.manager-sidebar-club strong){font-size:14px!important}
body.tactenio-modern #game-content .manager-sidebar :is(.status-copy span,.points-content span){font-size:12px!important}
body.tactenio-modern #game-content :is(.manager-profile-hero,.opponent-profile-hero){padding:12px!important;gap:14px!important}
body.tactenio-modern #game-content .manager-profile-main{gap:14px!important;flex-basis:280px!important}
body.tactenio-modern #game-content :is(.profile-avatar-wrap,.opponent-avatar){width:88px!important;height:auto!important;padding:0!important;border:0!important;border-radius:8px!important;box-shadow:none!important;flex-shrink:0}
body.tactenio-modern #game-content :is(.profile-avatar-wrap img,.opponent-avatar img){width:88px!important;height:88px!important;object-fit:contain!important;border-radius:8px!important}
body.tactenio-modern #game-content .profile-avatar-wrap label{position:static!important;display:block!important;padding:4px!important;font-size:12px!important;border-radius:4px!important;margin-top:4px!important}
body.tactenio-modern #game-content #profile-manager-name{display:none!important}
body.tactenio-modern #game-content #profile-club-name{font-size:20px!important;line-height:1.25!important}
body.tactenio-modern #game-content .manager-profile-copy p{font-size:13px!important;margin:6px 0!important}
body.tactenio-modern #game-content .profile-stat-grid{grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:6px!important;margin:8px 0!important}
body.tactenio-modern #game-content .profile-stat-grid>div{min-height:0!important;padding:8px!important;border-radius:5px!important;box-shadow:none!important}
body.tactenio-modern #game-content .profile-stat-grid strong{font-size:18px!important;margin-top:3px!important}
body.tactenio-modern #game-content .profile-stat-grid span{font-size:12px!important;letter-spacing:0!important;text-transform:none!important}
body.tactenio-modern #game-content :is(.logo-review-note,.profile-active-benefits){padding:7px 10px!important;margin:7px 0!important;font-size:12px!important}
body.tactenio-modern #arena-app #profile-content .profile-hero{grid-template-columns:88px minmax(0,1fr) 180px!important;padding:12px!important;gap:14px!important}
body.tactenio-modern #arena-app #profile-content .avatar{width:88px!important;height:88px!important;padding:4px!important;border-radius:8px!important;box-shadow:none!important}
body.tactenio-modern #arena-app #profile-content .profile-identity h1{font-size:20px!important;margin:0 0 6px!important}
body.tactenio-modern #arena-app #profile-content .profile-identity p{margin:4px 0!important;font-size:13px!important}
body.tactenio-modern #arena-app #profile-content .profile-actions{gap:4px!important;padding-left:12px!important}
body.tactenio-modern #arena-app #profile-content .profile-actions :is(a,button){padding:5px 8px!important;font-size:13px!important;border-radius:4px!important}
body.tactenio-modern #arena-app #profile-content .metrics{margin-top:7px!important;gap:5px!important}
body.tactenio-modern #arena-app #profile-content .metrics span{padding:3px 6px!important;font-size:12px!important}
body.tactenio-modern #arena-app #profile-content .profile-columns{margin-top:10px!important;gap:10px!important}
body.tactenio-modern #game-content #ranking-rows .ranking-team-name{display:inline!important;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif!important;font-size:12px!important;font-weight:400!important;color:#52604f!important;text-decoration:none!important;white-space:nowrap!important;line-height:20px!important}
body.tactenio-modern #game-content #ranking-rows .ranking-team-name>span[translate]{display:inline!important;font:inherit!important;color:inherit!important;white-space:nowrap!important}
body.tactenio-modern #game-content #ranking-rows .ranking-team-name .vip-public-mark{display:inline-block!important;vertical-align:middle!important;margin-right:5px!important}
body.tactenio-modern #game-content #ranking-rows td:nth-child(2){white-space:nowrap!important}
@media(max-width:1150px){body.tactenio-modern #game-content .app-header{grid-template-columns:1fr!important}body.tactenio-modern #game-content .profile-stat-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
@media(max-width:760px){body.tactenio-modern #game-content .app-header .main-nav{flex-wrap:nowrap!important;overflow-x:auto!important}body.tactenio-modern #game-content .app-header .main-nav .nav-button{flex:none!important;min-width:0!important;min-height:38px!important;height:38px!important}body.tactenio-modern #game-content .manager-profile-main{flex-direction:row!important;align-items:center!important}body.tactenio-modern #arena-app #profile-content .profile-hero{grid-template-columns:72px minmax(0,1fr)!important}body.tactenio-modern #arena-app #profile-content .avatar{width:72px!important;height:72px!important}body.tactenio-modern #arena-app #profile-content .profile-actions{grid-column:1/-1!important;padding:8px 0 0!important}body.tactenio-modern #game-content .profile-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
/* Club labels share the plain ranking typography, regardless of VIP or ownership. */
body.tactenio-modern :is(#game-content,#arena-app) :is(.shared-participant-list>span:not(.participant-separator),.cup-tree-team>span,.entry>a,td>a[href*="/managers.html"],.ranking-team-name,.friend-row>a,.vip-club-name,#sidebar-club-name,#profile-club-name,#opponent-profile-club,#home-name,#away-name){font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif!important;font-size:12px!important;font-weight:400!important;text-decoration:none!important;line-height:20px!important;letter-spacing:0!important;color:inherit!important}
body.tactenio-modern #arena-app .shared-participant-list>span:not(.participant-separator){display:inline!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;color:#52604f!important;white-space:nowrap!important}
body.tactenio-modern #arena-app .cup-tree-team>span{font-weight:400!important;color:#52604f!important}
body.tactenio-modern #arena-app .cup-tree-team>span .vip-club-name{white-space:nowrap!important}
body.tactenio-modern #arena-app #profile-content .profile-identity h1,body.tactenio-modern #arena-app .club h2{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif!important;font-size:12px!important;font-weight:400!important;line-height:20px!important;color:#52604f!important}
body.tactenio-modern #game-content #profile-club-name,body.tactenio-modern #game-content #sidebar-club-name,body.tactenio-modern #game-content #opponent-profile-club{font-size:12px!important;font-weight:400!important;line-height:20px!important}

.vip-recovery-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 10px;padding:9px 12px;border:1px solid #c6d6ca;border-radius:6px;background:#f5f9f4}.vip-recovery-toolbar span{font-size:13px;color:#34543d}

/* Dense training rows: keep all attributes, XP and controls on one line. */
body.tactenio-modern #game-content #view-training .training-grid{border-collapse:collapse!important;border-spacing:0!important;min-width:1080px!important;width:100%;table-layout:auto}
body.tactenio-modern #game-content #view-training .training-grid :is(td,th){height:27px!important;padding:1px 4px!important;line-height:1.15!important;font-size:12px!important;white-space:nowrap}
body.tactenio-modern #game-content #view-training .training-grid :is(button,select){min-height:0!important;height:23px!important;margin:0!important;padding:1px 3px!important;line-height:19px!important;font-size:12px!important}
body.tactenio-modern #game-content #view-training .training-grid .train-name button{font-weight:400!important}
body.tactenio-modern #game-content #view-training .train-ability :is(span,small){display:inline!important;vertical-align:middle;line-height:1.1!important}
body.tactenio-modern #game-content #view-training .train-ability small{margin-left:3px!important;font-size:12px!important;white-space:nowrap;color:#516057!important}
body.tactenio-modern #game-content #view-training .train-ability button{height:20px!important;width:19px!important;min-width:19px!important;min-height:0!important;line-height:17px!important;padding:0!important}
body.tactenio-modern #game-content #view-training .train-ability button[aria-disabled="true"]{background:#e4e8e5!important;color:#59675d!important;border:1px solid #b8c3bc!important;box-shadow:none!important;cursor:help}
body.tactenio-modern #game-content #view-training .training-grid .talent-badge{height:21px!important;width:21px!important;min-width:21px!important;line-height:21px!important;font-size:12px!important;padding:0!important}
body.tactenio-modern #game-content #view-training .training-grid .train-ability:has([aria-disabled="false"]){background:#fff0bd!important}
body.tactenio-modern #game-content #view-training .training-grid .train-ability:has([aria-disabled="true"]){background:#edf1ee!important}
body.tactenio-modern #game-content #view-training .training-roster-card{padding:8px!important}
body.tactenio-modern #game-content #view-training .training-table-scroll{max-height:none!important;overflow:auto!important}
#training-inline-feedback:empty{display:none}#training-inline-feedback{margin:4px 0;padding:5px 8px;background:#fff0bd;color:#473b14;font-size:13px}
/* Strong level identity survives the global theme; VIP has its own gold surface. */
body.tactenio-modern #arena-app .shared-card[data-cup-level],body.tactenio-modern #arena-app .cup-detail-header[data-cup-level]{background:linear-gradient(110deg,var(--cup-tint) 0%,var(--cup-tint) 65%,#fff 100%)!important;border:1px solid var(--cup-accent)!important;border-left:6px solid var(--cup-accent)!important;color:#21392e!important}
body.tactenio-modern #arena-app .shared-card[data-cup-level] h2{color:var(--cup-accent)!important;font-size:17px!important}
body.tactenio-modern #arena-app [data-vip-cup="true"]{background:linear-gradient(110deg,#f5d77e,#fff0bd 70%,#fff8df)!important;border:2px solid #a67b1b!important;border-left:6px solid #a67b1b!important;box-shadow:inset 0 0 0 2px #fff4cb!important}
body.tactenio-modern #arena-app [data-vip-cup="true"] h2{color:#634600!important}
body.tactenio-modern #arena-app .vip-cup-label{display:inline-block;margin:0 0 3px 8px;padding:3px 7px;border:1px solid #9c741c;border-radius:4px;background:#684c0d;color:#fff7df;font-size:12px;font-weight:700;white-space:nowrap}
body.tactenio-modern #arena-app .cup-detail-header[data-cup-level] :is(h2,p,strong){color:#21392e!important}

/* Collection ownership must remain visible under the profile theme. */
body.tactenio-modern #game-content #view-profile .manager-profile-hero.premium-frame,
body.tactenio-modern #arena-app .profile-hero.premium-frame{border:2px solid #b58b28!important;background:linear-gradient(115deg,#fff9e9,#fffdf5)!important;box-shadow:inset 0 0 0 3px #f6e2a4,0 2px 8px #71531a22!important;animation:none!important}
body.tactenio-modern #game-content #view-profile .premium-frame #profile-avatar,
body.tactenio-modern #arena-app .premium-frame .avatar{border:5px double #ae7d13!important;padding:4px!important;background:#ffedb4!important;box-shadow:0 0 0 2px #e5bd54!important;box-sizing:border-box}
.collection-badge{display:inline-block;background:#72530f!important;color:#fff6d9!important;border:1px solid #bb923b;border-radius:4px;padding:3px 6px;font:12px Arial,sans-serif;line-height:1.2;margin:5px 0}
.collection-badge[hidden]{display:none!important}
body.tactenio-modern #game-content #view-training .training-roster-card{width:fit-content!important;max-width:100%!important;box-sizing:border-box;justify-self:start}
body.tactenio-modern #game-content #view-training .training-grid{width:auto!important;min-width:0!important;table-layout:auto!important}
body.tactenio-modern #game-content #view-training .training-grid :is(td,th){padding-left:3px!important;padding-right:3px!important}
body.tactenio-modern #game-content #view-training .training-grid .train-name{min-width:125px!important}
body.tactenio-modern #game-content #view-training .training-grid .train-ability{min-width:63px!important}
body.tactenio-modern #game-content #view-training .training-grid select{width:51px!important}
body.tactenio-modern #game-content #view-training .training-grid .train-ability small{margin-left:2px!important;color:#4b5e50!important}

/* Shared compact data layout, centred within the game workspace. */
body.tactenio-modern #game-content #view-training .training-roster-card{justify-self:center!important;margin-inline:auto!important}
body.tactenio-modern #game-content :is(#team-list-mode,#view-transfers,#view-contracts,#view-academy,#view-ranking){width:100%!important;max-width:1120px!important;margin-inline:auto!important;box-sizing:border-box}
body.tactenio-modern #game-content #team-list-mode{max-width:940px!important}
body.tactenio-modern #game-content #team-list-mode .squad-workspace{display:grid!important;grid-template-columns:minmax(0,670px) minmax(210px,250px)!important;gap:10px!important;justify-content:center}
body.tactenio-modern #game-content #team-list-mode :is(.squad-table-head,.squad-row){display:grid!important;grid-template-columns:28px 54px 31px minmax(130px,1fr) 32px 35px 40px 33px 30px 53px!important;gap:3px!important;padding:2px 5px!important;min-height:27px!important;min-width:600px!important;box-sizing:border-box;line-height:1.2!important;font-size:12px!important}
body.tactenio-modern #game-content #team-list-mode .squad-table-card{padding:0!important;overflow-x:auto!important}
body.tactenio-modern #game-content #team-list-mode .squad-table-body{max-height:none!important;overflow:visible!important}
body.tactenio-modern #game-content #team-list-mode .squad-row strong{font-size:12px!important;font-weight:400!important}
body.tactenio-modern #game-content #team-list-mode .player-card{padding:10px!important;align-self:start}
body.tactenio-modern #game-content #team-list-mode .player-detail{padding:6px!important}
body.tactenio-modern :is(#game-content,#arena-app) :is(.squad-row,.contract-row,.academy-row,.public-squad-row) .talent-badge{width:21px!important;height:21px!important;min-width:21px!important;line-height:21px!important;padding:0!important;font-size:12px!important}
body.tactenio-modern #game-content #team-list-mode .status-chip{font-size:12px!important;padding:1px 3px!important}
body.tactenio-modern #game-content :is(.contract-row,.contracts-table-head){grid-template-columns:minmax(140px,1fr) 35px 55px 30px 35px 35px 80px 48px 70px!important;gap:4px!important;min-width:665px!important;padding:2px 5px!important;min-height:27px!important;font-size:12px!important;line-height:1.2!important}
body.tactenio-modern #game-content #view-academy :is(.academy-row,.academy-table-head){grid-template-columns:minmax(145px,1fr) 35px 55px 32px 38px 35px 85px!important;min-width:560px!important;gap:4px!important;min-height:27px!important;padding:2px 5px!important;font-size:12px!important;line-height:1.2!important}
body.tactenio-modern #game-content :is(.contract-row,.academy-row,.public-squad-row) strong{font-size:12px!important;font-weight:400!important}
body.tactenio-modern #game-content .public-squad-row{min-height:27px!important;padding:2px 5px!important;font-size:12px!important;gap:4px!important;line-height:1.2!important}
body.tactenio-modern :is(#game-content,#arena-app) :is(#view-ranking,#view-transfers,#profile-roster,.profile-roster,.standings) :is(td,th){height:27px!important;padding:2px 5px!important;font-size:12px!important;line-height:1.2!important;box-sizing:border-box}
body.tactenio-modern #arena-app .profile-columns{max-width:1040px!important;margin-inline:auto!important}
body.tactenio-modern #arena-app .profile-roster{width:auto!important;min-width:650px;max-width:100%;margin-inline:auto;border-collapse:collapse!important}
body.tactenio-modern #game-content :is(#view-transfers,#view-contracts,#view-academy,#view-ranking) .panel-head{padding-block:4px!important}
@media(max-width:1000px){body.tactenio-modern #game-content #team-list-mode .squad-workspace{grid-template-columns:minmax(0,1fr)!important}body.tactenio-modern #game-content #team-list-mode .player-card{max-width:670px;width:100%;box-sizing:border-box;margin-inline:auto}}

/* Aligned cell boundaries and content-sized panels. */
body.tactenio-modern #game-content #view-academy .academy-layout{grid-template-columns:minmax(0,600px) 270px!important;align-items:start!important;justify-content:center;gap:10px!important}
body.tactenio-modern #game-content #view-contracts .contracts-layout{grid-template-columns:minmax(0,720px) 280px!important;align-items:start!important;justify-content:center;gap:10px!important}
body.tactenio-modern #game-content :is(.academy-list-card,.contracts-table-card,.academy-detail,.contract-detail-card){height:auto!important;min-height:0!important;align-self:start!important;padding:8px!important}
body.tactenio-modern #game-content #view-academy :is(.academy-row,.academy-table-head){grid-template-columns:minmax(145px,1fr) 44px 70px 36px 40px 38px 85px!important;min-width:500px!important;gap:0!important;padding:0!important}
body.tactenio-modern #game-content #view-contracts :is(.contract-row,.contracts-table-head){grid-template-columns:minmax(140px,1fr) 44px 70px 36px 38px 40px 92px 62px 70px!important;min-width:692px!important;gap:0!important;padding:0!important}
body.tactenio-modern #game-content :is(.academy-row,.academy-table-head,.contract-row,.contracts-table-head)>*{box-sizing:border-box;min-width:0!important;padding:3px 5px!important;border-right:1px solid #b8c9bd!important;align-self:stretch!important;display:flex!important;align-items:center;overflow:hidden;white-space:nowrap;line-height:21px!important;font-size:12px!important}
body.tactenio-modern #game-content :is(.academy-row,.academy-table-head,.contract-row,.contracts-table-head)>:last-child{border-right:0!important}
body.tactenio-modern #game-content :is(.academy-row,.contract-row) .country-flag{display:inline-flex!important;align-items:center!important;gap:0!important;width:auto!important;padding:0!important}
body.tactenio-modern #game-content :is(.academy-row,.contract-row) .country-flag img{width:21px!important;height:14px!important;object-fit:contain!important}
body.tactenio-modern #game-content #view-training .training-grid :is(td,th){border:1px solid #aabfb0!important}
body.tactenio-modern #game-content :is(.contracts-scroll,.academy-list-card){overflow-x:auto!important}
body.tactenio-modern #game-content :is(.contracts-list,.academy-list){max-height:none!important;min-height:0!important;height:auto!important;overflow:visible!important}
body.tactenio-modern #game-content :is(.academy-side,.contract-side){display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important;align-content:start!important}
body.tactenio-modern #game-content :is(.academy-detail-grid,.contract-detail-grid,.contract-quote){gap:4px!important;margin:6px 0!important}
body.tactenio-modern #game-content :is(.academy-detail-grid,.contract-detail-grid,.contract-quote)>div{padding:5px!important;min-height:0!important;border-radius:4px!important}
body.tactenio-modern #game-content :is(.academy-detail-grid,.contract-detail-grid,.contract-quote) :is(span,strong){font-size:12px!important;line-height:1.3!important;margin:0!important}
body.tactenio-modern #game-content #selected-player-overview{gap:4px!important}
body.tactenio-modern #game-content #selected-player-overview .player-overview-item{padding:5px!important;min-height:0!important;border-radius:4px!important}
body.tactenio-modern #game-content #selected-player-overview :is(span,strong){font-size:12px!important;line-height:1.3!important;white-space:nowrap}
body.tactenio-modern #game-content #selected-player-name{font-size:15px!important;line-height:1.2!important}
body.tactenio-modern #game-content #view-profile{max-width:860px!important;width:100%!important;margin-inline:auto!important}
body.tactenio-modern #game-content #view-profile .manager-profile-hero{grid-template-columns:88px minmax(0,1fr)!important;padding:10px!important;gap:8px 14px!important}
body.tactenio-modern #game-content #view-profile #profile-stat-grid{gap:4px!important}
body.tactenio-modern #game-content #view-profile #profile-stat-grid>div{min-height:0!important;padding:6px!important}
body.tactenio-modern #game-content #profile-roster{overflow-x:auto!important}
body.tactenio-modern #game-content #profile-roster .profile-roster-row{display:grid!important;grid-template-columns:30px 60px 36px minmax(155px,1fr) 40px 45px 48px 35px!important;min-width:560px!important;min-height:27px!important;height:auto!important;padding:0!important;gap:0!important;line-height:1.2!important;font-size:12px!important;border-radius:0!important}
body.tactenio-modern #game-content #profile-roster .profile-roster-row>*{min-width:0!important;border-right:1px solid #b8c9bd!important;padding:3px 5px!important;box-sizing:border-box;display:flex;align-items:center;font-size:12px!important;font-weight:400!important;white-space:nowrap;overflow:hidden}
body.tactenio-modern #game-content #profile-roster .talent-badge{height:21px!important;width:21px!important;min-width:21px!important;line-height:21px!important;font-size:12px!important;padding:0!important}
@media(max-width:1150px){body.tactenio-modern #game-content #view-academy .academy-layout,body.tactenio-modern #game-content #view-contracts .contracts-layout{grid-template-columns:minmax(0,1fr)!important}body.tactenio-modern #game-content :is(.academy-side,.contract-side){max-width:560px!important;width:100%!important;justify-self:center}}
body.tactenio-modern #game-content :is(.academy-table-head,.contracts-table-head)>*{white-space:normal!important;line-height:1.2!important;min-height:30px}

/* Compact information cells and controls shared by every management page. */
body.tactenio-modern #game-content :is(.player-contract-grid,.player-overview,.academy-detail-grid,.contract-detail-grid,.contract-quote,.profile-stat-grid,.academy-head-stats,.contract-head-stats,.transfer-head-stats,.supporters-stats,.hero-club-stats,.tournament-metrics){gap:4px!important;padding:4px!important;min-height:0!important}
body.tactenio-modern #game-content :is(.player-contract-grid,.player-overview,.academy-detail-grid,.contract-detail-grid,.contract-quote,.profile-stat-grid,.academy-head-stats,.contract-head-stats,.transfer-head-stats,.supporters-stats,.hero-club-stats,.tournament-metrics)>div,
body.tactenio-modern #game-content :is(.metric,.finance-stat){min-width:0!important;min-height:0!important;height:auto!important;padding:5px 6px!important;border-radius:4px!important;box-sizing:border-box}
body.tactenio-modern #game-content :is(.player-contract-grid,.player-overview,.academy-detail-grid,.contract-detail-grid,.contract-quote,.profile-stat-grid,.academy-head-stats,.contract-head-stats,.transfer-head-stats,.supporters-stats,.hero-club-stats,.tournament-metrics,.metric,.finance-stat) :is(span,strong){font-size:12px!important;line-height:1.25!important;letter-spacing:0!important;text-transform:none!important;margin:0!important;overflow-wrap:anywhere}
body.tactenio-modern #game-content #selected-player-card{min-width:0!important;overflow:visible!important;box-sizing:border-box}
body.tactenio-modern #game-content #selected-player-card :is(.player-overview,.player-section,.player-card-hero){padding:6px!important;margin:0!important}
body.tactenio-modern #game-content #selected-player-card .player-section-title{font-size:11px!important;letter-spacing:0!important;gap:5px!important;margin-bottom:5px!important;flex-wrap:wrap}
body.tactenio-modern #game-content #selected-player-card .player-contract-grid{grid-template-columns:minmax(0,1fr)!important}
body.tactenio-modern #game-content #selected-player-card .player-contract-grid>div{display:flex!important;justify-content:space-between;align-items:center;gap:8px!important;padding:4px 5px!important;border-width:0 0 1px!important;border-radius:0!important;background:transparent!important}
body.tactenio-modern #game-content #selected-player-card .player-contract-grid strong{white-space:nowrap!important;flex-shrink:0}
body.tactenio-modern #game-content #selected-player-card :is(.player-action-grid,.player-quick-actions){gap:4px!important;margin-top:5px!important;grid-template-columns:minmax(0,1fr)!important}
body.tactenio-modern #game-content #selected-player-card .player-action-grid label{gap:3px!important;font-size:11px!important;letter-spacing:0!important;text-transform:none!important}
body.tactenio-modern #game-content #selected-player-card .player-action-grid label>div{grid-template-columns:minmax(55px,1fr) auto!important;gap:4px!important}
body.tactenio-modern #game-content #selected-player-card :is(input,.button,.player-action-link){min-height:27px!important;height:auto!important;padding:4px 6px!important;line-height:1.2!important;font-size:12px!important;border-radius:4px!important;box-sizing:border-box}
body.tactenio-modern #game-content #selected-player-card .player-action-message:empty{display:none!important}
body.tactenio-modern #game-content #selected-player-card .player-skill-list{gap:5px!important;grid-template-columns:minmax(0,1fr)!important}
body.tactenio-modern #game-content :is(#view-academy,#view-contracts,#view-profile,#view-transfers,#view-club,#view-finance) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),select,.button){min-height:28px!important;height:auto!important;padding:4px 7px!important;font-size:12px!important;line-height:1.3!important;border-radius:4px!important;box-sizing:border-box}
body.tactenio-modern #game-content :is(.academy-detail,.contract-detail-card,.contract-history,.academy-history){padding:8px!important;min-height:0!important}

/* Grid separators sit between cells; selection never paints over names. */
body.tactenio-modern #game-content #view-academy .academy-row.selected,
body.tactenio-modern #game-content #view-contracts .contract-row.selected{box-shadow:none!important;outline:none!important;background:#d3e8d9!important}
body.tactenio-modern #game-content #view-academy :is(.academy-row,.academy-table-head)>*,
body.tactenio-modern #game-content #view-contracts :is(.contract-row,.contracts-table-head)>*{border-right:1px solid #9fb4a6!important;padding-left:7px!important;padding-right:7px!important}
body.tactenio-modern #game-content #view-academy .academy-row>strong{font-weight:400!important;position:static!important}
body.tactenio-modern #arena-app .profile-roster{border-collapse:collapse!important}
body.tactenio-modern #arena-app .profile-roster :is(td,th),
body.tactenio-modern #game-content #view-transfers :is(td,th){border:1px solid #afc1b5!important;padding:3px 6px!important}
body.tactenio-modern .cup-alert,body.tactenio-modern .cup-alert :is(span,p,strong,small,button){color:#fff!important;-webkit-text-fill-color:#fff!important;opacity:1!important}
body.tactenio-modern .cup-alert{background:#173d2c!important;border:1px solid #83b796!important;font-size:13px!important;padding:9px 12px!important}
body.tactenio-modern #arena-app .cup-detail-header[data-cup-level] .shared-card{background:transparent!important;border:0!important;box-shadow:none!important}
body.tactenio-modern #arena-app .cup-tree[data-cup-level]{background:var(--cup-tint)!important;border:1px solid var(--cup-accent)!important;border-top:4px solid var(--cup-accent)!important;color:#20342a!important}
body.tactenio-modern #arena-app .cup-tree[data-cup-level] .cup-tree-match{background:color-mix(in srgb,var(--cup-tint) 65%,white)!important;border:1px solid var(--cup-accent)!important;color:#20342a!important}
body.tactenio-modern #arena-app .cup-tree[data-cup-level] .round-reward{background:var(--cup-accent)!important;color:white!important}
body.tactenio-modern #arena-app .cup-tree[data-cup-level] .round-reward span{color:white!important}
body.tactenio-modern #arena-app .cup-tree[data-cup-level] .cup-tree-links path{stroke:var(--cup-accent)!important}
body.tactenio-modern #arena-app .cup-tree[data-cup-level] .cup-tree-team{color:#20342a!important;border-color:color-mix(in srgb,var(--cup-accent) 35%,white)!important}
body.tactenio-modern #arena-app :is(.cup-tree,.cup-detail-header,.shared-card)[data-cup-level][data-vip-cup="true"]{--cup-accent:#88600d;--cup-tint:#f6df97;background:linear-gradient(120deg,#eed078,#fff0b8)!important;border:2px solid #996f16!important;box-shadow:inset 0 0 0 3px #fff4cc!important}
body.tactenio-modern #arena-app .cup-tree[data-vip-cup="true"] .cup-tree-match{background:#fff1bf!important;border-color:#996f16!important}

/* One flag size and one cell treatment across the player tables. */
body.tactenio-modern #game-content :is(.squad-row,.contract-row,.academy-row,.profile-roster-row,.public-squad-row) .country-flag,
body.tactenio-modern #arena-app .profile-roster .profile-country{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:0!important;padding:0!important;margin:0!important;min-width:18px!important;width:18px!important;height:12px!important;line-height:12px!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;vertical-align:middle;flex-shrink:0}
body.tactenio-modern #game-content :is(.squad-row,.contract-row,.academy-row,.profile-roster-row,.public-squad-row) .country-flag img,
body.tactenio-modern #arena-app .profile-roster .profile-country img{display:block!important;width:18px!important;min-width:18px!important;max-width:18px!important;height:12px!important;min-height:12px!important;max-height:12px!important;object-fit:contain!important;border:0!important;border-radius:0!important;padding:0!important;margin:0!important;box-shadow:none!important;filter:none!important}
body.tactenio-modern #game-content :is(.squad-row,.contract-row,.academy-row,.profile-roster-row,.public-squad-row) .country-flag>span{display:none!important}
body.tactenio-modern #game-content #team-list-mode :is(.squad-row,.squad-table-head){gap:0!important;padding:0!important;border-bottom:1px solid #b8c9bd!important;min-height:27px!important}
body.tactenio-modern #game-content #team-list-mode :is(.squad-row,.squad-table-head)>*{box-sizing:border-box;min-width:0!important;min-height:27px!important;display:flex!important;align-items:center!important;padding:3px 4px!important;border-right:1px solid #afc1b5!important;line-height:1.2!important;font-size:12px!important;font-weight:400!important}
body.tactenio-modern #game-content #team-list-mode .squad-row.selected{box-shadow:none!important;background:#d3e8d9!important}
body.tactenio-modern #game-content :is(.contract-row,.academy-row)>*{min-height:27px!important;padding-top:3px!important;padding-bottom:3px!important;line-height:21px!important;font-weight:400!important}
body.tactenio-modern #game-content :is(.contract-row,.academy-row,.squad-row,.profile-roster-row){border-radius:0!important}
body.tactenio-modern #game-content #team-list-mode .squad-row>.status-chip{background:transparent!important;border-radius:0!important}

/* Training uses the same small flags as contracts and the squad. */
body.tactenio-modern #game-content #view-training .country-flag{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:0!important;padding:0!important;margin:0!important;min-width:18px!important;width:18px!important;height:12px!important;line-height:12px!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;vertical-align:middle;flex-shrink:0}
body.tactenio-modern #game-content #view-training .country-flag img{display:block!important;width:18px!important;min-width:18px!important;max-width:18px!important;height:12px!important;min-height:12px!important;max-height:12px!important;object-fit:contain!important;border:0!important;border-radius:0!important;padding:0!important;margin:0!important;box-shadow:none!important;filter:none!important}
body.tactenio-modern #game-content #view-training .country-flag>span{display:none!important}
body.tactenio-modern #game-content #view-training .training-grid :is(td,th):nth-child(3){width:30px!important;min-width:30px!important;text-align:center!important;vertical-align:middle!important;padding:2px 5px!important}

/* Approved original illustrated stadium; opaque panels keep dense data readable. */
body.tactenio-modern:has(#game-content),
body.tactenio-modern.arena-page:not(.embedded){background:linear-gradient(180deg,rgba(228,237,228,.78),rgba(228,237,228,.66)),url('/game/assets/match/stadium-cartoon-web-v3.webp') center center/cover fixed no-repeat!important;min-height:100vh}
html.embedded body.tactenio-modern.arena-page,body.tactenio-modern.arena-page.embedded{background:transparent!important}
@media(max-width:760px){body.tactenio-modern:has(#game-content),body.tactenio-modern.arena-page:not(.embedded){background-attachment:scroll!important}}

/* Image-only trophy cabinets and unmistakable live lineup selection. */
body.tactenio-modern #trophies,body.tactenio-modern #club-trophies .trophies{display:flex!important;flex-wrap:wrap!important;gap:8px!important;justify-content:flex-start!important}
body.tactenio-modern #trophies .trophy-item,body.tactenio-modern #club-trophies .trophy{width:88px!important;height:88px!important;min-height:0!important;flex:0 0 88px!important;margin:0!important;padding:6px!important;box-sizing:border-box;display:grid!important;place-items:center!important;border-radius:8px!important}
body.tactenio-modern #trophies .trophy-item>img,body.tactenio-modern #club-trophies .trophy>img{width:74px!important;height:74px!important;max-width:100%!important;object-fit:contain!important;margin:0!important}
body.tactenio-modern #team-lineup-mode #roster .player-row.already-used{background:#cde5cf!important;opacity:1!important;border-left:0!important;box-shadow:inset 3px 0 #246439!important}
body.tactenio-modern #team-lineup-mode #roster .player-row.already-used .player-name{color:#164b28!important;font-weight:700!important}
body.tactenio-modern #team-lineup-mode #roster .player-row.already-used .lineup-status{background:#246439!important;color:#fff!important;font-weight:800!important;border-radius:4px;justify-self:center;min-width:18px;text-align:center}
body.tactenio-modern #team-lineup-mode #roster .player-row.manual-selected{outline:2px solid #93752b!important;outline-offset:-2px;background:#f0dfa8!important}

/* Original illustrated staff, full body visible at every club level. */
body.tactenio-modern #game-content #view-club .staff-visual{height:180px!important;max-height:180px!important;min-height:180px!important;background:#fff!important;margin:8px 0!important;overflow:hidden!important;display:flex!important;justify-content:center!important;align-items:center!important}
body.tactenio-modern #game-content #view-club .staff-visual img{position:static!important;width:auto!important;max-width:100%!important;height:180px!important;max-height:180px!important;object-fit:contain!important;background:#fff!important;filter:none!important}

/* Compact illustrated player, on the same light surface as the staff. */
body.tactenio-modern #game-content #view-team #selected-player-card .player-card-hero{grid-template-columns:82px minmax(0,1fr)!important;gap:8px!important;align-items:center!important}
body.tactenio-modern #game-content #view-team #selected-player-card .player-card-art{width:82px!important;height:126px!important;background:#fff!important;border:0!important;border-radius:6px!important;box-shadow:none!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important}
body.tactenio-modern #game-content #view-team #selected-player-card .player-card-art img{width:82px!important;height:126px!important;object-fit:contain!important;filter:none!important;box-shadow:none!important}

/* Preserve atlas crop geometry inside compact trophy cabinets. */
body.tactenio-modern #game-content #trophies .trophy-item>.trophy-art-frame,body.tactenio-modern #club-trophies .trophy>.trophy-art-frame{width:74px!important;height:74px!important;margin:0!important;border-radius:6px!important;box-shadow:none!important}
body.tactenio-modern #trophies .trophy-art-frame img,body.tactenio-modern #club-trophies .trophy-art-frame img{width:var(--trophy-width)!important;height:var(--trophy-height)!important;max-width:none!important;max-height:none!important;object-fit:fill!important}
body.tactenio-modern #game-content .manager-sidebar #mailbox-button{display:grid!important;grid-template-columns:27px minmax(0,1fr) auto!important;grid-template-rows:auto!important;align-items:center!important;min-height:40px!important;height:auto!important}
body.tactenio-modern #game-content #mailbox-button>.status-icon{grid-row:1!important;grid-column:1!important;width:27px!important;height:27px!important;padding:0!important;filter:none!important;background:#fff!important;border:0!important;box-shadow:none!important}
body.tactenio-modern #game-content #mailbox-button>span{display:none!important}
body.tactenio-modern #game-content #mailbox-button>strong{grid-row:1!important;grid-column:2!important;align-self:center!important;margin:0!important;color:#193e29!important}
body.tactenio-modern #game-content #mailbox-button>b{position:static!important;grid-column:3!important;grid-row:1!important;min-width:18px!important;height:18px!important;padding:0 3px!important;border:0!important;background:#246439!important;color:#fff!important}

/* One illustrated navigation family, matching the mailbox. */
body.tactenio-modern #game-content .app-header :is(.nav-picture,.section-picture),body.tactenio-modern #game-content .manager-sidebar .manager-strip-item .status-icon{object-fit:contain!important;padding:0!important;background:#fff!important;border:0!important;box-shadow:none!important;filter:none!important;border-radius:4px!important}

/* Illustrated VIP banner, with readable text on its light left half. */
body.tactenio-modern #game-content #view-store .vip-art{background-image:linear-gradient(90deg,#fff9e655,transparent 70%),url('/game/assets/premium/vip-cartoon-v2.webp');background-color:#f5f3de;background-position:center;background-size:cover;color:#173d2b}
body.tactenio-modern #game-content #view-store .vip-art :is(h3,strong,small,.vip-duration){color:#173d2b!important;text-shadow:none!important}
body.tactenio-modern #game-content #view-store .vip-offer[data-vip="1"] .vip-xp{color:#17629c!important}
body.tactenio-modern #game-content #view-store .vip-offer[data-vip="2"] .vip-xp{color:#7534a5!important}
body.tactenio-modern #game-content #view-store .vip-offer[data-vip="3"] .vip-xp{color:#805b08!important}
body.tactenio-modern #game-content #view-store .vip-art .vip-diamond{background:#fffaf0;border-color:currentColor}

/* Center both navigation rows; reserve equal space opposite the brand. */
@media(min-width:1151px){
 body.tactenio-modern #game-content .app-header{grid-template-columns:170px minmax(0,1fr) 170px!important}
}
@media(min-width:761px){
 body.tactenio-modern #game-content .app-header .main-nav,
 body.tactenio-modern #game-content .app-header .section-nav{justify-content:center!important;min-width:0}
}
@media(max-width:760px){
 body.tactenio-modern #game-content .app-header .main-nav,
 body.tactenio-modern #game-content .app-header .section-nav{justify-content:flex-start!important;min-width:0;max-width:100%;overflow-x:auto!important}
}

/* Larger TACTENIO crest, keeping room for the club name and VIP badge. */
body.tactenio-modern #game-content .app-header .brand{padding-left:76px!important;min-height:68px!important}
body.tactenio-modern #game-content .app-header .brand .tactenio-home-link .tactenio-mark{width:64px!important;height:64px!important;object-fit:contain}
@media(min-width:1151px){body.tactenio-modern #game-content .app-header{grid-template-columns:190px minmax(0,1fr) 190px!important}}
@media(max-width:760px){
 body.tactenio-modern #game-content .app-header .brand{padding-left:66px!important;min-height:58px!important}
 body.tactenio-modern #game-content .app-header .brand .tactenio-home-link .tactenio-mark{width:54px!important;height:54px!important}
}
