#tables-screen .tables-heading { display: block; }
.tables-title-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
#tables-screen #tables-history { display: inline-flex; align-items: center; justify-content: flex-end; gap: 7px; border: 0; border-radius: 10px; padding: 6px 0 6px 6px; background: none; color: #39e2ff; font-size: 15px; font-weight: 600; }
#tables-screen #tables-history .history-chevron { width: 14px; color: #a9c8eb; }
#game-history-screen { position: absolute; inset: 0 0 72px; z-index: 1; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-x pan-y; color: #f7fbff; background: radial-gradient(ellipse at 20% 5%, #052940 0%, #021a2d 60%, #031a30 100%); scrollbar-width: none; }
#game-history-screen::-webkit-scrollbar { display: none; }
#game-history-screen[hidden], #game-history-screen [hidden] { display: none !important; }
.history-layout { width: 100%; max-width: 760px; margin: auto; padding: 22px 18px 28px; }
#game-history-screen svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#game-history-screen button { min-height: 44px; border: 1px solid #085578; border-radius: 12px; background: #07324c66; color: #abd0f3; font: 600 16px/1.3 system-ui,sans-serif; padding: 10px 16px; cursor: pointer; }
#game-history-screen button:active { filter: brightness(.86); }
#game-history-screen button:disabled { opacity: .6; cursor: default; }
#game-history-screen .history-back { display: flex; align-items: center; gap: 6px; background: none; border: 0; padding-left: 0; margin: 0 0 12px; font-weight: 500; }
.history-heading h1 { font-size: clamp(30px, 8vw, 38px); letter-spacing: -.035em; line-height: 1.15; margin: 0 0 8px; }
.history-heading p { color: #a9c8eb; font-size: 17px; line-height: 1.5; }
.history-filters { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 3px; border: 1px solid #085578; border-radius: 14px; background: #07314a55; margin: 22px 0 24px; gap: 3px; }
#game-history-screen .history-filters button { border: 1px solid transparent; background: none; padding: 10px 4px; position: relative; }
#game-history-screen .history-filters button[aria-pressed="true"] { color: #001624; background: #00c5ed; border-color: #35ddff; }
#game-history-screen .history-filters button[aria-pressed="false"] + button[aria-pressed="false"]::before { content: ''; width: 1px; background: #17516c; position: absolute; left: -2px; top: 10px; bottom: 10px; }
.history-day { margin-bottom: 24px; }
.history-day h2 { color: #a9c8eb; font-size: 19px; font-weight: 650; margin: 0 0 12px; }
.history-card { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 12px; border: 1px solid #085578; border-radius: 15px; background: #07314a55; padding: 16px 12px; margin-bottom: 8px; }
.history-avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #f7fbff; font-size: 21px; font-weight: 700; background: linear-gradient(135deg,#087ba0,#055875); }
.history-avatar[data-tone="1"] { background: linear-gradient(135deg,#53508d,#39326f); }
.history-avatar[data-tone="2"] { background: linear-gradient(135deg,#168b84,#09615f); }
.history-avatar[data-tone="3"] { background: linear-gradient(135deg,#277db8,#1d5283); }
.history-card h3 { font-size: 18px; line-height: 1.3; margin: 0 0 4px; overflow-wrap: anywhere; }
.history-card p { color: #a9c8eb; font-size: 14px; line-height: 1.55; }
.history-card strong { color: #f7fbff; font-weight: 650; }
.history-card .history-outcome { color: #22e5c8; font-size: 12px; font-weight: 600; margin-top: 3px; }
.history-card .history-outcome[data-outcome="lost"] { color: #ff8b89; }
.history-net { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; column-gap: 4px; max-width: 132px; color: #a9c8eb; font-size: 19px; line-height: 1.4; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.history-net[data-sign="positive"] { color: #22e5c8; }
.history-net[data-sign="negative"] { color: #ff8b89; }
.history-currency { font-size: 12px; font-weight: 600; }
.history-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 220px; text-align: center; color: #a9c8eb; padding: 24px; border: 1px solid #085578; border-radius: 16px; background: #07314a33; }
.history-placeholder h2 { color: #f7fbff; font-size: 20px; }
.history-placeholder p { line-height: 1.5; }
#game-history-screen .history-placeholder > svg { width: 42px; height: 42px; color: #00c5ed; }
#history-more { display: block; width: 100%; margin: 8px 0 0; }
.history-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) { #history-list[data-entering="true"] { animation: history-enter .16s ease-out; } }
@keyframes history-enter { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 360px) { .history-layout { padding-left: 14px; padding-right: 14px; } .history-card { gap: 9px; grid-template-columns: 34px minmax(0,1fr) auto; padding: 14px 10px; } .history-avatar { width: 34px; height: 34px; font-size: 18px; } .history-card h3 { font-size: 16px; } .history-net { font-size: 17px; max-width: 105px; } }
