/* v12.7 rebase: additive UI only; the v11.6 layout remains the foundation. */
body.ctp-v127 .ctp-app-dashboard{font-size:16px}
body.ctp-v127 .ctp-dash-brand h2{font-size:19px!important}body.ctp-v127 .ctp-dash-brand small{font-size:11px!important}
body.ctp-v127 .ctp-dash-hero h1{font-size:24px!important}body.ctp-v127 .ctp-dash-hero p{font-size:13px!important;line-height:1.9!important}
body.ctp-v127 .ctp-dash-card b{font-size:14px!important}body.ctp-v127 .ctp-dash-card small{font-size:10px!important;line-height:1.7!important}
body.ctp-v127 .ctp-dash-stat strong{font-size:21px!important}body.ctp-v127 .ctp-dash-stat small{font-size:10px!important}
body.ctp-v127 .ctp-rank-name b{font-size:15px!important}body.ctp-v127 .ctp-rank-name small,body.ctp-v127 .ctp-rank-total{font-size:10px!important}
body.ctp-v127 .ctp-missions h3,body.ctp-v127 .ctp-section-title{font-size:15px!important}body.ctp-v127 .ctp-mission-text b{font-size:12px!important}body.ctp-v127 .ctp-mission-text small{font-size:9px!important}
body.ctp-v127 .ctp-profile-main b{font-size:16px!important}body.ctp-v127 .ctp-profile-main small{font-size:11px!important}body.ctp-v127 .ctp-account-state{font-size:11px!important}
body.ctp-v127 .ctp-mini-btn{font-size:11px!important;padding:11px 7px!important}body.ctp-v127 .ctp-app-nav-item{font-size:10px!important}
body.ctp-v127 .ctp-featured-info b{font-size:11px!important}body.ctp-v127 .ctp-featured-info small{font-size:9px!important}body.ctp-v127 .ctp-featured-score{font-size:11px!important}
.ctp-v127-card{margin-top:13px;padding:15px;background:linear-gradient(145deg,rgba(15,23,42,.96),rgba(2,6,23,.92));border:1px solid #334155;border-radius:18px;color:#fff}
.ctp-v127-card h3{margin:0;color:#fff;font-size:15px}.ctp-v127-head{display:flex;align-items:end;justify-content:space-between;gap:8px;margin-bottom:11px}.ctp-v127-head small{color:#94a3b8;font-size:9px}
.ctp-v127-stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:11px}.ctp-v127-stats-grid>div{padding:10px 6px;background:#020617;border:1px solid #1e293b;border-radius:11px;text-align:center}.ctp-v127-stats-grid span{display:block;font-size:18px}.ctp-v127-stats-grid small{display:block;margin:4px 0;color:#94a3b8;font-size:8.5px}.ctp-v127-stats-grid b{display:block;color:#fde68a;font-size:15px}
.ctp-v127-mission-list{display:grid;gap:7px}.ctp-v127-mission{display:grid;grid-template-columns:36px 1fr 20px;gap:8px;align-items:center;padding:10px;background:rgba(2,6,23,.68);border:1px solid #334155;border-radius:12px}.ctp-v127-mission.done{border-color:#166534;background:rgba(22,101,52,.14)}.ctp-v127-mission>.ico{display:grid;width:34px;height:34px;place-items:center;background:#172033;border-radius:10px;font-size:18px}.ctp-v127-mission .copy b{display:block;color:#fff;font-size:11px}.ctp-v127-mission .copy b em{margin-right:5px;padding:2px 5px;color:#bae6fd;background:#075985;border-radius:999px;font:normal 700 7px Tahoma}.ctp-v127-mission .copy small{display:block;margin-top:3px;color:#94a3b8;font-size:8px;line-height:1.7}.ctp-v127-mission .copy>i{display:block;height:5px;margin:6px 0 2px;overflow:hidden;background:#111827;border-radius:99px}.ctp-v127-mission .copy>i u{display:block;height:100%;background:linear-gradient(90deg,#38bdf8,#facc15);border-radius:inherit;text-decoration:none}.ctp-v127-mission>strong{color:#86efac;font-size:16px}
.ctp-v127-bot-progress{display:flex;justify-content:space-between;gap:8px;margin:9px 0 11px;color:#cbd5e1;font-size:9px}.ctp-v127-bots-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.ctp-v127-bot{min-width:0;padding:10px 5px;color:#fff;background:#0f172a;border:1px solid #334155;border-radius:12px;font-family:Tahoma;cursor:pointer}.ctp-v127-bot span{display:block;font-size:22px}.ctp-v127-bot b{display:block;overflow:hidden;margin:4px 0;color:#fff;font-size:9px;white-space:nowrap;text-overflow:ellipsis}.ctp-v127-bot small{display:block;color:#7dd3fc;font-size:8px}.ctp-v127-bot em{display:block;margin-top:5px;color:#fde68a;font:normal 700 7px Tahoma}.ctp-v127-bot.locked{opacity:.35;filter:grayscale(1);cursor:not-allowed}.ctp-v127-bot.active{border-color:#38bdf8;box-shadow:0 0 0 2px rgba(56,189,248,.12)}.ctp-v127-bot.defeated{border-color:#166534;background:rgba(22,101,52,.18)}.ctp-v127-bot.final{background:linear-gradient(145deg,#422006,#09090b);border-color:#facc15;box-shadow:0 0 18px rgba(250,204,21,.15)}
.ctp-v127-role-pill{display:inline-flex;align-items:center;gap:5px;width:max-content;margin-top:5px;padding:4px 8px 4px 5px;color:#fff;background:linear-gradient(135deg,#0f766e,#1d4ed8);border:1px solid rgba(255,255,255,.45);border-radius:10px 18px 18px 10px;box-shadow:inset 0 1px 1px rgba(255,255,255,.25),0 4px 10px rgba(37,99,235,.18);font-size:7px}.ctp-v127-role-pill>i{display:grid;width:22px;height:22px;place-items:center;color:#fff7c2;background:rgba(2,6,23,.48);border:1px solid rgba(255,255,255,.5);border-radius:7px;font:900 15px Georgia}.ctp-v127-role-pill>span{display:grid;gap:1px}.ctp-v127-role-pill b{font-size:8px!important;line-height:1.2}.ctp-v127-role-pill small{color:rgba(255,255,255,.72)!important;font-size:6px!important;line-height:1.2}
.ctp-v127-profile-link{cursor:pointer!important;outline:none}.ctp-v127-profile-link:hover,.ctp-v127-profile-link:focus{box-shadow:0 0 0 2px rgba(56,189,248,.35)!important}
.ctp-v127-report .big{font-size:46px;text-align:center}.ctp-v127-report .grid{display:grid;grid-template-columns:repeat(2,1fr);gap:7px;margin:12px 0}.ctp-v127-report .grid>div{padding:9px;background:#020617;border-radius:10px}.ctp-v127-report .grid small{display:block;color:#94a3b8;font-size:8px}.ctp-v127-report .grid b{display:block;margin-top:4px;color:#fff;font-size:12px}.ctp-v127-report .grid b.up{color:#86efac}.ctp-v127-report .grid b.down{color:#fca5a5}
@media(max-width:430px){.ctp-v127-stats-grid{grid-template-columns:repeat(2,1fr)}.ctp-v127-bots-grid{grid-template-columns:repeat(2,1fr)}body.ctp-v127 .ctp-mini-actions{flex-wrap:wrap}body.ctp-v127 .ctp-mini-btn{min-width:46%}}


/* v12.7: preserve the original Royal/Role badge visual language everywhere. */
.ctp-v127-identities{display:flex;flex-wrap:wrap;align-items:center;gap:5px;margin-top:6px}.ctp-v127-identities .ctp-public-badge,.ctp-v127-identities .ctp-member-badge{position:relative!important;display:inline-flex!important;margin:0!important;transform:none!important}.ctp-v127-inline-public{min-height:31px!important;padding:4px 9px!important;font-size:10px!important}.ctp-v127-inline-public .ctp-badge-piece{font-size:17px!important}.ctp-v127-inline-role{min-height:36px!important;padding:4px 9px 4px 5px!important}.ctp-v127-inline-role .ctp-role-piece{width:28px!important;height:28px!important;flex:0 0 28px!important;font-size:19px!important}.ctp-v127-inline-role .ctp-role-label{font-size:10px!important}.ctp-v127-inline-role .ctp-role-kicker{font-size:8px!important}.ctp-v127-cup-identities{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px}.ctp-v127-cup-identities .ctp-member-badge,.ctp-v127-cup-identities .ctp-public-badge{display:inline-flex!important;margin:0!important}.ctp-v127-profile-link{cursor:pointer!important}.ctp-v127-profile-link:focus,.ctp-v127-profile-link:hover{outline:none!important;box-shadow:0 0 0 2px rgba(56,189,248,.32)!important}
.ctp-v127-mission{width:100%;border:1px solid #334155;font-family:Tahoma;direction:rtl;text-align:right;cursor:pointer}.ctp-v127-mission:hover,.ctp-v127-mission:focus{border-color:#38bdf8;transform:translateY(-1px);outline:none}.ctp-v127-focus{animation:ctpV127Focus 1.4s ease}@keyframes ctpV127Focus{0%,100%{box-shadow:none}40%{box-shadow:0 0 0 3px rgba(250,204,21,.35),0 0 28px rgba(250,204,21,.2)}}
.ctp-province-row.is-empty{opacity:.68}.ctp-province-row.is-empty strong{color:#64748b!important}.ctp-province-row.is-empty small:after{content:' • هنوز امتیازی ثبت نشده';color:#64748b}
.ctp-v127-wheel-preview{display:grid;grid-template-columns:repeat(2,1fr);gap:6px;margin:12px 0}.ctp-v127-wheel-preview>span{display:flex;align-items:center;justify-content:space-between;gap:4px;padding:7px 8px;color:#e2e8f0;background:#111827;border:1px solid #334155;border-radius:9px;font-size:10px}.ctp-v127-wheel-preview span.epic{border-color:#7c3aed;background:rgba(76,29,149,.24)}.ctp-v127-wheel-preview span.legend{border-color:#f59e0b;background:rgba(120,53,15,.26);box-shadow:0 0 12px rgba(245,158,11,.12)}.ctp-v127-wheel-preview small{color:#94a3b8;font-size:8px}.ctp-v127-wheel-history{margin:9px 0;padding:9px;background:rgba(2,6,23,.55);border:1px solid #334155;border-radius:10px}.ctp-v127-wheel-history>b{display:block;margin-bottom:6px;color:#fde68a;font-size:11px}.ctp-v127-wheel-history #ctp-v127-wheel-history-list{display:grid;gap:4px}.ctp-v127-wheel-history #ctp-v127-wheel-history-list>span{display:flex;justify-content:space-between;color:#cbd5e1;font-size:10px}.ctp-v127-wheel-history small{color:#64748b}.ctp-v127-rarity{display:inline-block;margin-right:5px;padding:2px 6px;color:#fef3c7;background:#78350f;border-radius:999px;font-size:10px}
@media(max-width:430px){.ctp-v127-identities{gap:4px}.ctp-v127-inline-public{font-size:9px!important;padding:4px 8px!important}.ctp-v127-inline-role{min-height:33px!important;padding:3px 7px 3px 4px!important}.ctp-v127-inline-role .ctp-role-piece{width:25px!important;height:25px!important;flex-basis:25px!important;font-size:17px!important}.ctp-v127-wheel-preview{grid-template-columns:1fr}}

/* v12.7.2 — real 8-segment wheel + always-visible royal identities */
#ctp-wheel.ctp-v127-wheel{width:236px;height:236px;border-width:9px;background:conic-gradient(#ef4444 0 45deg,#f59e0b 45deg 90deg,#10b981 90deg 135deg,#0ea5e9 135deg 180deg,#6366f1 180deg 225deg,#8b5cf6 225deg 270deg,#d946ef 270deg 315deg,#eab308 315deg 360deg);box-shadow:0 0 34px rgba(250,204,21,.26),inset 0 0 22px rgba(0,0,0,.35)}
#ctp-wheel.ctp-v127-wheel .ctp-wheel-center{inset:76px;font-size:36px;box-shadow:0 0 0 6px rgba(15,23,42,.35)}
#ctp-wheel.ctp-v127-wheel .ctp-v127-wheel-seg{width:54px;margin:-18px 0 0 -27px;font-size:11px;line-height:1.08;white-space:nowrap;text-shadow:0 2px 5px rgba(0,0,0,.9)}
#ctp-wheel.ctp-v127-wheel .ctp-v127-wheel-seg b{display:block;font-size:12px;font-weight:950}#ctp-wheel.ctp-v127-wheel .ctp-v127-wheel-seg small{display:block;margin-top:2px;font-size:6.5px;font-weight:800;opacity:.92}
#ctp-wheel.ctp-v127-wheel .ctp-v127-wheel-seg:nth-of-type(1){transform:rotate(22.5deg) translateY(-88px) rotate(-22.5deg)}
#ctp-wheel.ctp-v127-wheel .ctp-v127-wheel-seg:nth-of-type(2){transform:rotate(67.5deg) translateY(-88px) rotate(-67.5deg)}
#ctp-wheel.ctp-v127-wheel .ctp-v127-wheel-seg:nth-of-type(3){transform:rotate(112.5deg) translateY(-88px) rotate(-112.5deg)}
#ctp-wheel.ctp-v127-wheel .ctp-v127-wheel-seg:nth-of-type(4){transform:rotate(157.5deg) translateY(-88px) rotate(-157.5deg)}
#ctp-wheel.ctp-v127-wheel .ctp-v127-wheel-seg:nth-of-type(5){transform:rotate(202.5deg) translateY(-88px) rotate(-202.5deg)}
#ctp-wheel.ctp-v127-wheel .ctp-v127-wheel-seg:nth-of-type(6){transform:rotate(247.5deg) translateY(-88px) rotate(-247.5deg)}
#ctp-wheel.ctp-v127-wheel .ctp-v127-wheel-seg:nth-of-type(7){transform:rotate(292.5deg) translateY(-88px) rotate(-292.5deg)}
#ctp-wheel.ctp-v127-wheel .ctp-v127-wheel-seg:nth-of-type(8){transform:rotate(337.5deg) translateY(-88px) rotate(-337.5deg)}
.ctp-v127-identities,.ctp-v127-cup-identities{width:100%;align-items:center}.ctp-v127-cup-identities{margin-right:0!important}
.ctp-v127-identities .ctp-public-badge,.ctp-v127-cup-identities .ctp-public-badge{box-shadow:0 6px 18px rgba(245,158,11,.18)!important}.ctp-v127-identities .ctp-member-badge,.ctp-v127-cup-identities .ctp-member-badge{box-shadow:0 7px 20px rgba(15,23,42,.22)!important}
@media(max-width:430px){#ctp-wheel.ctp-v127-wheel{width:218px;height:218px}#ctp-wheel.ctp-v127-wheel .ctp-wheel-center{inset:70px}#ctp-wheel.ctp-v127-wheel .ctp-v127-wheel-seg{font-size:10px}#ctp-wheel.ctp-v127-wheel .ctp-v127-wheel-seg b{font-size:11px}}

/* v12.7.2 — stable bot chain + championship progress */
.ctp-v127-bot-progress{display:grid!important;grid-template-columns:1fr auto;align-items:center;gap:7px!important}.ctp-v127-bot-progress #ctp-v127-bot-stage{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:7px;width:100%}.ctp-v127-bot-progress #ctp-v127-bot-stage>span{font-weight:900;color:#fff}.ctp-v127-bot-progress #ctp-v127-bot-stage>small{color:#94a3b8;font-size:8px}.ctp-v127-bot-bar{display:block;height:7px;overflow:hidden;background:#111827;border:1px solid #334155;border-radius:999px}.ctp-v127-bot-bar u{display:block;height:100%;background:linear-gradient(90deg,#22c55e,#38bdf8,#facc15);border-radius:inherit;text-decoration:none;transition:width .35s ease}.ctp-v127-bot-milestones{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:0 0 10px}.ctp-v127-bot-milestones span{padding:6px 4px;color:#64748b;background:#0b1220;border:1px solid #263449;border-radius:9px;text-align:center;font-size:8px;font-weight:800}.ctp-v127-bot-milestones span.on{color:#fff7c2;background:linear-gradient(135deg,rgba(133,77,14,.42),rgba(15,23,42,.9));border-color:#d4a72c;box-shadow:0 0 14px rgba(250,204,21,.12)}
@media(max-width:430px){.ctp-v127-bot-progress{grid-template-columns:1fr}.ctp-v127-bot-progress #ctp-v127-bot-stage{grid-template-columns:auto 1fr}.ctp-v127-bot-progress #ctp-v127-bot-stage>small{grid-column:1/-1}.ctp-v127-bot-milestones span{font-size:7px}}
.ctp-v127-list-identities{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:5px;margin-top:5px}.ctp-v127-list-identities .ctp-v127-identities{margin-top:0}.ctp-v127-list-identities .ctp-public-badge,.ctp-v127-list-identities .ctp-member-badge{display:inline-flex!important;margin:0!important}

/* Featured badges — shared Royal identity component */
.ctp-featured-list .ctp-v127-identities{width:auto!important;display:flex!important;flex-wrap:wrap!important;gap:4px!important;margin-top:5px!important}
.ctp-featured-list .ctp-v127-identities .ctp-public-badge{display:none!important}
.ctp-featured-list .ctp-v127-identities .ctp-member-badge{width:auto!important;max-width:100%!important}
.ctp-featured-list .ctp-v127-identities .ctp-role-label{font-size:10px!important;font-weight:900!important}
.ctp-featured-list .ctp-v127-identities .ctp-role-kicker{font-size:7px!important}
.ctp-featured-list .ctp-featured-row:has(.ctp-public-badge.founder) .ctp-v127-identities .ctp-public-badge.founder{display:inline-flex!important}

/* Puzzle reward report styling */
.ctp-v127-puzzle-report .ctp-v127-puzzle-sub{margin:0 0 12px;color:#cbd5e1;font:800 11px Tahoma;text-align:center}.ctp-v127-puzzle-total{margin:12px 0;padding:10px 12px;color:#fde68a;background:rgba(2,6,23,.6);border:1px solid rgba(250,204,21,.25);border-radius:12px;text-align:center;font:800 10px Tahoma}.ctp-v127-puzzle-total b{color:#86efac}

/* Puzzle combo milestone + safe cup row overflow */
.ctp-v127-puzzle-milestone{margin:0 0 12px;padding:8px 10px;border-radius:999px;background:linear-gradient(90deg,rgba(245,158,11,.18),rgba(168,85,247,.17));border:1px solid rgba(250,204,21,.28);color:#fde68a;text-align:center;font:900 10px Tahoma,Arial,sans-serif}
#cup-leaders .cup-leader,#cup-leaders .cup-leader-row,#cup-leaders .leader-row,#cup-leaders .leader-item,#cup-leaders [data-player],#cup-leaders [data-name]{overflow:visible!important;height:auto!important;max-height:none!important}

/* v12.7.6 — Cup champions reuse EXACTLY the same identity component as Featured People. No compact clone, no clipping. */
#cup-leaders .ctp-v127-cup-identities{flex:0 0 100%!important;width:100%!important;max-width:100%!important;display:block!important;margin:7px 0 2px!important;padding:0!important;overflow:visible!important;box-sizing:border-box!important}
#cup-leaders .ctp-v127-cup-identities>.ctp-v127-identities{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:5px!important;width:auto!important;max-width:100%!important;margin-top:0!important;overflow:visible!important}
#cup-leaders .ctp-v127-cup-identities .ctp-public-badge,#cup-leaders .ctp-v127-cup-identities .ctp-member-badge{position:relative!important;display:inline-flex!important;margin:0!important;transform:none!important;overflow:visible!important}
#cup-leaders .cup-leader-row,#cup-leaders .cup-leader,#cup-leaders>div{overflow:visible!important;height:auto!important;min-height:0!important}

/* v12.7.7 — chessteachers cup identity: Founder + Cup Champion + Instructor, using the shared Featured People components. */
#cup-leaders .ctp-v127-cup-identities>.ctp-v127-identities{row-gap:6px!important;column-gap:6px!important;align-content:flex-start!important}#cup-leaders .ctp-v127-cup-identities .ctp-public-badge.founder,#cup-leaders .ctp-v127-cup-identities .ctp-public-badge.gold,#cup-leaders .ctp-v127-cup-identities .ctp-member-badge.instructor{max-width:100%!important;flex:0 0 auto!important;white-space:nowrap!important}
@media(max-width:430px){#cup-leaders .ctp-v127-cup-identities>.ctp-v127-identities{gap:5px!important}#cup-leaders .ctp-v127-cup-identities .ctp-public-badge,#cup-leaders .ctp-v127-cup-identities .ctp-member-badge{max-width:100%!important}}


/* v12.7.8 — FULL shared Royal badges inside Cup leaderboard.
   Markup remains the exact same identityHTML component as Featured People.
   These rules only neutralize clipping/text-hiding inherited from the cup leaderboard. */
#cup-leaders .ctp-v127-cup-identities,
#cup-leaders .ctp-v127-cup-identities > .ctp-v127-identities{
  width:100% !important;
  max-width:none !important;
  height:auto !important;
  min-height:0 !important;
  overflow:visible !important;
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:7px !important;
  white-space:normal !important;
  line-height:normal !important;
  position:relative !important;
  z-index:5 !important;
}

#cup-leaders .ctp-v127-cup-identities .ctp-public-badge,
#cup-leaders .ctp-v127-cup-identities .ctp-member-badge{
  display:inline-flex !important;
  visibility:visible !important;
  opacity:1 !important;
  width:auto !important;
  max-width:none !important;
  min-width:max-content !important;
  height:auto !important;
  min-height:31px !important;
  overflow:visible !important;
  white-space:nowrap !important;
  flex:0 0 auto !important;
  align-items:center !important;
  position:relative !important;
  transform:none !important;
  clip:auto !important;
  clip-path:none !important;
  text-indent:0 !important;
  font-size:10px !important;
  line-height:1.15 !important;
}

#cup-leaders .ctp-v127-cup-identities .ctp-public-badge.founder{
  padding:5px 11px !important;
  min-height:33px !important;
}

#cup-leaders .ctp-v127-cup-identities .ctp-badge-piece,
#cup-leaders .ctp-v127-cup-identities .ctp-badge-label,
#cup-leaders .ctp-v127-cup-identities .ctp-badge-check,
#cup-leaders .ctp-v127-cup-identities .ctp-role-piece,
#cup-leaders .ctp-v127-cup-identities .ctp-role-copy,
#cup-leaders .ctp-v127-cup-identities .ctp-role-label,
#cup-leaders .ctp-v127-cup-identities .ctp-role-kicker,
#cup-leaders .ctp-v127-cup-identities .ctp-role-state{
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;
  width:auto !important;
  max-width:none !important;
  height:auto !important;
  max-height:none !important;
  overflow:visible !important;
  white-space:nowrap !important;
  text-indent:0 !important;
  clip:auto !important;
  clip-path:none !important;
  position:relative !important;
}

#cup-leaders .ctp-v127-cup-identities .ctp-role-copy{
  display:grid !important;
  min-width:68px !important;
  gap:2px !important;
}
#cup-leaders .ctp-v127-cup-identities .ctp-role-piece{
  display:grid !important;
  width:28px !important;
  height:28px !important;
  flex:0 0 28px !important;
}
#cup-leaders .ctp-v127-cup-identities .ctp-badge-check,
#cup-leaders .ctp-v127-cup-identities .ctp-role-state{
  display:grid !important;
}
#cup-leaders .ctp-v127-cup-identities .ctp-badge-label{
  font-size:10px !important;
  font-weight:950 !important;
}
#cup-leaders .ctp-v127-cup-identities .ctp-role-label{
  font-size:10px !important;
}
#cup-leaders .ctp-v127-cup-identities .ctp-role-kicker{
  font-size:8px !important;
}

/* Cup row parents must never crop the shared Royal component. */
#cup-leaders,
#cup-leaders > *,
#cup-leaders .cup-leader,
#cup-leaders .cup-leader-row,
#cup-leaders .leader-row,
#cup-leaders .leader-item,
#cup-leaders [data-player],
#cup-leaders [data-name]{
  overflow:visible !important;
  height:auto !important;
  max-height:none !important;
}

@media(max-width:430px){
  #cup-leaders .ctp-v127-cup-identities,
  #cup-leaders .ctp-v127-cup-identities > .ctp-v127-identities{gap:6px !important}
  #cup-leaders .ctp-v127-cup-identities .ctp-public-badge,
  #cup-leaders .ctp-v127-cup-identities .ctp-member-badge{
    max-width:100% !important;
    min-width:0 !important;
  }
  #cup-leaders .ctp-v127-cup-identities .ctp-role-copy{min-width:62px !important}
  #cup-leaders .ctp-v127-cup-identities .ctp-badge-label,
  #cup-leaders .ctp-v127-cup-identities .ctp-role-label{font-size:9px !important}
  #cup-leaders .ctp-v127-cup-identities .ctp-role-kicker{font-size:7px !important}
}

/* v13.16.2 — contained Cup identities + safe panel press feedback. */
#cup-leaders .ctp-native-cup-row{overflow:hidden!important;height:auto!important;grid-template-columns:34px minmax(0,1fr) auto!important}
#cup-leaders .ctp-native-cup-row .ctp-cup-name{display:block!important;min-width:0!important;overflow:visible!important}
#cup-leaders .ctp-native-cup-row .ctp-v127-cup-identities{display:block!important;width:100%!important;margin:6px 0 0!important;padding:0!important;overflow:visible!important}
#cup-leaders .ctp-native-cup-row .ctp-v127-identities{display:flex!important;flex-wrap:wrap!important;gap:5px!important;align-items:center!important;max-width:100%!important}
#cup-leaders .ctp-native-cup-row .ctp-public-badge,#cup-leaders .ctp-native-cup-row .ctp-member-badge{position:relative!important;inset:auto!important;transform:none!important;margin:0!important;max-width:100%!important}
.ctp-v127 .ctp-universal-press-hit{animation:ctpUniversalPressV13162 .36s cubic-bezier(.2,.8,.2,1)!important}
.ctp-v127 .ctp-universal-ripple{position:fixed!important;z-index:999999!important;width:14px!important;height:14px!important;margin:0!important;padding:0!important;border:0!important;border-radius:50%!important;pointer-events:none!important;background:rgba(255,255,255,.34)!important;box-shadow:0 0 18px rgba(125,211,252,.28)!important;transform:translate(-50%,-50%) scale(.25);animation:ctpUniversalRippleV13162 .54s ease-out forwards!important}
@keyframes ctpUniversalPressV13162{0%{scale:1;filter:brightness(1)}35%{scale:.965;filter:brightness(1.13)}70%{scale:1.015;filter:brightness(1.06)}100%{scale:1;filter:brightness(1)}}
@keyframes ctpUniversalRippleV13162{0%{opacity:.78;transform:translate(-50%,-50%) scale(.25)}100%{opacity:0;transform:translate(-50%,-50%) scale(8)}}
@media(max-width:430px){#cup-leaders .ctp-native-cup-row{grid-template-columns:30px minmax(0,1fr) auto!important}#cup-leaders .ctp-native-cup-row .ctp-v127-identities{gap:4px!important}}
@media(prefers-reduced-motion:reduce){.ctp-v127 .ctp-universal-press-hit{animation-duration:.12s!important}.ctp-v127 .ctp-universal-ripple{animation-duration:.18s!important}}


/* v13.16.3 — Cup champions stay inside their own cards. Only structured champion rows are rendered. */
#cup-leaders{width:100%!important;max-width:100%!important;overflow:hidden!important;box-sizing:border-box!important}
#cup-leaders .ctp-native-cup-row{
  width:100%!important;max-width:100%!important;min-width:0!important;
  display:grid!important;grid-template-columns:38px minmax(0,1fr) auto!important;
  align-items:start!important;gap:10px!important;padding:12px!important;
  overflow:hidden!important;box-sizing:border-box!important;
}
#cup-leaders .ctp-native-cup-row .ctp-cup-rank,#cup-leaders .ctp-native-cup-row .ctp-cup-rating{min-width:0!important;white-space:nowrap!important}
#cup-leaders .ctp-native-cup-row .ctp-cup-name{min-width:0!important;max-width:100%!important;overflow:hidden!important}
#cup-leaders .ctp-native-cup-row .ctp-cup-name>b,#cup-leaders .ctp-native-cup-row .ctp-cup-name>small{display:block!important;max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
#cup-leaders .ctp-native-cup-row .ctp-v127-cup-identities,
#cup-leaders .ctp-native-cup-row .ctp-v127-cup-identities>.ctp-v127-identities{
  width:100%!important;max-width:100%!important;min-width:0!important;
  overflow:hidden!important;display:flex!important;flex-wrap:wrap!important;
  align-items:center!important;gap:5px!important;box-sizing:border-box!important;
}
#cup-leaders .ctp-native-cup-row .ctp-v127-cup-identities .ctp-public-badge,
#cup-leaders .ctp-native-cup-row .ctp-v127-cup-identities .ctp-member-badge{
  max-width:100%!important;min-width:0!important;overflow:hidden!important;
  flex:0 1 auto!important;white-space:nowrap!important;box-sizing:border-box!important;
}
#cup-leaders .ctp-native-cup-row .ctp-v127-cup-identities .ctp-badge-label,
#cup-leaders .ctp-native-cup-row .ctp-v127-cup-identities .ctp-role-copy{
  min-width:0!important;max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;
}
@media(max-width:560px){
  #cup-leaders .ctp-native-cup-row{grid-template-columns:32px minmax(0,1fr)!important;gap:8px!important;padding:10px!important}
  #cup-leaders .ctp-native-cup-row .ctp-cup-rating{grid-column:2!important;justify-self:start!important;margin-top:4px!important}
  #cup-leaders .ctp-native-cup-row .ctp-v127-cup-identities .ctp-public-badge,
  #cup-leaders .ctp-native-cup-row .ctp-v127-cup-identities .ctp-member-badge{font-size:9px!important}
}


/* v13.16.5 — restore the compact, contained Cup-v7 leaderboard geometry. */
#cup-leaders{
  width:100%!important;max-width:100%!important;overflow:hidden!important;box-sizing:border-box!important;
}
#cup-leaders .ctp-cup-v7-row{
  width:100%!important;max-width:100%!important;min-width:0!important;
  display:grid!important;grid-template-columns:35px minmax(0,1fr) 72px 78px!important;
  gap:6px!important;align-items:center!important;margin:6px 0!important;padding:9px!important;
  overflow:hidden!important;box-sizing:border-box!important;border-radius:10px!important;
}
#cup-leaders .ctp-cup-v7-row .ctp-cup-rank,
#cup-leaders .ctp-cup-v7-row .ctp-cup-points,
#cup-leaders .ctp-cup-v7-row .ctp-cup-wins{white-space:nowrap!important;min-width:0!important}
#cup-leaders .ctp-cup-v7-row .ctp-cup-name{display:block!important;min-width:0!important;max-width:100%!important;overflow:hidden!important}
#cup-leaders .ctp-cup-v7-row .ctp-cup-name>b{display:block!important;min-width:0!important;max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
#cup-leaders .ctp-cup-v7-row .ctp-v127-cup-identities,
#cup-leaders .ctp-cup-v7-row .ctp-v127-cup-identities>.ctp-v127-identities{
  display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:4px!important;
  width:100%!important;max-width:100%!important;min-width:0!important;margin:4px 0 0!important;padding:0!important;
  overflow:hidden!important;box-sizing:border-box!important;
}
#cup-leaders .ctp-cup-v7-row .ctp-public-badge,
#cup-leaders .ctp-cup-v7-row .ctp-member-badge{
  position:relative!important;inset:auto!important;transform:none!important;flex:0 1 auto!important;
  min-width:0!important;max-width:100%!important;margin:0!important;overflow:hidden!important;box-sizing:border-box!important;
}
#cup-leaders .ctp-cup-v7-row .ctp-badge-label,
#cup-leaders .ctp-cup-v7-row .ctp-role-copy{min-width:0!important;max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important}
#cup-leaders .ctp-cup-v7-row .ctp-cup-points,
#cup-leaders .ctp-cup-v7-row .ctp-cup-wins{font-size:10px!important;font-weight:900!important;text-align:center!important}
@media(max-width:560px){
  #cup-leaders .ctp-cup-v7-row{grid-template-columns:30px minmax(0,1fr) 68px!important;gap:6px!important;padding:8px!important}
  #cup-leaders .ctp-cup-v7-row .ctp-cup-wins{display:none!important}
  #cup-leaders .ctp-cup-v7-row .ctp-cup-points{font-size:9px!important}
}
@media(max-width:390px){
  #cup-leaders .ctp-cup-v7-row{grid-template-columns:28px minmax(0,1fr)!important}
  #cup-leaders .ctp-cup-v7-row .ctp-cup-points{grid-column:2!important;justify-self:start!important;margin-top:3px!important}
}


/* v13.16.6 — legacy Cup leaderboard containment; original Cup renderer stays authoritative. */
#cup-leaders .cup-leader-row,#cup-leaders .cup-leader,#cup-leaders .leader-row,#cup-leaders .leader-item{
  max-width:100%!important;min-width:0!important;box-sizing:border-box!important;overflow:hidden!important;
}
#cup-leaders .cup-leader-row .ctp-v127-cup-identities,#cup-leaders .cup-leader .ctp-v127-cup-identities,#cup-leaders .leader-row .ctp-v127-cup-identities,#cup-leaders .leader-item .ctp-v127-cup-identities{
  max-width:100%!important;min-width:0!important;display:flex!important;flex-wrap:wrap!important;gap:4px!important;overflow:hidden!important;
}
#cup-leaders .ctp-v127-cup-identities .ctp-public-badge,#cup-leaders .ctp-v127-cup-identities .ctp-member-badge{max-width:100%!important;min-width:0!important;position:relative!important;inset:auto!important;transform:none!important;}

/* v13.17.0 — Cup metrics: preserve existing badges/profile links; add compact Persian stats. */
#cup-leaders .ctp-cup-v7-row .ctp-cup-metrics{display:block!important;margin-top:4px!important;color:#cbd5e1!important;font:800 8px/1.9 Tahoma,sans-serif!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
@media(max-width:430px){#cup-leaders .ctp-cup-v7-row .ctp-cup-metrics{font-size:7px!important;line-height:1.8!important}#cup-leaders .ctp-cup-v7-row .ctp-cup-points,#cup-leaders .ctp-cup-v7-row .ctp-cup-wins{display:none!important}}

/* v13.22.23 compact realistic chess wheel */
#ctp-wheel.ctp-v127-wheel{position:relative;border:10px solid #78350f!important;outline:3px solid #facc15;outline-offset:-5px;background:conic-gradient(#7f1d1d 0 45deg,#92400e 45deg 90deg,#065f46 90deg 135deg,#075985 135deg 180deg,#3730a3 180deg 225deg,#5b21b6 225deg 270deg,#86198f 270deg 315deg,#854d0e 315deg 360deg)!important;box-shadow:0 16px 35px rgba(0,0,0,.48),inset 0 0 0 4px rgba(255,255,255,.07),inset 0 0 24px rgba(0,0,0,.45)!important}.ctp-wheel-pointer{filter:drop-shadow(0 4px 3px rgba(0,0,0,.5))}.ctp-v127-wheel-preview{grid-template-columns:repeat(4,1fr)!important;gap:4px!important}.ctp-v127-wheel-preview>span{padding:5px 6px!important;font-size:8px!important}.ctp-v127-wheel-history{padding:7px!important}@media(max-width:520px){.ctp-v127-wheel-preview{grid-template-columns:repeat(2,1fr)!important}}
/* v13.22.23 — FIDE identity is visible wherever a user identity is rendered. */
.ctp-v127-identities .ctp-fide-title-badge,.ctp-v127-list-identities .ctp-fide-title-badge,.ctp-v127-cup-identities .ctp-fide-title-badge{display:inline-flex!important;align-items:center!important;gap:4px!important;min-height:30px!important;padding:3px 7px!important;border:1px solid rgba(250,204,21,.58)!important;border-radius:9px!important;background:linear-gradient(145deg,#78350f,#111827)!important;color:#fef3c7!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 4px 12px rgba(0,0,0,.18)!important;vertical-align:middle!important}
.ctp-v127-identities .ctp-fide-mark,.ctp-v127-list-identities .ctp-fide-mark,.ctp-v127-cup-identities .ctp-fide-mark{font-size:15px!important;color:#fde047!important}.ctp-v127-identities .ctp-fide-copy,.ctp-v127-list-identities .ctp-fide-copy,.ctp-v127-cup-identities .ctp-fide-copy{display:flex!important;flex-direction:column!important;line-height:1.05!important}.ctp-v127-identities .ctp-fide-copy b,.ctp-v127-list-identities .ctp-fide-copy b,.ctp-v127-cup-identities .ctp-fide-copy b{font:900 9px Arial!important;color:#fff!important}.ctp-v127-identities .ctp-fide-copy small,.ctp-v127-list-identities .ctp-fide-copy small,.ctp-v127-cup-identities .ctp-fide-copy small{font-size:5.5px!important;color:#fde68a!important}.ctp-v127-identities .ctp-fide-check,.ctp-v127-list-identities .ctp-fide-check,.ctp-v127-cup-identities .ctp-fide-check{font-size:8px!important;color:#86efac!important}
