/* Compact read-only hand list and recorded-step replayer. No table commands. */
.history-modal { width: min(100%,460px); max-width: 100%; max-height: calc(100dvh - 8px - env(safe-area-inset-top,0px)); margin: auto auto 0; padding: 0; border: 1px solid #51434c; border-bottom: 0; border-radius: 12px 12px 0 0; background: #151316; color: #eee9ec; box-shadow: 0 -8px 32px #0009; overflow: hidden; }
.history-modal::backdrop { background: #09070bb8; }
.history-modal #history-body { min-height: 0; }
.hand-history { height: min(93dvh,850px); max-height: calc(100dvh - 8px - env(safe-area-inset-top,0px)); display: flex; flex-direction: column; font: 13px/1.5 -apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif; }
.hand-history, .hand-history * { box-sizing: border-box; }
.hand-history .hand-history-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; background: linear-gradient(#302a30,#211d23); border-bottom: 1px solid #494047; flex-shrink: 0; }
.hand-history .hand-history-eyebrow { margin: 0 0 2px; color: #c2a772; font-size: 10px; font-weight: 800; font-style: italic; letter-spacing: 1.2px; }
.hand-history .hand-history-header h2 { margin: 0; font-size: 16px; line-height: 1.2; font-weight: 700; letter-spacing: -.2px; }
.hand-history .hand-history-close { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border: 1px solid #5b4d57; border-radius: 4px; background: #ffffff05; color: #e6dce3; font-size: 24px; line-height: 1; }
.hand-history .hand-history-close:hover { background: #ffffff12; }
.hand-history .hand-history-scroll { min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-color: #65505f #151316; padding: 0 10px 12px; }
.hand-history .hand-history-hand { border-bottom: 1px solid #393038; }
.hand-history .hand-history-hand > summary { display: grid; grid-template-columns: minmax(62px,1fr) auto minmax(62px,.7fr) 10px; align-items: center; column-gap: 8px; row-gap: 7px; min-height: 75px; padding: 12px 2px; list-style: none; cursor: pointer; }
.hand-history .hand-history-hand > summary::-webkit-details-marker { display: none; }
.hand-history .hand-history-hand[open] > summary { color: #f7ecdc; }
.hand-history .hand-history-hand-title { display: grid; gap: 3px; min-width: 0; }
.hand-history .hand-history-hand-title > strong { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hand-history .hand-history-hand-title > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #bcb0b9; font-size: 11px; }
.hand-history .hand-history-outcome { grid-column: 1 / -1; min-width: 0; color: #d0c0b3; font-size: 12px; line-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hand-history .hand-history-thumb { min-width: 0; }
.hand-history .hand-history-thumb .hand-history-cards { gap: 0; }
.hand-history .hand-history-thumb .hand-history-card { width: 16px; height: 24px; border-radius: 2px; box-shadow: 0 1px 2px #0008; }
.hand-history .hand-history-thumb .hand-history-card + .hand-history-card { margin-left: -2px; }
.hand-history .hand-history-thumb .hand-history-card b { font-size: 10px; }
.hand-history .hand-history-thumb .hand-history-card > span { font-size: 9px; }
.hand-history .hand-history-pot { display: grid; gap: 2px; text-align: right; min-width: 0; }
.hand-history .hand-history-pot small { font-size: 10px; color: #ae9ea9; }
.hand-history .hand-history-pot strong { min-width: 0; overflow-wrap: anywhere; color: #e4c578; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.hand-history .hand-history-chevron { color: #a38d9d; font-size: 16px; transition: transform 160ms ease; }
.hand-history .hand-history-hand[open] .hand-history-chevron { transform: rotate(180deg); }
.hand-history .hand-history-detail { min-width: 0; padding: 0 0 14px; }
.hand-history .history-replay-streets { display: flex; gap: 5px; margin: 0 0 12px; padding: 2px; overflow-x: auto; scrollbar-width: thin; }
.hand-history .history-replay-streets > button { min-width: 54px; min-height: 44px; flex: 1 0 auto; padding: 7px 9px; border: 1px solid #4f424b; border-radius: 4px; background: #252127; color: #cbbfc8; font-size: 12px; font-weight: 600; }
.hand-history .history-replay-streets > button[aria-selected='true'] { color: #f0d59a; border-color: #a28b54; background: #3a3028; }
.hand-history .history-replay-tools { margin-top: 14px; border-top: 1px solid #443841; }
.hand-history .history-replay-tools-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; color: #bfae9a; font-size: 12px; text-align: left; }
.hand-history .history-replay-tools-toggle[aria-expanded='true'] > span { transform: rotate(180deg); }
.hand-history .history-replay-controls { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 2px 0; }
.hand-history .history-replay-controls > button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #4f494e; border-radius: 4px; color: #ddd5da; background: linear-gradient(#363237,#242126); font-size: 23px; line-height: 1; }
.hand-history .history-replay-controls > [data-history-nav='play'] { width: 50px; color: #efd28a; border-color: #806e49; font-size: 17px; }
.hand-history .history-replay-controls button:disabled { opacity: .3; }
.hand-history .history-replay-progress { display: flex; align-items: center; gap: 9px; min-height: 34px; padding: 0 3px; }
.hand-history .history-replay-progress input { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 28px; margin: 0; background: transparent; cursor: pointer; touch-action: pan-y; }
.hand-history .history-replay-progress input::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: #665859; }
.hand-history .history-replay-progress input::-moz-range-track { height: 3px; border-radius: 3px; background: #665859; }
.hand-history .history-replay-progress input::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; margin-top: -5px; border: 1px solid #e6cc8e; border-radius: 50%; background: #bda16c; }
.hand-history .history-replay-progress input::-moz-range-thumb { width: 12px; height: 12px; border: 1px solid #e6cc8e; border-radius: 50%; background: #bda16c; }
.hand-history .history-replay-progress output { flex-shrink: 0; min-width: 42px; color: #c2b4bc; text-align: right; font-size: 11px; font-variant-numeric: tabular-nums; }
.hand-history .history-replay-table { padding: 12px 9px 11px; margin: 1px 0 12px; border: 3px solid #29232b; border-radius: 12px; background: radial-gradient(ellipse at 50% 35%,#713448,#491d30); box-shadow: inset 0 0 0 1px #a66a794d,0 0 0 1px #08070a,inset 0 1px 12px #1b081a73; }
.hand-history .history-replay-table-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.hand-history .history-replay-table-head > strong { color: #edd9e1; font-size: 12px; font-weight: 600; }
.hand-history .history-replay-table-head > span { color: #d2b1bd; text-align: right; font-size: 10px; }
.hand-history .history-replay-table-head b { display: block; color: #f2d79a; font-size: 17px; line-height: 22px; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hand-history .history-replay-board { display: grid; justify-items: center; gap: 4px; margin: 0 0 10px; }
.hand-history .history-replay-board > small { color: #d6b5c1; font-size: 11px; }
.hand-history .history-replay-own { display: grid; justify-items: center; gap: 5px; margin-top: 14px; padding-top: 9px; border-top: 1px solid #daa1b023; }
.hand-history .history-replay-own > small { color: #ead2db; font-size: 12px; }
.hand-history .history-replay-own > span { color: #cfb4bf; font-size: 11px; text-align: center; }
.hand-history .history-replay-own .hand-history-card { width: 38px; height: 52px; }
.hand-history .history-replay-draw { display: grid; gap: 4px; padding: 18px 0 9px; text-align: center; }
.hand-history .history-replay-draw > span { color: #d4aebc; font-size: 10px; letter-spacing: 1.5px; font-weight: 750; }
.hand-history .history-replay-draw > strong { color: #efd7df; font-size: 13px; font-weight: 600; }
.hand-history .history-replay-draw > small { color: #cfb4bf; font-size: 11px; }
.hand-history .history-private-draws { margin: 12px 0; border: 1px solid #495c59; border-radius: 6px; background: #20302b55; overflow: hidden; }
.hand-history .history-private-draws > h3 { display: flex; justify-content: space-between; gap: 8px; margin: 0; padding: 9px 10px; color: #d0e1d8; font-size: 12px; font-weight: 600; border-bottom: 1px solid #66827440; }
.hand-history .history-private-draws > h3 > span { flex-shrink: 0; color: #a8c3b6; font-size: 10px; font-weight: 400; }
.hand-history .history-private-draw { padding: 9px 10px 11px; }
.hand-history .history-private-draw + .history-private-draw { border-top: 1px solid #66827440; }
.hand-history .history-private-draw h4 { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 7px; color: #d4ded8; font-size: 11px; font-weight: 600; }
.hand-history .history-private-draw h4 > span { color: #9fb3a9; font-size: 10px; font-weight: 400; }
.hand-history .history-draw-pairs { display: flex; flex-wrap: wrap; gap: 9px 12px; }
.hand-history .history-draw-pair { display: flex; align-items: center; gap: 4px; min-width: 0; }
.hand-history .history-draw-pair .hand-history-card { width: 27px; height: 38px; box-shadow: 0 1px 2px #0006; }
.hand-history .history-draw-pair .hand-history-card b { font-size: 16px; }
.hand-history .history-draw-pair .hand-history-card > span { font-size: 13px; }
.hand-history .history-draw-arrow { color: #9db5a8; font-size: 14px; }
.hand-history .hand-history-cards { display: flex; justify-content: center; gap: 3px; flex-wrap: nowrap; }
.hand-history .hand-history-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 38px; height: 52px; border-radius: 3px; flex-shrink: 0; background: linear-gradient(120deg,#fff,#e9e8e4); border: 1px solid #f5f2f0; box-shadow: 0 2px 3px #0007; color: #24242a; font-family: Arial,sans-serif; }
.hand-history .hand-history-card b { font-size: 21px; font-weight: 700; line-height: 1; }
.hand-history .hand-history-card > span { font-size: 18px; line-height: 1; }
.hand-history .hand-history-card-empty { border: 1px solid #d1a1b03a; background: #250c221a; box-shadow: none; }
.hand-history .hand-history-hearts { color: #bf2a3e; }
.hand-history .hand-history-diamonds { color: #2261b6; }
.hand-history .hand-history-clubs { color: #157444; }
.hand-history .hand-history-result { margin: 0 0 12px; padding: 11px 12px; border-left: 2px solid #b59c64; background: #a98b4c0b; color: #e1cdb4; font-size: 13px; overflow-wrap: anywhere; }
.hand-history .hand-history-winners { margin: 0 0 12px; border: 1px solid #655138; border-radius: 5px; background: #28201e; overflow: hidden; }
.hand-history .hand-history-winners > h3 { display: flex; justify-content: space-between; gap: 8px; margin: 0; padding: 10px 12px; border-bottom: 1px solid #67513966; color: #e5c98a; font-size: 13px; font-weight: 650; }
.hand-history .hand-history-winners > h3 > span { color: #baa78e; font-size: 10px; font-weight: 400; }
.hand-history .hand-history-side-pots { margin: 0; padding: 10px 12px 0; color: #c9b9a3; font-size: 11px; line-height: 1.5; }
.hand-history .hand-history-winner { padding: 12px; }
.hand-history .hand-history-winner + .hand-history-winner { border-top: 1px solid #66513b66; }
.hand-history .hand-history-winner-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.hand-history .hand-history-winner-title > strong { min-width: 0; color: #f0e5d8; font-size: 15px; overflow-wrap: anywhere; }
.hand-history .hand-history-winner-title > span { flex-shrink: 0; max-width: 55%; color: #edce7f; font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hand-history .hand-history-winner .hand-history-cards { justify-content: flex-start; }
.hand-history .hand-history-winner .hand-history-card { width: 36px; height: 50px; }
.hand-history .hand-history-winner-hand { display: grid; gap: 2px; margin: 8px 0 0; }
.hand-history .hand-history-winner-hand > small { color: #cab08d; font-size: 11px; font-weight: 600; }
.hand-history .hand-history-winner-hand > strong { color: #ece0cc; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.hand-history .hand-history-winner-hand > span { color: #c0b09c; font-size: 11px; overflow-wrap: anywhere; }
.hand-history .history-replay-action-heading { display: flex; justify-content: space-between; gap: 8px; margin: 13px 2px 9px; }
.hand-history .history-replay-action-heading h3 { margin: 0; color: #cebdc9; font-size: 12px; font-weight: 600; }
.hand-history .history-replay-action-heading small { color: #ad9aa6; font-size: 11px; font-variant-numeric: tabular-nums; }
.hand-history .hand-history-timeline { list-style: none; margin: 0; padding: 0; }
.hand-history .hand-history-event { position: relative; display: flex; align-items: flex-start; gap: 9px; padding: 9px 7px 9px 3px; color: #d5c8d1; font-size: 13px; border-radius: 3px; }
.hand-history .hand-history-event > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.hand-history .hand-history-event-dot { display: block; flex-shrink: 0; width: 4px; height: 4px; margin-top: 5px; border-radius: 50%; background: #87717f; }
.hand-history .hand-history-event-street { color: #dfc9d5; font-weight: 600; }
.hand-history .hand-history-event-street .hand-history-event-dot { background: #c8aa6b; }
.hand-history .hand-history-event-draw .hand-history-event-dot { background: #73aaa8; }
.hand-history .hand-history-event-refund .hand-history-event-dot { background: #82a875; }
.hand-history .hand-history-event.is-current { background: #66513333; color: #e4cfaa; box-shadow: inset 2px 0 #b99c5d; }
.hand-history .history-transcript-toggle { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 44px; margin-top: 6px; padding: 9px 2px; color: #d1ba96; font-size: 12px; text-align: left; }
.hand-history .history-transcript-toggle[aria-expanded='true'] > span { transform: rotate(180deg); }
.hand-history .history-transcript-street { margin-top: 14px; padding-top: 10px; border-top: 1px solid #42343e; }
.hand-history .history-transcript-street > h3 { margin: 0 0 4px; color: #e0c690; font-size: 12px; line-height: 1.5; font-weight: 650; overflow-wrap: anywhere; }
.hand-history .hand-history-note { color: #c2aebb; font-size: 11px; margin: 0; overflow-wrap: anywhere; }
.hand-history .history-replay-disclaimer { margin-top: 10px; color: #887581; }
.hand-history .hand-history-footer { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom,0px)); border-top: 1px solid #3d333b; color: #a995a2; background: #1d181f; font-size: 9px; flex-shrink: 0; }
.hand-history .hand-history-footer > span { color: #806f7b; }
.hand-history .hand-history-empty { padding: 56px 15px; text-align: center; color: #a997a4; }
.hand-history .hand-history-empty > span { color: #ac8d5d; font-size: 32px; }
.hand-history .hand-history-empty h3 { color: #d6c8d2; font-size: 14px; margin: 12px 0 5px; }
.hand-history .hand-history-empty p { font-size: 11px; margin: 0; }
.hand-history .history-replay-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.hand-history :focus-visible { outline: 2px solid #e0bd72; outline-offset: 2px; }
@media(min-width:700px) { .history-modal { height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; border: 0; border-left: 1px solid #51434c; border-radius: 0; } .hand-history { height: 100dvh; max-height: 100dvh; } }
@media(max-width:350px) { .hand-history .hand-history-scroll { padding-inline: 8px; } .hand-history .hand-history-hand > summary { gap: 6px; grid-template-columns: minmax(57px,1fr) auto minmax(62px,.75fr) 10px; } .hand-history .hand-history-header { padding: 9px 11px; } .hand-history .history-replay-table { padding-inline: 7px; } }
@media(prefers-reduced-motion:reduce) { .hand-history .hand-history-chevron { transition: none; } }
