#picker[open] {
  display: block;
  overflow: auto;
  overscroll-behavior: contain;
}
#picker .dialog-head {
  position: sticky;
  top: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  column-gap: 8px;
  row-gap: 3px;
  min-height: 52px;
  padding-inline-end: 66px;
  z-index: 3;
}
#picker .dialog-head h2,
#picker .owned-count {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
#picker .dialog-head h2 { text-wrap: balance; }
#picker .dialog-head .close {
  position: absolute;
  inset-inline-end: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
}
#shop-name:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
#picker .roster {
  overflow: visible;
  scrollbar-gutter: auto;
}
#picker .shop-offer,
#picker .roster-option { min-width: 0; }
#shop-action {
  min-height: 48px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
@media (max-width: 355px) {
  #picker .dialog-head { column-gap: 6px; padding: 6px 58px 6px 8px; }
  #picker .dialog-head h2 { font-size: 20px; }
  #picker .owned-count { font-size: 12px; white-space: normal; }
}
@media (min-width: 840px), (orientation: landscape) and (max-height: 520px) and (min-width: 440px) {
  #picker[open] {
    display: grid;
    grid-template-columns: minmax(0,1.1fr) minmax(0,1fr);
    grid-template-rows: auto minmax(0,1fr) auto;
    width: min(850px,calc(100% - 30px));
    overflow: hidden;
  }
  #picker .dialog-head, #shop-notice { grid-column: 1 / -1; }
  #picker .shop-preview, #picker .roster { min-height: 0; overflow-y: auto; }
  #picker .shop-preview { align-content: start; border-bottom: 0; border-right: 1.5px solid var(--ink); }
  #picker .roster { grid-template-columns: repeat(2,minmax(0,1fr)); align-content: start; }
}
@media (min-width: 840px) and (min-height: 550px) {
  #picker .shop-preview { grid-template-columns: minmax(0,1fr); align-content: center; }
  #picker .shop-portrait { padding: 12px; }
  #picker #shop-art { height: clamp(140px,32vh,258px); }
  #picker .shop-offer { justify-items: center; text-align: center; }
}
@media (orientation: landscape) and (max-height: 520px) and (min-width: 440px) {
  #picker[open] { max-height: calc(100dvh - 14px); }
  #picker .dialog-head { padding-block: 4px; }
}
