.hand-history-dialog{width:min(1160px,97vw);max-width:97vw;max-height:94dvh;overflow:auto;background:#111a15;color:#e6eee8;border:1px solid #42584a;padding:20px;border-radius:14px}.hand-history-dialog::backdrop{background:#000b}.hand-history-coverage,.hand-history-status{font-size:12px;line-height:1.6;color:#b5c5b9}.hand-history-status{min-height:20px}.hand-history-layout{display:grid;grid-template-columns:250px minmax(0,1fr);gap:20px}.hand-history-index{min-width:0}.hand-history-row{display:flex;flex-direction:column;align-items:flex-start;gap:5px;width:100%;padding:12px;margin:0 0 7px;border:1px solid #354b3b;border-radius:8px;background:#1c2b20;color:#edf4ee;text-align:left;cursor:pointer}.hand-history-row:hover,.hand-history-row:focus-visible{border-color:#d1c17d}.hand-history-row span{font-size:11px;line-height:1.5;color:#afc5b6}.hand-history-pager{display:flex;align-items:center;justify-content:space-between;gap:5px;font-size:11px;flex-wrap:wrap}.hand-history-pager button{font-size:11px;padding:7px}.hand-history-detail{min-width:0}.hand-history-summary h3{margin:0 0 6px}.hand-history-summary p{font-size:12px;margin:4px 0;color:#b3c9b9}.hand-replay-stage{height:350px;position:relative;margin:14px 0 8px;background:radial-gradient(ellipse at center,#176327,#123f1d 60%,#111c13 61%);border-radius:16px;overflow:hidden}.hand-replay-pot{position:absolute;top:30%;left:50%;translate:-50% 0;background:#0c2913d9;border-radius:20px;padding:5px 10px;font-size:12px;white-space:nowrap;color:#f3e09b}.hand-replay-board{position:absolute;left:50%;top:44%;translate:-50% -50%;display:flex;gap:5px}.hand-replay-card{display:inline-flex;width:38px;height:53px;align-items:center;justify-content:center;border-radius:4px;color:#18231c;background:#f6f5ee;box-shadow:0 2px 4px #0005;font:bold 20px Georgia,serif;white-space:nowrap}.hand-replay-card.red{color:#b82935}.hand-replay-card.back{background:repeating-linear-gradient(45deg,#d4dfd6,#d4dfd6 2px,#577061 2px,#577061 4px);color:#eef7ee;border:2px solid #d9e7df;font-size:12px}.hand-replay-seat{position:absolute;display:flex;align-items:center;flex-direction:column;gap:2px;translate:-50% -50%;width:100px;text-align:center;font-size:11px;background:#101a14db;padding:5px;border-radius:8px;border:1px solid #5a6d5c}.hand-replay-seat strong{overflow:hidden;max-width:100%;text-overflow:ellipsis;white-space:nowrap}.hand-replay-seat>span{color:#72d2e2}.hand-replay-seat small{font-size:10px;color:#dcc790}.hand-replay-seat[data-position="0"]{left:50%;top:82%}.hand-replay-seat[data-position="1"]{left:85%;top:65%}.hand-replay-seat[data-position="2"]{left:85%;top:22%}.hand-replay-seat[data-position="3"]{left:50%;top:16%}.hand-replay-seat[data-position="4"]{left:15%;top:22%}.hand-replay-seat[data-position="5"]{left:15%;top:65%}.hand-replay-cards{display:flex;gap:3px}.hand-replay-seat .hand-replay-card{width:29px;height:40px;font-size:16px}.hand-replay-seat.folded{opacity:.5}.hand-replay-seat.winner{border-color:#ffe198;box-shadow:0 0 13px #c0a25077}.hand-replay-transport{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.hand-replay-transport input{flex:1;min-width:120px;accent-color:#b4d68b}.hand-replay-caption{font-size:12px;color:#e1d79c;min-height:20px}.hand-history-result-row{display:grid;grid-template-columns:minmax(70px,1fr) repeat(3,minmax(70px,auto));gap:10px;padding:10px 0;border-bottom:1px solid #34483a;font-size:12px}.hand-history-result-row .negative{color:#f08b88}.hand-history-result-row .positive{color:#6bd5a3}.hand-history-actions{font-size:12px;line-height:1.8;padding-left:22px;max-height:220px;overflow:auto}@media(max-width:700px){.hand-history-dialog{padding:14px}.hand-history-layout{grid-template-columns:1fr}.hand-history-index>div:first-child{display:flex;gap:6px;overflow-x:auto;max-width:100%;padding-bottom:6px}.hand-history-row{min-width:175px;margin:0}.hand-history-pager{margin-top:8px}.hand-replay-stage{height:330px}.hand-replay-seat{width:77px;font-size:10px}.hand-replay-seat .hand-replay-card{width:24px;height:34px;font-size:14px}.hand-replay-seat[data-position="1"],.hand-replay-seat[data-position="2"]{left:86%}.hand-replay-seat[data-position="4"],.hand-replay-seat[data-position="5"]{left:14%}.hand-history-result-row{grid-template-columns:1fr 1fr;font-size:11px}}
.hand-show-section{margin-top:14px;padding:12px;border:1px solid #354b3b;border-radius:10px}.hand-show-section h3{margin:0 0 6px}.hand-show-cards,.hand-show-actions{display:flex;gap:8px;flex-wrap:wrap}.hand-show-cards{margin:10px 0}.hand-show-card{display:flex;min-width:60px;min-height:76px;align-items:center;justify-content:center;flex-direction:column;gap:5px;padding:7px;background:#1c2b20;color:#edf4ee;border:2px solid #42584a;border-radius:8px;cursor:pointer}.hand-show-card[aria-pressed="true"]{border-color:#15d489;background:#113d2b}.hand-show-card:focus-visible{outline:2px solid #edf4ee;outline-offset:2px}.hand-show-card:disabled{cursor:default;opacity:.65}.hand-show-face{pointer-events:none}.hand-show-card small{font-size:10px}.hand-show-actions button,.hand-show-confirm button{min-height:44px}.hand-show-confirm{margin-top:10px;padding:10px;border-radius:8px;background:#19261d}.hand-show-confirm p{margin:0 0 8px;font-size:12px}.hand-show-confirm button+button{margin-left:8px}.hand-show-status{font-size:12px;line-height:1.5;color:#b5c5b9}.hand-show-status:empty{display:none}
.hand-history-dialog .hand-history-detail:has(>.hand-show-section){overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable;overscroll-behavior:contain;scroll-padding-block:8px;-webkit-overflow-scrolling:touch}.hand-history-dialog .hand-history-detail:has(>.hand-show-section)>*{flex-shrink:0}.hand-history-dialog .hand-history-detail:has(>.hand-show-section)>.hand-replay-stage{flex:0 0 clamp(230px,42dvh,360px);height:clamp(230px,42dvh,360px);min-height:230px}.hand-history-dialog .hand-history-detail:has(>.hand-show-section)>.hand-history-metadata{max-height:none;overflow:visible}@media(orientation:landscape) and (max-height:500px){.hand-history-dialog .hand-history-detail:has(>.hand-show-section)>.hand-replay-stage{flex-basis:clamp(130px,36dvh,230px);height:clamp(130px,36dvh,230px);min-height:130px}}
dialog.hand-history-dialog{grid-template-columns:minmax(0,1fr)}.hand-history-dialog>.dialog-heading,.hand-history-dialog>.hand-history-layout,.hand-history-dialog .hand-history-detail,.hand-history-dialog .hand-history-index{min-width:0;max-width:100%}.hand-history-dialog>.dialog-heading>*{min-width:0;max-width:100%}.hand-history-dialog>.dialog-heading>button{flex:0 1 auto;padding-inline:8px;white-space:normal;overflow-wrap:anywhere}.hand-history-dialog .hand-show-section,.hand-history-dialog .hand-show-actions,.hand-history-dialog .hand-show-confirm,.hand-history-dialog .hand-history-metadata,.hand-history-dialog .hand-replay-transport{min-width:0;max-width:100%;overflow-wrap:anywhere}.hand-history-dialog .hand-show-actions>button{flex:1 1 130px;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}.hand-history-dialog .hand-show-confirm:not([hidden]){display:flex;flex-wrap:wrap;gap:8px}.hand-history-dialog .hand-show-confirm>p{flex-basis:100%;min-width:0;max-width:100%}.hand-history-dialog .hand-show-confirm>button{flex:1 1 100px;min-width:0;max-width:100%;margin:0;white-space:normal;overflow-wrap:anywhere}.hand-history-dialog .hand-replay-transport>*{min-width:0}

/* The archive is a miniature scene and an action timeline, not a second live table. */
.hand-history-dialog[data-selection="hand"] .hand-history-detail{display:flex;flex-direction:column;gap:4px;min-height:0;overflow:hidden}
.hand-history-dialog[data-selection="hand"] .hand-history-detail>.hand-replay-stage{flex:0 0 35%;height:35%;min-height:180px;max-height:300px;margin:0}
.hand-history-dialog[data-selection="hand"] .hand-replay-stage .hand-replay-seat{width:67px;font-size:9px}
.hand-history-dialog[data-selection="hand"] .hand-replay-stage .hand-replay-avatar{width:30px;height:30px;font-size:12px;margin-bottom:-5px}
.hand-history-dialog[data-selection="hand"] .hand-replay-stage .hand-replay-chips{font-size:12px;padding:2px}
.hand-history-dialog[data-selection="hand"] .hand-replay-stage .hand-replay-card{width:29px;height:41px;font-size:17px}
.hand-history-dialog[data-selection="hand"] .hand-replay-stage .hand-replay-seat .hand-replay-card{width:19px;height:27px;font-size:12px;margin-left:-5px}
.hand-history-dialog[data-selection="hand"] .hand-replay-stage .hand-replay-seat.own .hand-replay-card{width:29px;height:41px;font-size:17px;margin-left:-8px}
.hand-history-dialog[data-selection="hand"] .hand-replay-stage .hand-replay-seat .hand-replay-card:first-child{margin-left:0}
.hand-history-dialog[data-selection="hand"] .hand-replay-stage .hand-replay-seat small{font-size:8px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hand-history-dialog[data-selection="hand"] .hand-replay-stage .hand-replay-pot{top:32%;font-size:10px;padding:3px 8px}
.hand-history-dialog[data-selection="hand"] .hand-replay-stage .hand-replay-watermark{font-size:18px}
.hand-history-dialog .hand-replay-columns{display:flex;flex:1 1 0;min-height:85px;min-width:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;background:#151714;border:1px solid #363e32;border-radius:6px}
.hand-history-dialog[data-selection="hand"] .hand-history-detail>.hand-replay-columns{flex:1 1 0}
.hand-history-dialog .hand-replay-column{flex:1 0 122px;min-width:122px;border-right:1px solid #353c31;padding:0 5px 8px;transition:background-color .16s}
.hand-history-dialog .hand-replay-column:last-child{border-right:0}
.hand-history-dialog .hand-replay-column.current{background:#232b1f}
.hand-history-dialog .hand-replay-column>h4{position:sticky;top:0;z-index:1;margin:0 -5px 6px;padding:8px 5px;background:#22281f;color:#ced5c8;text-align:center;font-size:11px;font-weight:600;white-space:nowrap}
.hand-history-dialog .hand-replay-column.current>h4{color:#ffe3a5;background:#38412c}
.hand-history-dialog .hand-replay-step{display:grid;grid-template-columns:24px minmax(0,1fr);gap:3px 5px;align-items:center;width:100%;min-height:40px;margin:0 0 6px;padding:6px;border:1px solid #495143;border-radius:7px;background:#30362c;color:#e1e5dc;text-align:left;cursor:pointer;font-size:10px;line-height:1.3}
.hand-history-dialog .hand-replay-step>strong{font-size:10px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hand-history-dialog .hand-replay-step-action{grid-column:1/-1;overflow-wrap:anywhere}
.hand-history-dialog .hand-replay-step-avatar{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border:1px solid #7f8f99;border-radius:50%;background:radial-gradient(circle at 30% 20%,#8fa3a5,#263a45);font-weight:700;font-size:10px;color:#f0f4ef}
.hand-history-dialog .hand-replay-step-amount{grid-column:1/-1;color:#e5c36f;text-align:right;font-size:11px;font-weight:700}
.hand-history-dialog .hand-replay-step.future{opacity:.55}
.hand-history-dialog .hand-replay-step.current{background:#665728;border-color:#e1c877;box-shadow:0 0 0 1px #d2b95c;color:#fff2c8;opacity:1}
.hand-history-dialog .hand-replay-step:focus-visible{outline:2px solid #9ce5bd;outline-offset:1px}
.hand-history-dialog[data-selection="hand"] .hand-replay-transport{display:grid;grid-template-columns:44px minmax(55px,1fr) 44px auto auto;align-items:center;gap:5px;flex:0 0 auto}
.hand-history-dialog[data-selection="hand"] .hand-replay-transport>input{grid-column:auto;width:100%;min-width:0;margin:0;accent-color:#16c681}
.hand-history-dialog[data-selection="hand"] .hand-replay-transport>button{padding:4px;min-height:40px;font-size:11px}
.hand-history-dialog .hand-replay-counter{font-size:11px;white-space:nowrap;color:#c9d7ca}
.hand-history-dialog[data-selection="hand"] .hand-replay-caption{min-height:16px;margin:0;font-size:11px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hand-history-dialog[data-selection="hand"] .hand-history-metadata{flex:0 0 auto;max-height:30%;margin:0;font-size:11px;overflow:auto}
.hand-history-dialog[data-selection="hand"] .hand-history-metadata>summary,.hand-history-dialog .hand-show-section>summary{min-height:30px;display:flex;align-items:center;cursor:pointer;font-size:11px;color:#c6d3c4}
.hand-history-dialog .hand-show-section{flex:0 0 auto;margin:0;padding:0;max-height:35%;overflow:auto;border:0;background:transparent;box-shadow:none}
.hand-history-dialog .hand-show-card{min-width:0;min-height:0;padding:0;border:0;background:transparent;box-shadow:none}
.hand-history-dialog .hand-show-card[aria-pressed="true"]{border:0;background:transparent;outline:2px solid #59f0af;outline-offset:2px}
.hand-history-dialog .hand-show-card small{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.hand-history-dialog .hand-show-actions button,.hand-history-dialog .hand-show-confirm button{min-height:36px;padding:6px 10px;font-size:12px}
.hand-history-dialog .hand-show-confirm{padding:0;border:0;background:transparent;box-shadow:none}
.hand-history-dialog .hand-show-section[open]{padding-bottom:8px}
@media(max-width:700px){.hand-history-dialog[data-selection="hand"] .hand-history-detail>.hand-replay-stage{min-height:170px;max-height:260px}.hand-history-dialog .hand-replay-column{flex-basis:112px;min-width:112px}.hand-history-dialog[data-selection="hand"] .hand-replay-transport{grid-template-columns:40px minmax(40px,1fr) 40px auto auto}}
@media(orientation:landscape) and (max-height:500px){.hand-history-dialog[data-selection="hand"] .hand-history-detail>.hand-replay-stage{min-height:105px;max-height:145px}.hand-history-dialog[data-selection="hand"] .hand-replay-transport>button{min-height:32px}.hand-history-dialog[data-selection="hand"] .hand-replay-stage .hand-replay-avatar{width:23px;height:23px}.hand-history-dialog[data-selection="hand"] .hand-replay-stage .hand-replay-seat{width:56px;font-size:8px}.hand-history-dialog[data-selection="hand"] .hand-replay-stage .hand-replay-chips{font-size:10px}.hand-history-dialog[data-selection="hand"] .hand-replay-stage .hand-replay-seat.own .hand-replay-card{width:23px;height:32px;font-size:14px}.hand-history-dialog .hand-replay-columns{min-height:55px}}
@media(prefers-reduced-motion:reduce){.hand-history-dialog .hand-replay-column{transition:none}}
/* A short landscape viewport gives the miniature its full height beside the
   action columns. Stacking both panes here would clip seats and action rows. */
@media(orientation:landscape) and (max-height:500px){
 .hand-history-dialog .hand-history-layout{display:block;height:100%;min-height:0}
 .hand-history-dialog[data-selection=hand] .hand-history-index{display:none}
 .hand-history-dialog[data-selection=list] .hand-history-detail{display:none}
 .hand-history-dialog .hand-history-index{height:100%}
 .hand-history-dialog[data-selection=hand] .hand-history-detail{height:100%;display:grid;grid-template-columns:minmax(230px,.42fr) minmax(0,.58fr);grid-template-rows:minmax(0,1fr) 18px 44px auto;gap:4px}
 .hand-history-dialog[data-selection=hand] .hand-history-detail>.hand-replay-stage{grid-column:1;grid-row:1;min-height:0;max-height:none;height:100%;margin:0}
 .hand-history-dialog[data-selection=hand] .hand-history-detail:has(>.hand-show-section)>.hand-replay-stage{min-height:0;max-height:none;height:100%;flex-basis:auto}
 .hand-history-dialog .hand-replay-caption{grid-column:1;grid-row:2;min-height:0;margin:0}
 .hand-history-dialog .hand-replay-columns{grid-column:2;grid-row:1/3;min-height:0;height:100%;margin:0}
 .hand-history-dialog .hand-replay-transport{grid-column:1/-1;grid-row:3;min-width:0}
 .hand-history-dialog .hand-history-metadata{grid-column:1;grid-row:4;max-height:100%;min-width:0;margin:0}
 .hand-history-dialog .hand-show-section{grid-column:2;grid-row:4;max-height:90px;overflow:auto;min-width:0;margin:0}
 .hand-history-dialog .hand-show-section>summary{min-height:30px}
 .hand-history-dialog .hand-history-metadata[open]{max-height:90px}
}

/* Review48: the miniature has a real table-shaped viewport, not a wide strip. */
@media(min-width:950px) and (min-height:501px){
 .hand-history-dialog[data-selection=hand] .hand-history-detail{display:grid;grid-template-columns:minmax(260px,.42fr) minmax(0,.58fr);grid-template-rows:auto minmax(0,1fr) 20px 44px auto;gap:5px}
 .hand-history-dialog .hand-history-summary{grid-column:1/-1;grid-row:1}
 .hand-history-dialog[data-selection=hand] .hand-history-detail>.hand-replay-stage{grid-column:1;grid-row:2;min-height:0;max-height:none;height:100%;margin:0;flex-basis:auto}
 .hand-history-dialog .hand-replay-caption{grid-column:1;grid-row:3;min-height:0;margin:0}
 .hand-history-dialog .hand-replay-columns{grid-column:2;grid-row:2/4;height:100%;min-height:0;margin:0}
 .hand-history-dialog .hand-replay-transport{grid-column:1/-1;grid-row:4;min-width:0}
 .hand-history-dialog[data-selection=hand] .hand-history-detail>.hand-history-metadata,.hand-history-dialog[data-selection=hand] .hand-history-detail:has(>.hand-show-section)>.hand-history-metadata{grid-column:1;grid-row:5;max-height:90px;min-height:0;min-width:0;margin:0;overflow:auto}
 .hand-history-dialog .hand-show-section{grid-column:2;grid-row:5;max-height:90px;overflow:auto;min-width:0;margin:0}
}
