.cf-ranking-open { overflow: hidden; }
.cf-ranking-page { position: fixed; inset: 0; z-index: 10060; display: flex; justify-content: center; background: #07100b; color: #f7ecd2; font-family: inherit; }
.cf-ranking-page[hidden] { display: none !important; }
.cf-ranking-panel { width: min(100%, var(--game-shell-width, 430px)); max-width: var(--game-shell-width, 430px); height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: radial-gradient(circle at 50% 0, rgba(207,157,53,.2), transparent 32%), linear-gradient(165deg,#15291d,#07120c); box-shadow: 0 0 55px #000b; }
.cf-ranking-panel > header { min-height: 62px; display: grid; grid-template-columns: 74px minmax(0,1fr) 74px; align-items: center; padding: 8px 10px; border-bottom: 1px solid #d8b86b44; background: #07130de8; text-align: center; }
.cf-ranking-panel > header button { min-height: 38px; padding: 0 7px; border: 0; background: none; color: #f5d487; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.cf-ranking-panel h1 { margin: 0; overflow: hidden; color: #ffe3a2; font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }
.cf-ranking-panel header small { display: block; margin-top: 2px; overflow: hidden; color: #aebcac; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.cf-ranking-scroll { min-height: 0; flex: 1; overflow-y: auto; padding: 10px; overscroll-behavior: contain; scrollbar-width: none; }
.cf-ranking-scroll::-webkit-scrollbar { display: none; width: 0; height: 0; }
.cf-ranking-categories { display: grid; gap: 7px; }
.cf-ranking-categories > button { width: 100%; min-height: 66px; display: grid; grid-template-columns: 43px minmax(0,1fr) 24px; gap: 9px; align-items: center; padding: 9px 11px; border: 1px solid #d8b86b31; border-radius: 13px; color: inherit; background: linear-gradient(135deg,#11261a,#0a1a11); font: inherit; text-align: left; cursor: pointer; box-shadow: inset 0 1px #ffffff08; }
.cf-ranking-categories > button:active { transform: translateY(1px); background: #172d20; }
.cf-ranking-category-icon { width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid #d4ad5942; border-radius: 11px; background: #6e4a1a35; font-size: 23px; }
.cf-ranking-category-copy { min-width: 0; display: grid; gap: 3px; }
.cf-ranking-category-copy b { overflow: hidden; color: #ffe9b9; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.cf-ranking-category-copy small { overflow: hidden; color: #9fb09f; font-size: 10px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.cf-ranking-category-arrow { color: #edc773; font-size: 29px; line-height: 1; text-align: center; }
.cf-ranking-message { margin: 24px 8px; padding: 16px; border: 1px solid #d8b86b33; border-radius: 14px; background: #0c1d14; text-align: center; }
.cf-ranking-message.error { color: #ffb7a9; }
.cf-ranking-viewer { margin-bottom: 10px; padding: 9px; border: 1px solid #f0c66370; border-radius: 14px; background: #5e421b55; }
.cf-ranking-viewer > small { display: block; margin: 0 0 6px 44px; color: #f3ce79; font-weight: 900; }
.cf-ranking-total { margin: 4px 5px 8px; color: #aebcac; font-size: 11px; text-align: right; }
.cf-ranking-list { display: grid; gap: 6px; }
.cf-ranking-row { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 7px; min-height: 55px; padding: 7px 9px; border: 1px solid #d8b86b29; border-radius: 12px; background: #0c1d14db; }
.cf-ranking-row.is-viewer { border: 0; background: transparent; padding: 0; }
.cf-ranking-position { color: #f4cd75; font-size: 15px; font-weight: 1000; text-align: center; }
.cf-ranking-player { min-width: 0; display: grid; gap: 2px; border: 0; padding: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.cf-ranking-player b { overflow: hidden; color: #fff0c5; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.cf-ranking-player small { color: #93a495; font-size: 10px; }
.cf-ranking-row > strong { max-width: 132px; color: #f5d27e; font-size: 12px; text-align: right; overflow-wrap: anywhere; }
.cf-stats-emoji { display: inline-grid !important; place-items: center; font-size: 18px; }

@media (max-width: 360px) {
  .cf-ranking-row > strong { max-width: 100px; }
  .cf-ranking-category-copy small { white-space: normal; }
}
