/* V168 — restrained polish. No global resizing or card inflation. */
:root{--ui-bg:#f4f7f5;--ui-border:#dfe8e2;--ui-muted:#68766d;--ui-green:#18a35b;--ui-green-soft:#f1faf5;--ui-danger:#c53b3b;}
html{background:var(--ui-bg)}
html body{background:var(--ui-bg)!important}
/* Keep existing page geometry; only unify subtle interaction feedback. */
html body .table tbody tr,html body .league-table tbody tr,html body .quick-group-table tbody tr,html body .transfer-table tbody tr,html body .tm-table tbody tr{transition:background-color .1s ease}
html body .table tbody tr:hover td,html body .league-table tbody tr:hover td,html body .quick-group-table tbody tr:hover td,html body .transfer-table tbody tr:hover td,html body .tm-table tbody tr:hover td{background:#f7fbf8!important}
html body tr.fm-user-row td{background:#eff9f3!important}
html body tr.fm-user-row td:first-child{box-shadow:inset 3px 0 var(--ui-green)}
html body .rating-circle{font-weight:800!important}
html body .pos-pill{font-weight:700!important}
html body .injured-row td:first-child{box-shadow:inset 3px 0 var(--ui-danger)}
html body .player-name-text,html body .player-main-name{font-weight:700!important}
/* Compact tournament state without changing card dimensions. */
html body .quick-state{display:flex;align-items:center;justify-content:center;padding:6px 9px;border-radius:9px;font-size:11px!important;font-weight:700!important;text-align:center;border:1px solid var(--ui-border)}
html body .quick-state.success{background:#f0faf4!important;border-color:#b9dbc5!important;color:#17633b!important}
html body .quick-state.warn,html body .quick-state.warning{background:#fff9ed!important;border-color:#ecd5a6!important;color:#8c5d17!important}
html body .quick-timer,html body #lineupTimer,html body #quickLineupTimer{font-variant-numeric:tabular-nums;font-weight:800!important}
/* Transfer status helpers. */
.fm-ui-chip{display:inline-flex;align-items:center;gap:4px;min-height:20px;padding:2px 6px;border:1px solid #d7e4dc;border-radius:999px;background:#fff;color:#526057;font-size:9px;font-weight:700;white-space:nowrap}
.fm-ui-chip.success{background:#f0faf4;border-color:#b9dbc5;color:#17633b}.fm-ui-chip.warn{background:#fff9ed;border-color:#ecd5a6;color:#8c5d17}.fm-ui-chip.danger{background:#fff2f2;border-color:#edc2c2;color:#9d2d2d}
.fm-ui-empty,.fm-ui-loading{display:flex;align-items:center;justify-content:center;min-height:56px;padding:14px;color:var(--ui-muted);font-size:11px;text-align:center}
.fm-value-flash{animation:fmValueFlash .4s ease}@keyframes fmValueFlash{45%{transform:scale(1.04)}100%{transform:scale(1)}}
html body .fm-auction-timer{display:inline-flex;align-items:center;justify-content:center;min-width:66px;padding:3px 7px;border-radius:8px;background:#f7faf8;border:1px solid var(--ui-border);font-weight:750;font-variant-numeric:tabular-nums;color:#425249}
html body .fm-current-bid{font-weight:700;color:#174e2d;white-space:nowrap}
html body .fm-cond-cell{font-weight:700!important}
html body .fm-cond-cell.fm-cond-low{color:#a35f08!important}html body .fm-cond-cell.fm-cond-critical{color:#b12e2e!important}
/* Canonical compact sidebar club identity. */
html body .club-mini{min-height:76px!important;padding:12px 14px!important;gap:12px!important;align-items:center!important}
html body .club-mini .crest{width:56px!important;height:56px!important;min-width:56px!important;min-height:56px!important;max-width:56px!important;max-height:56px!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important;border-radius:12px!important;background-color:#f8fbf9}
html body .club-mini .crest img{width:100%!important;height:100%!important;object-fit:contain!important;display:block!important}
html body .club-mini b#sideClub{font-size:12px!important;line-height:1.25!important}
html body .club-mini .fm-club-meta{display:inline-block;margin-top:3px;color:#64748b!important;font-size:10px!important;line-height:1.3!important}
@media(max-width:820px){html body .club-mini{min-height:68px!important;padding:10px 12px!important}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.fm-value-flash{animation:none!important;transition:none!important}}
/* Keep the explicit deadline label, without forcing a large two-column block. */
html body .quick-deadline{display:block!important;text-align:center!important}
html body .quick-deadline b{font-size:16px!important;line-height:1.2!important;color:#8c5d17!important;font-variant-numeric:tabular-nums}

/* V170 — dense training + unified infrastructure progress + lighter rating typography. */
/* Player OVR/potential circles: keep the color coding, remove the heavy bold number. */
html body .rating-circle,
html body .rating-box{
  font-weight:500!important;
}

/* Attribute geometry belongs to each page. Do not globally compress training/player profiles. */
html body .attrs-area .mini-bar{height:11px!important}
html body .attrs-area .up-btn.active:hover{
  background:linear-gradient(135deg,#96d3ab,#e8f6ed)!important;
  transform:none!important;
}
/* Important-training chips should be light, not dark green. */
html body .tip-item.very-important{
  background:linear-gradient(135deg,#f0faf4,#fff)!important;
  border-color:#acd9bc!important;
  box-shadow:inset 3px 0 0 #86cda0!important;
}
html body .tip-item.very-important b{
  background:#dff3e7!important;
  border:1px solid #b8dec6!important;
  color:#17633b!important;
  font-weight:600!important;
}

/* One progress language for Stadium / Club base / Youth base. */
html body .level-dots,
html body .level-bar{
  display:grid!important;
  grid-template-columns:repeat(10,minmax(0,1fr))!important;
  gap:4px!important;
  width:100%!important;
  align-items:center!important;
}
html body .level-dots .dot,
html body .level-bar .segment{
  width:auto!important;
  min-width:0!important;
  height:9px!important;
  border-radius:999px!important;
  background:#e3e9e5!important;
  border:0!important;
  box-shadow:inset 0 0 0 1px rgba(18,62,35,.035)!important;
  transition:filter .15s ease,transform .15s ease!important;
}
/* Smooth red → amber → lime → green transition. Each segment itself blends into the next. */
html body .level-dots .dot:nth-child(1):not(.next),html body .level-bar .segment:nth-child(1):not(:empty){background:linear-gradient(90deg,#df5a55,#e56550)!important}
html body .level-dots .dot:nth-child(2):not(.next),html body .level-bar .segment:nth-child(2):not(:empty){background:linear-gradient(90deg,#e56550,#e97749)!important}
html body .level-dots .dot:nth-child(3):not(.next),html body .level-bar .segment:nth-child(3):not(:empty){background:linear-gradient(90deg,#e97749,#e88f43)!important}
html body .level-dots .dot:nth-child(4):not(.next),html body .level-bar .segment:nth-child(4):not(:empty){background:linear-gradient(90deg,#e88f43,#dda943)!important}
html body .level-dots .dot:nth-child(5):not(.next),html body .level-bar .segment:nth-child(5):not(:empty){background:linear-gradient(90deg,#dda943,#c9bd4d)!important}
html body .level-dots .dot:nth-child(6):not(.next),html body .level-bar .segment:nth-child(6):not(:empty){background:linear-gradient(90deg,#c9bd4d,#a9c963)!important}
html body .level-dots .dot:nth-child(7):not(.next),html body .level-bar .segment:nth-child(7):not(:empty){background:linear-gradient(90deg,#a9c963,#86ce78)!important}
html body .level-dots .dot:nth-child(8):not(.next),html body .level-bar .segment:nth-child(8):not(:empty){background:linear-gradient(90deg,#86ce78,#66c789)!important}
html body .level-dots .dot:nth-child(9):not(.next),html body .level-bar .segment:nth-child(9):not(:empty){background:linear-gradient(90deg,#66c789,#48b985)!important}
html body .level-dots .dot:nth-child(10):not(.next),html body .level-bar .segment:nth-child(10):not(:empty){background:linear-gradient(90deg,#48b985,#2fa66f)!important}
/* Legacy classes identify whether a segment is filled. Empty segments have no level class. */
html body .level-dots .dot:not(.red):not(.orange):not(.yellow):not(.light):not(.green):not(.next),
html body .level-bar .segment:not(.seg-red):not(.seg-orange):not(.seg-yellow):not(.seg-light):not(.seg-green){background:#e3e9e5!important}
html body .level-dots .dot.next{
  background:linear-gradient(90deg,#eef6ef,#dceee2)!important;
  outline:1px dashed #9bc7aa!important;
  outline-offset:-1px!important;
}

/* Stadium history navigation: compact, symmetrical controls instead of stretched generic buttons. */
html body .stadium-history-controls{
  grid-template-columns:34px minmax(0,1fr) 34px!important;
  gap:8px!important;
}
html body button.stadium-history-arrow{
  width:34px!important;min-width:34px!important;
  height:34px!important;min-height:34px!important;
  padding:0!important;border-radius:10px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  background:#f7fbf8!important;border:1px solid #b9d9c5!important;
  color:#17633b!important;font-size:18px!important;font-weight:500!important;line-height:1!important;
}
html body button.stadium-history-arrow:hover:not(:disabled){background:#edf7f1!important;border-color:#9ecfb0!important}
html body button.stadium-history-arrow:disabled{background:#f1f4f2!important;border-color:#dce6e0!important;color:#a5b0aa!important;opacity:1!important}
html body .stadium-history-center{min-height:34px!important;padding:5px 10px!important}
html body .stadium-history-dots{gap:5px!important;margin:7px 0 2px!important}
html body .stadium-history-dot{width:8px!important;min-width:8px!important;height:8px!important;min-height:8px!important;background:#d9e6dd!important}
html body .stadium-history-dot.unlocked{background:#92cfaa!important}
html body .stadium-history-dot.active{width:20px!important;background:#65bd87!important}
html body .stadium-history-dot.elite{background:#65bd87!important}
/* V170 gradient fix: apply each step only when legacy logic marks it as filled. */
html body .level-dots .dot:nth-child(1),html body .level-bar .segment:nth-child(1){--fm-step:linear-gradient(90deg,#df5a55,#e56550)}
html body .level-dots .dot:nth-child(2),html body .level-bar .segment:nth-child(2){--fm-step:linear-gradient(90deg,#e56550,#e97749)}
html body .level-dots .dot:nth-child(3),html body .level-bar .segment:nth-child(3){--fm-step:linear-gradient(90deg,#e97749,#e88f43)}
html body .level-dots .dot:nth-child(4),html body .level-bar .segment:nth-child(4){--fm-step:linear-gradient(90deg,#e88f43,#dda943)}
html body .level-dots .dot:nth-child(5),html body .level-bar .segment:nth-child(5){--fm-step:linear-gradient(90deg,#dda943,#c9bd4d)}
html body .level-dots .dot:nth-child(6),html body .level-bar .segment:nth-child(6){--fm-step:linear-gradient(90deg,#c9bd4d,#a9c963)}
html body .level-dots .dot:nth-child(7),html body .level-bar .segment:nth-child(7){--fm-step:linear-gradient(90deg,#a9c963,#86ce78)}
html body .level-dots .dot:nth-child(8),html body .level-bar .segment:nth-child(8){--fm-step:linear-gradient(90deg,#86ce78,#66c789)}
html body .level-dots .dot:nth-child(9),html body .level-bar .segment:nth-child(9){--fm-step:linear-gradient(90deg,#66c789,#48b985)}
html body .level-dots .dot:nth-child(10),html body .level-bar .segment:nth-child(10){--fm-step:linear-gradient(90deg,#48b985,#2fa66f)}
html body .level-dots .dot.red,html body .level-dots .dot.orange,html body .level-dots .dot.yellow,html body .level-dots .dot.light,html body .level-dots .dot.green,
html body .level-bar .segment.seg-red,html body .level-bar .segment.seg-orange,html body .level-bar .segment.seg-yellow,html body .level-bar .segment.seg-light,html body .level-bar .segment.seg-green{background:var(--fm-step)!important}


/* V173 — compact tactics controls, tournament visuals, XP emphasis */
html body .squad-table .move-btn{
  width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;
  padding:0!important;border-radius:4px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
  font-size:8px!important;line-height:1!important;border:1px solid rgba(15,163,68,.25)!important;
  background:rgba(15,163,68,.08)!important;color:#075f31!important;box-shadow:none!important;
}
#quickNextCard:before{height:1px!important;}
#quickNextCard .green-btn,#currentTourSync .champ-v96-lineup-button{font-weight:500!important;}
.tour-art{min-height:148px!important;overflow:hidden!important;background:#eef7f2!important;}
.tour-art .tour-cup-image{width:100%!important;height:148px!important;object-fit:cover!important;object-position:center 42%!important;display:block!important;}
.tour-card.points .tour-art{background:#fff7d6!important;}
.tour-title{color:#173f2b!important;font-weight:600!important;}
.xp-box{position:relative!important;overflow:hidden!important;background:linear-gradient(135deg,#f4ebff 0%,#ffffff 68%)!important;border:1px solid #d9c2ff!important;box-shadow:0 5px 14px rgba(124,58,237,.10)!important;padding:9px 12px!important;min-height:64px!important;}
.xp-box:before{content:"★";position:absolute;right:10px;top:5px;color:rgba(124,58,237,.13)!important;font-size:34px!important;line-height:1!important;}
.xp-box>span{color:#5b21b6!important;font-weight:600!important;letter-spacing:.01em!important;}
.xp-box #xpValue{display:block!important;color:#5b21b6!important;font-size:17px!important;font-weight:600!important;margin-top:2px!important;}
.xp-box .next-rating{color:#5f6472!important;margin-top:5px!important;}
.xp-box .next-bar{height:6px!important;background:#e6e8ef!important;}
.xp-box .next-fill{background:linear-gradient(90deg,#7c3aed,#a78bfa,#22c55e)!important;}

/* V174 — restore the user-approved attribute geometry without cross-page leakage. */
html body.training-page .attrs-area{gap:10px!important}
html body.training-page .attrs-area .attr-title{padding:6px 8px!important;line-height:normal!important}
html body.training-page .attrs-area .attr-row{
  min-height:22px!important;padding:2px 7px!important;gap:5px!important;
  grid-template-columns:1fr 96px 25px 20px!important;line-height:normal!important;
}
html body.training-page .attrs-area .mini-bar{height:11px!important}
html body.training-page .attrs-area .up-btn,
html body.training-page .attrs-area .up-btn.active{
  width:18px!important;min-width:18px!important;height:18px!important;min-height:18px!important;
  padding:0!important;border-radius:5px!important;font-size:10px!important;line-height:18px!important;
}
html body.player-page .attrs-area{gap:10px!important}
html body.player-page .attrs-area .attr-title{padding:6px 8px!important;line-height:normal!important}
html body.player-page .attrs-area .attr-row{
  min-height:22px!important;padding:2px 7px!important;gap:5px!important;
  grid-template-columns:1fr 82px 25px!important;line-height:normal!important;
}
html body.player-page .attrs-area .mini-bar{height:11px!important}
html body .club-mini .fm-club-meta{white-space:nowrap}
html body .club-mini .fm-country-flag{
  display:inline-block!important;
  width:20px!important;
  height:13px!important;
  flex:0 0 20px!important;
  border-radius:2px!important;
  border:1px solid rgba(15,23,42,.14)!important;
  box-shadow:0 1px 2px rgba(15,23,42,.08)!important;
  vertical-align:-2px!important;
  background:linear-gradient(to bottom,#0057b7 0 50%,#ffd700 50% 100%)!important;
  font-size:0!important;
  line-height:0!important;
}
html body .club-mini .fm-country-flag::before,
html body .club-mini .fm-country-flag::after{content:none!important}


/* V186: same highlighted infrastructure title badge on Stadium, Club Base and Youth Base. */
.upgrade-top h3,
.upgrade-top > div > b{
    display:inline-flex!important;
    align-items:center;
    width:auto!important;
    max-width:100%;
    margin:0 0 8px!important;
    padding:6px 10px!important;
    border:1px solid #9ed8b5!important;
    border-radius:10px!important;
    background:linear-gradient(135deg,#e8f8ef 0%,#f8fffb 100%)!important;
    color:#075c32!important;
    font-size:14px!important;
    line-height:1.15!important;
    font-weight:750!important;
    letter-spacing:.01em;
    box-shadow:0 3px 10px rgba(15,118,70,.08);
}
.upgrade-top p{margin-top:0!important}

#spendPanel .shop-card{
    padding:0 14px 14px!important;
    overflow:hidden;
    border-radius:16px!important;
    background:#f8fbff!important;
}
#spendPanel .shop-card.special{
    background:
        radial-gradient(circle at 90% 10%,rgba(255,211,77,.18),transparent 30%),
        #fffdf5!important;
}
#spendPanel .shop-photo{
    height:178px;
    margin:0 -14px 14px;
    overflow:hidden;
    background:#dfe7ee;
    border-bottom:1px solid rgba(148,163,184,.25);
}
#spendPanel .shop-photo img{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center;
    transition:transform .32s ease,filter .32s ease;
}
#spendPanel .shop-card:hover .shop-photo img{
    transform:scale(1.035);
    filter:saturate(1.05) contrast(1.02);
}
#spendPanel .shop-card>b{
    display:inline-flex!important;
    align-items:center;
    width:auto!important;
    max-width:100%;
    color:#0f3f2b!important;
    font-size:15px!important;
    line-height:1.15;
    margin:0 0 9px!important;
    padding:7px 11px;
    border:1px solid #a9d9bb;
    border-radius:10px;
    background:linear-gradient(135deg,#e8f8ef,#f8fffb);
    box-shadow:0 3px 10px rgba(15,118,70,.08);
}
#spendPanel .spend-vip-card>b{
    color:#6b4b00!important;
    border-color:#ecd47c;
    background:linear-gradient(135deg,#fff5c7,#fffdf1);
}
#spendPanel .spend-wonderkid-card>b{
    color:#5b3ba0!important;
    border-color:#c9b9f8;
    background:linear-gradient(135deg,#eee8ff,#faf8ff);
}
#spendPanel .spend-restore-card>b{
    color:#14538a!important;
    border-color:#acd1f4;
    background:linear-gradient(135deg,#e8f4ff,#f7fbff);
}
#spendPanel .shop-card p{
    font-size:12px!important;
    line-height:1.48!important;
    min-height:36px;
}
@media(max-width:850px){#spendPanel .shop-photo{height:158px}}
@media(max-width:560px){#spendPanel .shop-photo{height:148px}}
