.ps-modal-open { overflow: hidden; }

.ps-dialog {
  --ps-paper: #fffcf5;
  --ps-ink: #241c2d;
  --ps-subtle: #635a67;
  --ps-line: #ddd7d4;
  --ps-violet: #58409a;
  box-sizing: border-box;
  width: min(35rem, calc(100vw - 2rem));
  max-width: none;
  max-height: min(85dvh, 56rem);
  margin: auto;
  padding: 0;
  color: var(--ps-ink);
  background: var(--ps-paper);
  border: 1.5px solid var(--ps-ink);
  border-radius: 1.15rem;
  box-shadow: 0 .6rem 0 -.35rem var(--ps-ink), 0 1.25rem 5rem #21122d40;
  font-family: var(--body, Arial, sans-serif);
  font-size: 1rem;
  overflow: auto;
  overscroll-behavior: contain;
}
.ps-dialog.ps-wide { width: min(48rem, calc(100vw - 2rem)); }
.ps-dialog::backdrop { background: rgb(34 22 44 / .5); }
.ps-dialog [hidden] { display: none !important; }
.ps-dialog button, .ps-dialog input { font: inherit; }
.ps-dialog button { cursor: pointer; }
.ps-dialog :is(input, button, a):focus-visible {
  outline: 3px solid var(--ps-violet);
  outline-offset: 3px;
}
.ps-dialog .ps-title:focus { outline: none; }
.ps-content { position: relative; min-width: 0; }
.ps-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  padding: .85rem .85rem 0 1.65rem;
}
.ps-close, .ps-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ps-ink);
  background: var(--ps-paper);
  border: 1px solid var(--ps-line);
  border-radius: 2rem;
}
.ps-close {
  width: 2.4rem;
  height: 2.4rem;
  margin-left: auto;
  padding: 0;
}
.ps-close span { font: 400 1.65rem/1 Arial, sans-serif; }
.ps-back { min-height: 2.4rem; padding: .4rem .95rem; font-size: .875rem !important; }
.ps-close:hover, .ps-back:hover { background: #f0e9fb; border-color: var(--ps-violet); }
.ps-pad { padding: .4rem clamp(1.4rem, 4vw, 2.5rem) 2.25rem; }
.ps-dialog .ps-title {
  margin: 0 0 1.2rem;
  color: var(--ps-ink);
  font-family: var(--display, Arial, sans-serif);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.ps-kicker, .ps-search-label, .ps-result-count {
  margin: 0 0 .65rem;
  color: var(--ps-subtle);
  font-size: .84rem;
  font-weight: 650;
}
.ps-kicker { color: var(--ps-violet); }
.ps-description { margin: .75rem 0 1.5rem; color: var(--ps-subtle); line-height: 1.6; }
.ps-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 2.85rem;
  margin-top: .2rem;
  padding: .55rem 1.4rem;
  color: #fffcf5;
  background: var(--ps-ink);
  border: 1.5px solid var(--ps-ink);
  border-radius: 2rem;
  font-weight: 700 !important;
}
.ps-button:hover { background: var(--ps-violet); border-color: var(--ps-violet); }
.ps-button-secondary { color: var(--ps-ink); background: transparent; }
.ps-button-secondary:hover { color: var(--ps-ink); background: #f0e9fb; }
.ps-about {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: stretch;
  gap: clamp(1.4rem, 3vw, 2.1rem);
  padding: .5rem clamp(1.4rem, 3.5vw, 2rem) 2rem;
}
.ps-about-art {
  display: grid;
  place-items: center;
  min-width: 0;
  border-radius: .65rem;
  background: #e4d9fc;
}
.ps-cover {
  box-sizing: border-box;
  display: block;
  width: 3.1rem;
  aspect-ratio: .73;
  position: relative;
  flex: none;
}
.ps-list { list-style: none; margin: 0 0 1.1rem; padding: 0; }
.ps-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--ps-line);
}
.ps-book-link {
  display: flex;
  flex: 1;
  align-items: center;
  gap: .95rem;
  min-width: 0;
  padding: .1rem 0;
  color: inherit;
  text-align: left;
  text-decoration: none;
}
.ps-book-link:hover .ps-row-name { text-decoration: underline; text-underline-offset: .18em; }
.ps-row-info { display: grid; align-content: center; gap: .33rem; }
.ps-row-name { font-weight: 750; line-height: 1.2; }
.ps-meta { color: var(--ps-subtle); font-size: .81rem; }
.ps-price { color: var(--ps-ink); font-weight: 700; }
.ps-search-label { display: block; }
.ps-input {
  box-sizing: border-box;
  width: 100%;
  padding: .8rem .9rem;
  color: var(--ps-ink);
  background: white;
  border: 1px solid #8b818b;
  border-radius: .5rem;
}
.ps-result-count { margin: 1rem 0 .3rem; }
.ps-choices { display: grid; gap: .45rem; }
.ps-choice {
  display: grid;
  gap: .22rem;
  width: 100%;
  padding: .8rem .95rem;
  color: var(--ps-ink);
  background: #fffdf9;
  border: 1px solid var(--ps-line);
  border-radius: .5rem;
  text-align: left;
}
.ps-choice span { color: var(--ps-subtle); font-size: .86rem; line-height: 1.4; }
.ps-choice:hover { background: #f0e9fb; border-color: var(--ps-violet); }
.ps-about .ps-pad { align-self: center; padding: .5rem 0; }
.ps-about-art { align-items: end; padding: 1.25rem .75rem 0; overflow: hidden; }
.ps-about-art img { display: block; width: 100%; max-width: 14rem; }

@media (max-width: 38rem) {
  .ps-dialog, .ps-dialog.ps-wide { width: calc(100vw - 1rem); max-height: 92dvh; }
  .ps-about { grid-template-columns: 1fr; gap: 1.35rem; }
  .ps-about-art img { width: 7.25rem; }
  .ps-tools { padding-left: 1.25rem; }
  .ps-pad { padding-bottom: 1.5rem; }
  .ps-row { gap: .55rem; }
  .ps-book-link { gap: .7rem; }
  .ps-row-name { font-size: .95rem; }
}
