.pss {
  position: absolute;
  z-index: var(--pss-z, 1050);
  box-sizing: border-box;
  max-height: 70vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-top: 4px;
  padding: 6px 0;
  background: var(--pss-bg, #fff);
  color: var(--pss-text, var(--ocps-text, #1f2933));
  border: 1px solid var(--pss-border, var(--ocps-border, rgba(17, 24, 39, 0.12)));
  border-radius: var(--pss-radius, var(--ocps-radius, 8px));
  box-shadow: var(--pss-shadow, 0 12px 32px rgba(17, 24, 39, 0.16));
  font-size: 14px;
  line-height: 1.35;
  text-align: left;
}

.pss[hidden] {
  display: none;
}

.pss *,
.pss *::before,
.pss *::after {
  box-sizing: border-box;
}

.pss__group {
  padding: 8px 14px 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--pss-muted, var(--ocps-muted, #6b7280));
}

.pss__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.pss__item:hover,
.pss__item:focus,
.pss__item.is-active {
  background: var(--pss-hover, rgba(47, 111, 237, 0.08));
  color: inherit;
  text-decoration: none;
  outline: none;
}

.pss__image {
  flex: 0 0 var(--pss-image, 48px);
  width: var(--pss-image, 48px);
  height: var(--pss-image, 48px);
  object-fit: contain;
  border-radius: 6px;
  background: #f7f7f8;
}

.pss__body {
  flex: 1 1 auto;
  min-width: 0;
}

.pss__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pss__name mark {
  padding: 0;
  background: var(--pss-mark, rgba(255, 213, 79, 0.45));
  color: inherit;
  border-radius: 2px;
}

.pss__brand {
  margin-bottom: 2px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pss-muted, var(--ocps-muted, #6b7280));
}

.pss__meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--pss-muted, var(--ocps-muted, #6b7280));
}

.pss__meta--oos {
  color: var(--pss-oos, var(--ocps-out-of-stock, #b42318));
}

.pss__price--zero {
  font-weight: 400;
}

.pss__price {
  flex: 0 0 auto;
  text-align: right;
  white-space: nowrap;
  font-weight: 600;
  color: var(--pss-price, var(--ocps-price, var(--pss-text, var(--ocps-text, #1f2933))));
}

.pss__old {
  display: block;
  font-size: 12px;
  font-weight: 400;
  text-decoration: line-through;
  color: var(--pss-price-old, var(--ocps-price-old, var(--pss-muted, var(--ocps-muted, #6b7280))));
}

.pss--inline {
  position: static;
  max-height: none;
  overflow: visible;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.pss__icon {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--pss-hover, rgba(47, 111, 237, 0.08));
  position: relative;
}

.pss__icon::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 2px solid var(--pss-accent, var(--ocps-brand, #2f6fed));
  border-radius: 3px;
}

.pss__icon--brand::before {
  border-radius: 50%;
}

.pss__icon--history::before {
  border-radius: 50%;
}

.pss__icon--history::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 11px;
  width: 4px;
  height: 5px;
  border-left: 2px solid var(--pss-accent, var(--ocps-brand, #2f6fed));
  border-bottom: 2px solid var(--pss-accent, var(--ocps-brand, #2f6fed));
}

.pss__icon--query::before {
  inset: 8px 12px 12px 8px;
  border-radius: 50%;
}

.pss__icon--query::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 10px;
  width: 7px;
  height: 2px;
  background: var(--pss-accent, var(--ocps-brand, #2f6fed));
  transform: rotate(45deg);
}

.pss-popular {
  margin: 0 0 20px;
  line-height: 2.2;
}

.pss-popular__label {
  margin-right: 6px;
  color: var(--pss-muted, var(--ocps-muted, #6b7280));
}

.pss-popular a {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 2px 12px;
  line-height: 1.8;
  color: var(--pss-accent, var(--ocps-brand, #2f6fed));
  background: var(--pss-hover, #f3f5f8);
  border-radius: 999px;
  text-decoration: none;
}

.pss-popular a:hover,
.pss-popular a:focus {
  color: var(--pss-accent-hover, var(--ocps-brand-hover, #2559c4));
  text-decoration: none;
  filter: brightness(0.97);
}

.pss__item--phrase .pss__name {
  font-weight: 600;
}

.pss__item--phrase .pss__name mark {
  font-weight: 400;
  background: none;
}

.pss-cats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px;
}

.pss-cats__label {
  margin-right: 4px;
  color: var(--pss-muted, var(--ocps-muted, #6b7280));
}

.pss-cats__item {
  display: inline-block;
  padding: 3px 12px;
  line-height: 1.8;
  color: var(--pss-accent, var(--ocps-brand, #2f6fed));
  background: rgba(47, 111, 237, 0.08);
  border-radius: 999px;
  text-decoration: none;
}

.pss-cats__item:hover,
.pss-cats__item:focus {
  text-decoration: none;
  filter: brightness(0.97);
}

.pss-cats__item.is-active {
  color: #fff;
  background: var(--pss-accent, var(--ocps-brand, #2f6fed));
}

.pss-cats__n {
  opacity: 0.7;
}

.pss__item--group .pss__meta {
  color: var(--pss-accent, var(--ocps-brand, #2f6fed));
}

.pss__hist {
  display: flex;
  align-items: center;
}

.pss__hist .pss__item {
  flex: 1 1 auto;
  min-width: 0;
}

.pss__remove {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  margin-right: 8px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  color: var(--pss-muted, var(--ocps-muted, #6b7280));
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.pss__remove:hover,
.pss__remove:focus {
  color: var(--pss-text, var(--ocps-text, #1f2933));
  background: var(--pss-hover, rgba(47, 111, 237, 0.08));
}

.pss__clear {
  display: block;
  width: max-content;
  min-height: 24px;
  margin: 4px 8px 2px auto;
  padding: 4px 6px;
  font-size: 13px;
  line-height: 16px;
  color: var(--pss-muted, var(--ocps-muted, #6b7280));
  border-radius: var(--pss-radius, var(--ocps-radius, 8px));
}

.pss__clear:hover,
.pss__clear.is-active {
  color: var(--pss-accent, var(--ocps-brand, #2f6fed));
}

.pss-sheet {
  position: fixed;
  inset: 0 0 auto 0;
  height: 100%;
  z-index: 1060;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.pss-sheet[hidden] {
  display: none;
}

.pss-sheet__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--pss-border, var(--ocps-border, rgba(17, 24, 39, 0.12)));
}

.pss-sheet__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  font-size: 16px;
  border: 1px solid var(--pss-border, var(--ocps-border, rgba(17, 24, 39, 0.2)));
  border-radius: var(--pss-radius, var(--ocps-radius, 8px));
  outline: none;
}

.pss-sheet__input:focus {
  border-color: var(--pss-accent, var(--ocps-brand, #2f6fed));
}

.pss-sheet__close {
  flex: 0 0 44px;
  height: 44px;
  font-size: 28px;
  line-height: 1;
  color: var(--pss-muted, var(--ocps-muted, #6b7280));
  background: none;
  border: 0;
  cursor: pointer;
}

.pss-sheet__body {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.pss-lock,
.pss-lock body {
  overflow: hidden;
}

.pss__note {
  margin: 2px 14px 6px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--pss-text, var(--ocps-text, #1f2933));
  background: var(--pss-hover, rgba(47, 111, 237, 0.08));
  border-radius: 6px;
}

.pss-notice {
  margin: 0 0 16px;
  padding: 10px 14px;
  background: rgba(47, 111, 237, 0.08);
  border-left: 3px solid var(--pss-accent, var(--ocps-brand, #2f6fed));
  border-radius: 4px;
}

.pss-notice__orig {
  color: var(--pss-muted, var(--ocps-muted, #6b7280));
}

.pss__empty {
  padding: 14px;
  color: var(--pss-muted, var(--ocps-muted, #6b7280));
}

.pss__all {
  position: sticky;
  bottom: -6px;
  display: block;
  margin: 6px 0 -6px;
  padding: 11px 12px;
  text-align: center;
  font-weight: 600;
  color: var(--pss-accent, var(--ocps-brand, #2f6fed));
  text-decoration: none;
  background: var(--pss-bg, #fff);
  border-top: 1px solid var(--pss-border, var(--ocps-border, rgba(17, 24, 39, 0.12)));
  box-shadow: 0 -6px 12px rgba(17, 24, 39, 0.06);
}

.pss__all:hover,
.pss__all.is-active {
  background: var(--pss-hover, rgba(47, 111, 237, 0.08));
  color: var(--pss-accent, var(--ocps-brand, #2f6fed));
  text-decoration: none;
}

.pss-sheet .pss__all {
  bottom: 0;
  margin: 6px 0 0;
  padding: 14px 12px;
}

.pss__status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.pss-busy {
  background-image: linear-gradient(90deg, transparent, rgba(47, 111, 237, 0.18), transparent);
  background-size: 200% 100%;
  animation: pss-busy 1s linear infinite;
}

@keyframes pss-busy {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pss-busy {
    animation: none;
  }
}
