/* Presentation only: preserve the archive grid, cards and control geometry. */
#handHistoryV2Modal.hhv2-modal {
  --hh-finish-cyan:#18c9f6;
  --hh-finish-purple:#ca80f3;
  --hh-finish-frame:url('/assets/ui/hh-terminal-frame.svg?v=20261007-history-frame-align-111-01');
  --hh-finish-shape:polygon(12px 0,calc(100% - 12px) 0,100% 12px,100% calc(100% - 12px),calc(100% - 12px) 100%,12px 100%,0 calc(100% - 12px),0 12px);
  background:rgba(0,5,12,.88);
  backdrop-filter:blur(2px);
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell {background:transparent;}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-list-panel {
  --hh-finish-frame:url('/assets/ui/hh-history-frame.svg?v=20261007-history-frame-align-111-01');
  --hh-finish-shape:polygon(12px 0,calc(100% - 6px) 0,100% 6px,100% calc(100% - 12px),calc(100% - 12px) 100%,10px 100%,0 calc(100% - 10px),0 12px);
  clip-path:var(--hh-finish-shape);
  background:linear-gradient(160deg,rgba(3,24,39,.9),rgba(0,8,17,.91))!important;
  box-shadow:none;
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-detail-panel {
  background:transparent!important;
  box-shadow:none;
  clip-path:none;
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-detail-panel::before,
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-detail-panel::after {
  content:none!important;display:none!important;background:none!important;
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-detail-grid {
  position:relative;isolation:isolate;column-gap:6px!important;
  /* Match the list frame's full height; keep the existing horizontal inset. */
  padding-block:0!important;
  grid-template-columns:calc(100cqw - var(--hh-list) - 6px) minmax(0,1fr)!important;
}
@container hh-workspace (min-width:1100px) {
  #handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-detail-grid {
    grid-template-columns:calc(var(--hh-center) - .5rem + 4px) minmax(0,1fr)!important;
  }
}
/* Both grid boundaries are required: an auto end extends across the log column. */
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-detail-grid::before,
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-detail-grid::after {
  content:'';position:absolute;grid-column:1 / 2;grid-row:1 / -1;inset:0;
  pointer-events:none;z-index:3;
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-right-column {
  --hh-finish-frame:url('/assets/ui/hh-action-log-frame.svg?v=20261007-history-frame-align-111-01');
  --hh-finish-shape:polygon(13px 0,calc(100% - 15px) 0,100% 15px,100% calc(100% - 18px),calc(100% - 18px) 100%,12px 100%,0 calc(100% - 12px),0 13px);
  position:relative;isolation:isolate;
  background:linear-gradient(165deg,rgba(2,21,36,.92),rgba(0,8,17,.91));
  clip-path:var(--hh-finish-shape);
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-list-panel::before,
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-detail-grid::before,
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-right-column::before {
  content:'';position:absolute;inset:0;width:auto;height:auto;pointer-events:none;z-index:3;
  box-sizing:border-box;border:18px solid transparent;clip-path:none;
  border-image:var(--hh-finish-frame) 24 / 18px / 0 stretch;
  background:none!important;
  opacity:1;box-shadow:none;filter:none;
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-detail-grid::before {
  clip-path:polygon(0 0,calc(100% - 12px) 0,100% 12px,100% 100%,12px 100%,0 calc(100% - 12px));
}
/* Legacy header/footer plates had square corners beyond the center frame bevel. */
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-detail-top {
  clip-path:polygon(0 0,calc(100% - 15px) 0,calc(100% - 3px) 12px,calc(100% - 3px) 100%,0 100%);
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-detail-top>.hhv2-result-cluster {
  padding-right:8px!important;
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-replay-dock {
  clip-path:polygon(7px 0,100% 0,100% calc(100% - 7px),calc(100% - 7px) 100%,12px 100%,0 calc(100% - 12px),0 7px);
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-list-panel::after,
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-detail-grid::after,
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-right-column::after {
  content:none!important;
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-left-stack {
  background:linear-gradient(180deg,rgba(1,16,29,.87),rgba(0,8,18,.92));
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-player-wrap {
  position:relative;isolation:isolate;
  background:radial-gradient(ellipse at 50% 40%,#06283c40,transparent 65%),
    linear-gradient(#1499c10d 1px,transparent 1px) 0 0/7px 7px,
    linear-gradient(90deg,#1499c10d 1px,transparent 1px) 0 0/7px 7px,
    linear-gradient(155deg,#03101eeb,#020d19c9)!important;
  border-color:#1b5f7d;
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-player-wrap::before {
  content:'PONDER POKER';position:absolute;left:8%;right:8%;top:53%;
  pointer-events:none;text-align:center;color:#14628366;
  font:400 clamp(12px,1.6vw,22px)/1.3 'Orbitron',sans-serif;
  letter-spacing:.25em;transform:skewX(-9deg);
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-player-wrap::after {
  content:none!important;
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-player-table {
  position:relative;z-index:1;background:linear-gradient(110deg,#021422f2,#010c17f2);
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-right-column>.hhv2-action-flow {
  border-color:transparent;background:transparent!important;box-shadow:none;
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell :is(.hhv2-archive-list-head,.hhv2-archive-detail-head,.hhv2-action-flow>.hhv2-section-title) {
  box-sizing:border-box;padding:4px 10px 0 18px!important;
}
@container hh-workspace (max-width:1099px) {
  #handHistoryV2Modal.hhv2-modal .hhv2-shell :is(.hhv2-list-panel,.hhv2-detail-grid) {
    --archive-heading-height:27px;
    --archive-list-footer-height:44px;
    --archive-replay-height:44px;
  }
  #handHistoryV2Modal.hhv2-modal .hhv2-shell :is(.hhv2-list-back-area,.hhv2-replay-dock) {
    padding:4px 12px 10px!important;
  }
  #handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-right-column>.hhv2-bottom-actions {
    padding:4px 16px 10px 12px!important;
  }
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell :is(.hhv2-archive-list-head,.hhv2-archive-detail-head,.hhv2-action-flow>.hhv2-section-title) {
  background:linear-gradient(110deg,#06334b80,#00101b90);
  color:#d1eaf7;text-shadow:none;box-shadow:none;
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-detail-top {background:linear-gradient(170deg,#062035dc,#010d1bee)!important;}
#handHistoryV2Modal.hhv2-modal .hhv2-shell :is(.hhv2-archive-list-head,.hhv2-archive-detail-head)>strong {text-shadow:none;}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-hand-row:not(.selected) {background:#00101b44!important;}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-hand-item:nth-child(even) .hhv2-hand-row:not(.selected) {background:#06304435!important;}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-list {
  padding:0 5px 4px!important;overflow-x:hidden;
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-hand-row.selected {
  overflow:hidden!important;clip-path:inset(0)!important;
  background:linear-gradient(90deg,#0593c1b3,#057dab99 45%,#06678b99)!important;
  box-shadow:inset 4px 0 #7aedff,inset -4px 0 #27d8fc,
    inset 0 1px #32d9fa,inset 0 -1px #22b9e5,
    inset 9px 0 15px #08ccff70,inset -9px 0 15px #08bfff60!important;
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-hand-row.selected::before {background:#b2f5ff;box-shadow:none;}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-hand-row.selected::after {
  opacity:1;background:linear-gradient(90deg,#19d9ff80,transparent) 4px 0/26px 100% no-repeat,
    linear-gradient(270deg,#13cfff75,transparent) right 4px top/24px 100% no-repeat;
}
html:is(.low-power,.low-power-mode) #handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-hand-row.selected {
  box-shadow:inset 4px 0 #7aedff,inset -4px 0 #27d8fc,inset 0 1px #32d9fa,inset 0 -1px #22b9e5!important;
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-card-section {
  --archive-edge:linear-gradient(120deg,#24d8ff,#138bb2 30%,#16516d 70%,#27c7f2);
  --archive-seam:linear-gradient(110deg,#166d8caa,#13344c77,#298aac88);
  background:url('/assets/ui/hh-board-glass.svg?v=20261007-history-frame-align-111-01') center/100% 100% no-repeat,
    radial-gradient(ellipse at 50% 0,#144b6866,transparent 68%),
    linear-gradient(165deg,#052239d9,#010b18ee 68%,#031c2ac9)!important;
  box-shadow:none;
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-card-section::after {
  background:linear-gradient(90deg,#28d4f8,transparent 27%,transparent 73%,#26c4ef)!important;
}
@container hh-workspace (min-width:1100px) {
  #handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-board-label {
    display:block!important;position:absolute;left:7px;top:4px;margin:0;
    font:500 9px/1 'Barlow Condensed',sans-serif;letter-spacing:.1em;color:#8ac9e3;
  }
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-replay-dock {
  --archive-edge:linear-gradient(100deg,#25cafa,#155474 30%,#16405e 75%,#be79ee);
  background:linear-gradient(170deg,#052237cc,#00101aee);box-shadow:none;
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hr-replay-entry>.hr-button {
  --archive-edge:linear-gradient(130deg,#6fdcff,#13bce9 34%,#1384b2 78%,#c181f1);
  background:linear-gradient(170deg,#053755,#011323 60%,#064361);
  color:#dff5ff;text-shadow:none;
  box-shadow:inset 0 -2px #17b9e6;
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hr-replay-entry>.hr-button>.hhv2-archive-icon {color:#3bd3fc;filter:drop-shadow(0 0 3px #05b9ee66);}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-action-scroll {
  display:flex;flex-direction:column;
  background:linear-gradient(165deg,#05203333,transparent 60%),
    url('/assets/ui/hh-terminal-circuit.svg?v=20261007-history-frame-align-111-01') right bottom/100% 100% no-repeat;
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-action-scroll>.hhv2-street {flex:none;}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-action-scroll::after {
  content:none!important;
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-street-title {text-shadow:none;}
#handHistoryV2Modal.hhv2-modal .hhv2-shell .hhv2-street-title::before {box-shadow:0 0 4px currentColor;}
#handHistoryV2Modal.hhv2-modal .hhv2-shell :is(.hhv2-list-back,.hhv2-bottom-actions button) {
  --archive-edge:linear-gradient(135deg,#2797bd,#17465e 60%,#ab6dd5);
  background:linear-gradient(180deg,#062537b8,#000b18e6);box-shadow:none;text-shadow:none;
}
#handHistoryV2Modal.hhv2-modal .hhv2-shell :is(.hhv2-list,.hhv2-action-scroll,.hhv2-player-wrap) {scrollbar-color:#1898c4 #03101d;}
/* Existing tab polygons, dimensions, spacing and hit areas are untouched. */
#handHistoryV2Modal.hhv2-modal .hhv2-shell :is(.hr-tabs [data-mode].active,.hhv2-header-tools .hhv2-filter.active) {
  --archive-edge:linear-gradient(130deg,#6cddfa,#12c0ef 40%,#187b9d 87%,#bf81eb);
  background:linear-gradient(170deg,#064360,#01121e 60%,#043651)!important;
  box-shadow:inset 0 -1px #22bced;text-shadow:none;
}
