/* FM27 R27.16: finance ledger integrated into the single budget card. */
body.fm27-midnight .fm27-r2716-finance{margin-bottom:10px;min-width:0}
body.fm27-midnight .fm27-r2716-finance>.fm27-r2716-ledger{margin:19px 0 0!important;padding:18px 0 0!important;border:0!important;border-top:1px solid #36475f!important;background:transparent!important;border-radius:0!important;box-shadow:none!important}
body.fm27-midnight .fm27-r2716-finance .fm27-r2716-ledger-heading{margin:0 0 14px!important;padding:0!important}
body.fm27-midnight .fm27-r2716-finance .fm27-r2716-ledger-heading h2{font-size:1.35rem!important;line-height:1.25!important;letter-spacing:normal!important;font-weight:700!important;color:#fff!important}
body.fm27-midnight .fm27-r2716-finance .fm27-r2715-ledger-empty{padding:0!important;border:0!important;background:transparent!important;border-radius:0!important;box-shadow:none!important;margin:0!important;color:#b8c8dc!important;font-size:.86rem!important}
body.fm27-midnight .fm27-r2716-finance .fm27-r2716-ledger .table-responsive{border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
body.fm27-midnight .fm27-r2716-finance .fm27-r2716-ledger table{background:transparent!important}
/* Stadium desktop: 2/3 left for the pitch, 1/3 right for stadium facts. Second row is attendance + capacity. */
body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-stadium-layout{display:grid!important;grid-template-columns:minmax(0,2fr) minmax(325px,1fr)!important;gap:14px!important;align-items:start!important}
body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-stadium-layout>.fm27-r2715-stadium-hero{grid-column:1!important;grid-row:1!important;min-width:0;max-width:none!important;width:100%}
body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-stadium-layout>.fm27-r2715-info{grid-column:2!important;grid-row:1!important;min-width:0;max-width:none!important;width:100%}
body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-stadium-layout>.fm27-r83-matchday-revenue{grid-column:1!important;grid-row:2!important;min-width:0;width:100%}
body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-stadium-layout>.fm27-s74-aside{grid-column:2!important;grid-row:2!important;min-width:0;display:block!important;width:100%}
body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-stadium-layout>.fm27-s74-aside .fm27-s74-capacity{width:100%;height:100%}
/* Keep large pitch graphic inside its left column; no overflow into stadium information. */
body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-stadium-map{min-width:0;min-height:420px!important;grid-template-columns:minmax(74px,1fr) minmax(170px,3.1fr) minmax(74px,1fr)!important;grid-template-rows:minmax(75px,auto) minmax(230px,1fr) minmax(75px,auto)!important;gap:8px!important;padding:12px 15px 18px!important}
body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-stand{padding:8px 5px!important}
body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-stand span{font-size:.73rem!important}
body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-stand strong{font-size:.98rem!important}
body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-stand small{font-size:.64rem!important}
body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-stand-build{padding:4px 7px!important;font-size:.67rem!important}
body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-map-vip{flex-wrap:wrap;justify-content:center;row-gap:2px}
body.fm27-midnight .fm27-r2715-stadium .fm27-r2716-vip-count{font-size:.67rem;font-weight:600;color:#dfd0f8;border-left:1px solid #ad92da;padding-left:7px;white-space:nowrap}
/* Quality rows: fixed-width actions align five green squares on one vertical baseline. */
body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-facts>div.fm27-r2715-quality{display:grid!important;grid-template-columns:minmax(125px,1fr) minmax(0,1.08fr)!important;gap:8px;align-items:center}
body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-facts .fm27-r2715-quality dd{display:grid!important;grid-template-columns:max-content 78px!important;align-items:center!important;justify-content:end!important;gap:8px!important;flex-wrap:nowrap!important;margin:0!important;min-width:0}
body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-facts .fm27-r2715-quality .fm27-s74-rating{white-space:nowrap;flex-wrap:nowrap;gap:4px}
body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-facts .fm27-r2715-quality .fm27-r2716-upgrade{appearance:none;background:transparent!important;border:0!important;border-radius:4px!important;box-shadow:none!important;outline-offset:2px!important;color:#93ddc6!important;font-weight:600!important;font-size:.71rem!important;line-height:1.25!important;padding:3px 0!important;margin:0!important;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center;gap:3px;cursor:pointer}
body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-facts .fm27-r2715-quality .fm27-r2716-upgrade i{font-size:.68rem!important;line-height:1!important}
body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-facts .fm27-r2715-quality .fm27-r2716-upgrade:hover{text-decoration:underline;color:#c8ffe7!important}
body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-facts .fm27-r2715-quality .fm27-r2716-max{width:78px;text-align:center;display:block;font-size:.71rem!important}
body.fm27-midnight .fm27-r2716-upgrade-modal .fm27-r2716-upgrade-question{color:#f5f8ff;font-size:.96rem;font-weight:650;line-height:1.55;margin:0 0 12px}
body.fm27-midnight .fm27-r2716-upgrade-modal [aria-disabled="true"]{pointer-events:none;opacity:.55}
/* Below tablet width use one column and preserve the order: stadium, information, revenue, capacity. */
@media(max-width:1030px){
 body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-stadium-layout{grid-template-columns:minmax(0,1fr)!important}
 body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-stadium-layout>.fm27-r2715-stadium-hero{grid-column:1!important;grid-row:1!important}
 body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-stadium-layout>.fm27-r2715-info{grid-column:1!important;grid-row:2!important}
 body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-stadium-layout>.fm27-r83-matchday-revenue{grid-column:1!important;grid-row:3!important}
 body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-stadium-layout>.fm27-s74-aside{grid-column:1!important;grid-row:4!important}
}
@media(max-width:620px){
 body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-stadium-map{min-height:390px!important;grid-template-columns:minmax(64px,.82fr) minmax(116px,2.8fr) minmax(64px,.82fr)!important;grid-template-rows:minmax(90px,auto) minmax(180px,1fr) minmax(90px,auto)!important;gap:5px!important;padding:10px 7px 11px!important}
 body.fm27-midnight .fm27-r2715-stadium .fm27-r2715-facts>div.fm27-r2715-quality{grid-template-columns:minmax(0,1fr) max-content!important}
}
