/* Archive filters share the existing top-right toolbar; no second header row. */
#handHistoryV2Modal:not([data-history-scope="gameplay"]) .hhv2-shell {
  grid-template-rows:clamp(28px,4.9vh,38px) minmax(0,1fr)!important;
}
#handHistoryV2Modal .hhv2-header {
  position:relative;z-index:20;overflow:visible!important;
  height:100%!important;grid-template-rows:minmax(0,1fr)!important;
}
#handHistoryV2Modal .hhv2-header-tools {
  grid-template-columns:1fr 1.1fr .9fr 1.1fr .38fr!important;
}
/* Keep the original mode handlers and the original star button. */
#handHistoryV2Modal .hhv2-header-tools>.hhv2-filter:not(:last-child) {display:none!important;}
#handHistoryV2Modal .hhv2-filter-picker {position:relative;min-width:0;height:100%;}
#handHistoryV2Modal .hhv2-filter-category {
  position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:2px;width:100%;height:100%;min-width:0;padding:2px 10px 2px 4px;
  border:1px solid #315b76;border-radius:0;background:linear-gradient(180deg,#0d2336,#07111e);
  color:#9bb8ca;white-space:nowrap;cursor:pointer;touch-action:manipulation;
}
#handHistoryV2Modal .hhv2-filter-category>span {font:600 clamp(7px,.8vw,10px)/1 sans-serif;letter-spacing:.08em;}
#handHistoryV2Modal .hhv2-filter-category>strong {
  display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;
  font:600 clamp(9px,1.1vw,13px)/1 sans-serif;letter-spacing:.03em;
}
#handHistoryV2Modal .hhv2-filter-category>i {position:absolute;right:3px;top:50%;font:9px/1 sans-serif;}
#handHistoryV2Modal .hhv2-filter-category:is(.active,[aria-expanded="true"]) {
  border-color:#22cee7;color:#baf6ff;background:linear-gradient(180deg,#0c3345,#081c2b);
}
#handHistoryV2Modal .hhv2-filter-options {
  position:absolute;inset:calc(100% + 6px) auto auto 0;z-index:21;
  box-sizing:border-box;min-width:170px;max-width:calc(100vw - 24px);
  max-height:calc(100dvh - 75px);overflow:auto;padding:4px;
  border:1px solid #396680;background:#06101d;box-shadow:0 7px 18px #0008;
}
#handHistoryV2Modal .hhv2-filter-picker:nth-last-child(-n+3) .hhv2-filter-options {left:auto;right:0;}
#handHistoryV2Modal .hhv2-filter-options[hidden] {display:none!important;}
#handHistoryV2Modal .hhv2-filter-options>button {
  display:block;width:100%;min-height:34px;padding:7px 12px;border:0;border-radius:0;
  background:transparent;color:#bdd4e2;text-align:left;white-space:nowrap;
  font:500 12px/1.35 sans-serif;cursor:pointer;touch-action:manipulation;
}
#handHistoryV2Modal .hhv2-filter-options>button:is(:hover,:focus-visible) {background:#102a3b;color:#e3f9ff;}
#handHistoryV2Modal .hhv2-filter-options>button[aria-checked="true"] {background:#0b3040;color:#79e8f7;}
#handHistoryV2Modal .hhv2-filter-options>[data-hhv2-reset] {margin-top:4px;border-top:1px solid #26455c;color:#9abbd0;}
#handHistoryV2Modal .hhv2-filter-status {display:block;padding:6px 12px;color:#809eb1;font:10px/1.25 sans-serif;white-space:nowrap;}
#handHistoryV2Modal :is(.hhv2-filter-category,.hhv2-filter-options>button):focus-visible {outline:2px solid #69e4f5;outline-offset:-2px;}
#handHistoryV2Modal.hr-matches .hhv2-filter-options,
#handHistoryV2Modal[data-history-scope="gameplay"] .hhv2-filter-options {display:none!important;}
@media (max-width:700px), (max-height:500px) {
  #handHistoryV2Modal:not([data-history-scope="gameplay"]) .hhv2-shell {grid-template-rows:28px minmax(0,1fr)!important;}
  #handHistoryV2Modal .hhv2-header-tools {gap:3px!important;}
}
