/* Custom package builder */
.pb {
  --pb-green: #2c4b40;
  --pb-wash: #eef1e9;
  --pb-border: #d5dacf;
  --pb-muted: #526055;
  --pb-sheet: #fffefa;
  width: var(--content);
  margin: 0 auto clamp(48px, 7vw, 96px);
  color: var(--ink);
}
.pb *,
.pb *::before,
.pb *::after {
  box-sizing: border-box;
}
.pb-intro {
  margin: clamp(20px, 3vw, 42px) 0 clamp(20px, 2.6vw, 34px);
}
.pb h1,
.pb h2,
.pb h3,
.pb p {
  margin: 0;
}
.pb-intro h1 {
  font: 400 clamp(36px, 4.2vw, 64px)/1.05 var(--serif);
  letter-spacing: -0.04em;
}
.pb-intro p {
  margin-top: 10px;
  max-width: 65ch;
  line-height: 1.55;
  color: var(--pb-muted);
}
.pb-setup {
  max-width: 990px;
}
.pb .pb-setup-intro {
  text-align: center;
  margin-block: clamp(22px, 3.5vw, 50px) clamp(12px, 2vw, 22px);
}
.pb-setup-intro h1 {
  font-size: clamp(34px, 4vw, 56px);
  text-wrap: balance;
}
.pb-setup-intro p {
  margin-inline: auto;
  text-wrap: balance;
}
.pb-picker {
  margin-inline: auto;
}
.pb-picker-tools,
.pb-picker-footer {
  display: flex;
  gap: 8px 16px;
  align-items: center;
  flex-wrap: wrap;
}
.pb-picker-tools {
  justify-content: space-between;
  padding-block-end: 14px;
}
.pb-search { flex: 1 1 220px; max-width: 450px; }
.pb-search input {
  width: 100%; min-height: 46px; padding: 10px 14px;
  font: inherit; color: var(--ink); background: var(--pb-sheet);
  border: 1px solid #a7b2a7; border-radius: 8px;
}
.pb-search input:focus-visible { outline: 2px solid #466f9c; outline-offset: 1px; }
.pb-topics { display: grid; gap: 9px; }
.pb-topic { overflow: clip; border: 1px solid var(--pb-border); border-radius: 11px; background: var(--pb-sheet); }
.pb-topic > summary {
  display: flex; align-items: center; gap: 10px; min-height: 55px; padding: 9px 16px;
  list-style: none; cursor: pointer;
}
.pb-topic-label { min-width: 0; }
.pb-topic-label strong { display: block; font: 400 1.43rem/1.25 var(--serif); }
.pb-topic-label small { display: block; margin-top: 2px; font-size: .81rem; line-height: 1.4; color: var(--pb-muted); overflow-wrap: anywhere; }
.pb-topic[open] > summary .pb-topic-label small { display: none; }
@media (min-width: 801px) {
  .pb-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pb-topic[open] { grid-column: 1 / -1; }
}
.pb-topic [data-pb-topic-count] { margin-inline-start: auto; font-size: .82rem; color: var(--pb-green); }
.pb-topic-chevron { display: grid; place-items: center; color: var(--pb-green); }
.pb-topic[open] > summary { background: var(--pb-wash); }
.pb-topic[open] > summary .pb-topic-chevron { transform: rotate(180deg); }
.pb-topic > summary:focus-visible { outline-offset: -3px; }
.pb .pb-no-matches, .pb .pb-held-note { margin: 10px 0; color: var(--pb-muted); }
.pb-planned { padding: 16px 20px; background: var(--pb-wash); border: 1px solid var(--pb-border); border-radius: 12px; }
.pb-planned h2 { font: 400 1.5rem/1.2 var(--serif); }
.pb .pb-planned p { margin: 6px 0 12px; color: var(--pb-muted); }
.pb .pb-planned ul { display: flex; flex-wrap: wrap; gap: 7px; }
.pb-planned li { padding: 5px 10px; background: var(--pb-sheet); border-radius: 6px; overflow-wrap: anywhere; }
.pb-receipt-wishes { border-block-start: 1px solid var(--pb-border); padding: 15px 0; font-size: .89rem; }
.pb .pb-receipt-wishes ul { margin-top: 7px; display: grid; gap: 3px; color: var(--pb-muted); }
.pb [hidden] { display: none !important; }

.pb-picker-tools button,
.pb-edit-groups {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 6px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--pb-green);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  font: 600 .94rem/1.4 var(--sans);
}
.pb-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  border: 0;
  padding: 12px;
  margin: 0;
  min-inline-size: 0;
}
.pb-pick-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-content: center;
  align-items: center;
  min-height: 60px;
  gap: 2px 8px;
  padding: 6px 8px;
  min-width: 0;
  overflow: clip;
  background: var(--pb-sheet);
  border: 1px solid var(--pb-border);
  border-radius: 12px;
  cursor: pointer;
}
.pb-pick-card:has(input:checked) {
  background: #e7eee4;
  border-color: #3c604f;
  box-shadow: 0 0 0 1px #3c604f;
}
.pb-pick-card:has(input:focus-visible) {
  outline: 3px solid #466f9c;
  outline-offset: 3px;
}
.pb-pick-card input {
  position: relative;
  grid-row: 1;
  grid-column: 1;
  margin: 0;
  width: 23px;
  height: 23px;
  cursor: inherit;
  appearance: none;
  background: #fffefa;
  border: 1.5px solid #788779;
  border-radius: 6px;
}
.pb-pick-card input:checked {
  background: var(--pb-green);
  border-color: var(--pb-green);
}
.pb-pick-card input:checked::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 7px;
  width: 6px;
  height: 11px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.pb-pick-photo {
  display: grid;
  grid-row: 1;
  grid-column: 3;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 7px;
  background: #f2eae0;
}
.pb-pick-photo img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.pb-pick-label {
  grid-column: 2;
  grid-row: 1;
  display: block;
  color: var(--ink);
  font: 600 1rem/1.35 var(--sans);
  overflow-wrap: anywhere;
}
.pb-pick-note {
  grid-column: 2 / -1;
  display: block;
  color: var(--pb-muted);
  font: 500 .78rem/1.35 var(--sans);
}
.pb-picker-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  justify-content: space-between;
  margin-block-start: clamp(16px, 2vw, 25px);
  padding-block: 9px max(9px, env(safe-area-inset-bottom));
  padding-inline: 4px;
  background: var(--paper);
  border-block-start: 1px solid var(--pb-border);
  color: var(--pb-muted);
}
.pb .pb-continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 9px 26px;
  border: 1px solid var(--pb-green);
  border-radius: 8px;
  background: var(--pb-green);
  color: white;
  font-weight: 650;
}
.pb .pb-continue:disabled {
  background: #e5e9e1;
  border-color: #ccd4c7;
  color: #536054;
}
@media (hover: hover) {
  .pb-pick-card:hover { border-color: #738c7c; }
  .pb .pb-continue:hover:enabled { background: #1d392e; }
}
@media (forced-colors: active) {
  .pb-pick-card input { appearance: auto; }
  .pb-pick-card input:checked::after { content: none; }
  .pb-pick-card:has(input:checked) { outline: 1px solid Highlight; }
}
.pb-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.38fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(22px, 3vw, 48px);
}
.pb button,
.pb summary {
  cursor: pointer;
  font-family: inherit;
}
.pb button {
  color: inherit;
}
.pb button:disabled {
  cursor: default;
}
.pb button:focus-visible,
.pb a:focus-visible,
.pb summary:focus-visible {
  outline: 3px solid #466f9c;
  outline-offset: 2px;
}
.pb-receipt {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-width: 0;
  background: var(--pb-sheet);
  border: 1px solid var(--pb-border);
  border-radius: 14px;
  box-shadow: 0 4px 14px #26392e0c;
  overflow: clip;
}
.pb-receipt-head {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 20px;
  background-color: var(--pb-wash);
  border-bottom: 1px solid var(--pb-border);
}
.pb-receipt-head h2 {
  font: 400 clamp(23px, 2vw, 30px)/1.12 var(--serif);
  letter-spacing: -0.035em;
}
.pb-receipt-head [data-pb-count] {
  font-size: 0.84rem;
  color: var(--pb-muted);
}
.pb-list-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 40px;
  color: var(--pb-green);
  flex: none;
}
.pb-list-icon svg {
  width: 27px;
  height: 27px;
}
.pb .pb-mobile-toggle {
  display: none;
}
.pb summary::-webkit-details-marker {
  display: none;
}
.pb .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.pb ul {
  padding: 0;
  margin: 0;
  list-style: none;
}
.pb .pb-receipt-list {
  padding-inline: 20px;
}
.pb-receipt-group + .pb-receipt-group {
  border-top: 1px solid #e5e7de;
}
.pb-row-head,
.pb-line-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.pb-row-head {
  min-height: 44px;
}
.pb-row-head strong {
  font-size: 0.92rem;
  font-weight: 650;
}
.pb .pb-jump,
.pb .pb-remove {
  color: var(--pb-green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  border: 0;
  background: transparent;
  padding: 5px 2px;
  font-weight: 550;
}
.pb .pb-jump {
  min-height: 40px;
  font-size: 0.83rem;
}
.pb .pb-remove {
  min-height: 30px;
  font-size: 0.77rem;
}
.pb-jump:hover,
.pb-remove:hover {
  text-decoration-thickness: 2px;
}
.pb .pb-lines {
  margin: -2px 0 6px;
  border-left: 2px solid #a3b4a3;
  padding-left: 9px;
}
.pb-lines li + li {
  margin-top: 4px;
}
.pb-line-name {
  font-size: 0.86rem;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.pb-line-foot {
  font-size: 0.78rem;
  color: var(--pb-muted);
}
.pb-receipt-foot {
  margin-block-start: auto;
  border-top: 1px dashed #aab6a7;
  padding: 14px 20px;
}
.pb-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.89rem;
}
.pb-total strong {
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}
.pb .pb-buy {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  background: var(--pb-green);
  color: white;
  border: 0;
  border-radius: 7px;
  min-height: 46px;
  padding: 8px 14px;
  width: 100%;
  font-size: 0.98rem;
  font-weight: 650;
}
.pb .pb-buy:hover:enabled {
  background: #18382c;
}
.pb .pb-buy:disabled {
  background: #e5e9e1;
  color: #535e54;
}
.pb-buy-hint {
  display: block;
  text-align: center;
  margin-top: 7px;
  font-size: 0.77rem;
  color: var(--pb-muted);
}
.pb .pb-error {
  margin: 0;
  padding: 8px 14px;
  font-size: 0.87rem;
  background: #f8e9e2;
  color: #7a3327;
}
.pb-categories {
  display: grid;
  align-content: start;
  gap: 12px;
}
.pb-group {
  min-width: 0;
  border: 1px solid var(--pb-border);
  border-radius: 12px;
  background: var(--pb-sheet);
  overflow: clip;
  scroll-margin-top: 16px;
}
.pb-group[open] {
  border-color: #9fae9f;
}
.pb-group summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 70px;
  padding: 9px 18px;
}
.pb-group summary:focus-visible {
  outline-offset: -4px;
}
.pb-group summary:hover {
  background: #f2f4ed;
}
.pb-group[open] summary {
  background: var(--pb-wash);
}
.pb-thumb {
  display: grid;
  flex: none;
  place-items: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 9px;
  background: #e5e7dc;
}
.pb-thumb img,
.pb-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pb-group-label {
  flex: 1 1 auto;
  min-width: 0;
}
.pb-group-label strong,
.pb-group-label small {
  display: block;
}
.pb-group-label strong {
  font: 400 clamp(21px, 2vw, 28px)/1.15 var(--serif);
  letter-spacing: -0.025em;
}
.pb-group-label small {
  margin-top: 2px;
  font-size: 0.82rem;
  color: var(--pb-muted);
}
.pb-picked {
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--pb-green);
  background: #e2ebdc;
  padding: 4px 8px;
  border-radius: 12px;
  white-space: nowrap;
}
.pb-chevron {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  border: 1px solid #cad1c5;
  color: var(--pb-green);
  flex: none;
}
.pb-group[open] .pb-chevron svg,
.pb-receipt[data-expanded='true'] .pb-mobile-toggle svg {
  transform: rotate(180deg);
}
.pb-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}
.pb-card {
  min-width: 0;
  border: 1px solid #dedfd5;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fffefa;
}
.pb-card[data-selected='true'] {
  border-color: #728b75;
  box-shadow: inset 0 0 0 1px #728b75;
}
.pb-photo {
  display: block;
  aspect-ratio: 1.8;
  overflow: hidden;
  background: #f2eae0;
}
.pb-photo img {
  display: block;
  object-fit: contain;
  transition: transform 0.2s ease;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .pb-photo:hover img {
    transform: scale(1.03);
  }
}
.pb-card-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  align-items: stretch;
  justify-content: end;
  padding: 12px 14px;
}
.pb-card h3 {
  font-family: var(--sans);
  font-weight: 620;
  font-size: clamp(0.99rem, 1.25vw, 1.12rem);
  line-height: 1.35;
  letter-spacing: -0.015em;
  margin: 0 auto 6px 0;
  width: 100%;
  flex-grow: 1;
  overflow-wrap: anywhere;
}
.pb-card h3 a {
  color: inherit;
  text-decoration: none;
}
.pb-card h3 a:hover {
  text-decoration: underline;
}
.pb-price {
  display: flex;
  flex-direction: column;
  align-items: start;
  margin-bottom: 10px;
  font-size: 0.95rem;
  line-height: 1.35;
}
.pb-price small {
  color: var(--pb-muted);
  font-size: 0.77rem;
}
.pb-card [data-pb-controls] {
  min-height: 42px;
  display: flex;
  align-items: center;
}
.pb-add,
.pb-stepper {
  border: 1px solid #829585;
  border-radius: 6px;
  min-height: 42px;
}
.pb .pb-add {
  background: #f3f5ee;
  color: var(--pb-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 18px;
  font-weight: 650;
  font-size: 0.9rem;
  min-width: 112px;
}
.pb .pb-add:hover:enabled,
.pb-stepper button:hover:enabled {
  background: #e3eade;
}
.pb .pb-stepper {
  display: inline-flex;
  align-items: center;
  background: #eff3e9;
}
.pb-stepper button {
  display: grid;
  place-items: center;
  background: transparent;
  width: 42px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 5px;
}
.pb-stepper button:disabled {
  opacity: 0.4;
}
.pb-stepper span {
  min-width: 26px;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.pb-unavailable {
  color: var(--pb-muted);
  font-size: 0.9rem;
}
@media (min-width: 521px) and (max-width: 1100px) {
  .pb-picker-footer { padding-inline-end: 65px; }
}
@media (max-width: 800px) {
  .pb-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pb-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .pb-categories,
  .pb-receipt {
    width: 100%;
  }
  .pb-receipt {
    border-radius: 10px;
  }
  .pb-receipt[data-expanded='false'] {
    position: sticky;
    top: 0;
    z-index: 3;
  }
  .pb .pb-mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-left: auto;
    min-height: 40px;
    min-width: 60px;
    background: transparent;
    border: 0;
    font-size: 0.86rem;
    font-weight: 600;
  }
  .pb-receipt-head {
    padding: 8px 12px;
    gap: 8px;
  }
  .pb-receipt-head h2 {
    font-size: 23px;
  }
  .pb-receipt[data-expanded='false'] .pb-receipt-list,
  .pb-receipt[data-expanded='false'] .pb-buy-hint {
    display: none;
  }
  .pb-receipt[data-expanded='false'] .pb-receipt-foot {
    display: flex;
    align-items: center;
    flex-flow: row wrap;
    gap: 5px 10px;
    border-top: 0;
    justify-content: space-between;
    padding: 5px 12px;
  }
  .pb-receipt[data-expanded='false'] .pb-total {
    margin: 0;
    gap: 7px;
  }
  .pb-receipt[data-expanded='false'] .pb-buy {
    min-height: 40px;
    width: auto;
    font-size: 0.88rem;
  }
  .pb-receipt[data-expanded='false'] .pb-buy svg {
    width: 16px;
    height: 16px;
  }
  .pb-group {
    scroll-margin-top: 128px;
  }
}
@media (max-width: 520px) {
  .pb-picker-tools { gap: 4px 10px; }
  .pb-search { flex-basis: 150px; min-width: 125px; }
  .pb-picker-grid { padding: 8px; gap: 6px; }
  .pb-topic > summary { padding-inline: 12px; }
  .pb-pick-card { min-height: 55px; padding: 7px; gap: 1px 6px; }
  .pb-pick-card:has(.pb-pick-photo) { grid-template-columns: auto minmax(0, 1fr); }
  .pb-pick-photo { grid-column: 1; grid-row: 1; width: 25px; height: 25px; }
  .pb-pick-card:has(.pb-pick-photo) input { grid-row: 2; }
  .pb-pick-card:has(.pb-pick-photo) .pb-pick-label { grid-row: 1 / 3; }
  .pb-pick-card input { width: 21px; height: 21px; }
  .pb-pick-label { font-size: .90rem; hyphens: auto; }
  .pb .pb-planned { padding: 12px; }
  .pb-picker-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 8px;
    padding: 8px 68px max(8px, env(safe-area-inset-bottom)) 8px;
    background: var(--paper);
    font-size: .88rem;
  }
  .pb-picker-footer .pb-continue {
    min-height: 44px;
    padding-inline: 14px;
  }
  .pb {
    width: calc(100% - 24px);
  }
  .pb-intro {
    margin: 12px 3px 18px;
  }
  .pb-intro h1 {
    font-size: clamp(30px, 9vw, 41px);
  }
  .pb-intro p {
    font-size: 0.92rem;
  }
  .pb-group summary {
    min-height: 62px;
    padding: 7px 10px;
    gap: 9px;
  }
  .pb-thumb {
    width: 43px;
    height: 43px;
  }
  .pb-choices {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }
  .pb-card {
    display: grid;
    grid-template-columns: minmax(84px, 35%) minmax(0, 1fr);
  }
  .pb-photo {
    aspect-ratio: auto;
    height: 100%;
    min-height: 125px;
  }
  .pb-card-info {
    padding: 8px 10px;
  }
  .pb-price {
    margin-bottom: 6px;
  }
  .pb-receipt[data-expanded='false'] .pb-total {
    display: grid;
    gap: 0;
    font-size: 0.75rem;
  }
  .pb-total strong {
    font-size: 1rem;
  }
}
@media (max-height: 410px) {
  .pb-receipt[data-expanded='false'] {
    position: static;
  }
  .pb-group {
    scroll-margin-top: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pb-photo img {
    transition: none;
  }
}
