.topbar:not(.topbar--draws) #historyToggleBtn,
.topbar #historyToggleBtn[hidden] { display: none !important; }
.game-history-access { display: flex; justify-content: flex-end; margin: 8px 0 12px; }
.game-history-access[hidden] { display: none !important; }
.game-history-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 14px; border: 1px solid #ffffff0d; border-radius: 14px; background: #1c1c1e; color: #b2b2b8; font: 500 13px var(--ds-font, sans-serif); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .18s ease, background .18s ease; }
.game-history-trigger:active { transform: scale(.97); background: #262628; }
.game-history-trigger svg { flex: 0 0 18px; }
.game-history-modal .history-modal__sheet { left: 50%; transform: translateX(-50%); width: min(100%, 560px); max-height: min(84dvh, 760px, calc(100dvh - var(--tg-inset-top, 0px) - 8px)); padding: 16px 16px calc(20px + var(--tg-inset-bottom, env(safe-area-inset-bottom, 0px))); overscroll-behavior: contain; box-sizing: border-box; }
.game-history-modal.is-open .history-modal__sheet { animation: game-history-enter .24s cubic-bezier(.22,1,.36,1); }
@keyframes game-history-enter { from { opacity: 0; transform: translate(-50%, 18px); } to { opacity: 1; transform: translate(-50%, 0); } }
.game-history-modal .history-modal__header { gap: 12px; margin-bottom: 12px; }
.game-history-modal .history-modal__title { font-weight: 600; line-height: 1.35; }
.game-history-modal .history-modal__close { width: 44px; min-width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: #ffffff08; }
.app--ufc .game-history-modal .history-modal__close { width: 44px; height: 44px; }
.game-history-modal .history-modal__more-btn { min-height: 44px; font: 500 14px var(--ds-font, sans-serif); }
.game-history-card { padding: 14px; border: 1px solid #ffffff06; border-radius: 16px; background: #222224; }
.game-history-meta { display: flex; justify-content: space-between; gap: 12px; color: #86868d; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.game-history-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.game-history-totals>div { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.game-history-totals span { color: #929299; font-size: 11px; }
.game-history-totals strong { color: #fff; font-size: 17px; line-height: 1.25; font-weight: 600; overflow-wrap: anywhere; }
.game-history-totals>div:last-child strong { color: #5dd98c; }
.game-history-winner { margin: 8px 0; font-size: 12px; line-height: 1.4; color: #5dd98c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-history-count { color: #929299; font-size: 11px; }
.game-history-players { margin-top: 10px; border-top: 1px solid #ffffff0b; }
.game-history-players summary { min-height: 44px; padding: 13px 0; box-sizing: border-box; cursor: pointer; font-size: 13px; color: #e3e3e6; }
.game-history-players ol { list-style: none; margin: 0; padding: 0; }
.game-history-player { display: flex; align-items: center; gap: 9px; padding: 10px 0; border-top: 1px solid #ffffff08; }
.game-history-avatar { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; object-fit: cover; }
.game-history-person { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.game-history-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #f1f1f3; font-size: 13px; font-weight: 500; }
.game-history-stake { color: #8d8d94; font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
.game-history-result { display: flex; flex: 0 1 40%; min-width: 0; flex-direction: column; align-items: flex-end; gap: 5px; text-align: right; }
.game-history-result>span { color: #c3c3c8; font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.game-history-result small { color: #8d8d94; font-size: 10px; line-height: 1.3; }
.game-history-result.is-winner>span { color: #5dd98c; }
.game-history-state,.game-history-legacy { margin: 0; padding: 14px 0; color: #a0a0a7; font-size: 13px; line-height: 1.5; }
.game-history-legacy { padding-bottom: 0; font-size: 11px; }
.game-history-modal :focus-visible,.game-history-trigger:focus-visible { outline: 2px solid #ffa500; outline-offset: 3px; }
@media (max-width: 350px) { .game-history-card { padding: 12px; } .game-history-totals strong { font-size: 15px; } .game-history-avatar { width: 30px; height: 30px; flex-basis: 30px; } .game-history-player { gap: 7px; } }
@media (prefers-reduced-motion: reduce) { .game-history-trigger { transition: none; } .game-history-trigger:active { transform: none; } .game-history-modal.is-open .history-modal__sheet { animation: none; } }
