/* Palworld shop + Build-a-Pal (palworld.html) – builds on style.css and the card styles in ark.css */
.pw-steps { grid-template-columns: repeat(3, 1fr); }
.pw-tabnote { margin: 0; color: var(--muted); font-size: 14px; font-weight: 700; }
.ark-card__media .pw-card__img { object-fit: contain; padding: 18px; }

/* Build-a-Pal */
.bp { display: grid; grid-template-columns: minmax(220px, 280px) 1fr minmax(240px, 300px); gap: 18px; align-items: start; }
.bp__picker, .bp__build, .bp__summary {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
}
.bp__search { max-width: none; width: 100%; margin-bottom: 12px; }
.bp__pals { display: flex; flex-direction: column; gap: 6px; max-height: 620px; overflow-y: auto; padding-right: 4px; }
.bp__pal {
  display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  text-align: left; padding: 6px 8px; border-radius: 12px; border: 1px solid transparent; background: var(--bg);
  color: var(--text); cursor: pointer; font: 600 14px "Nunito", sans-serif;
}
.bp__pal:hover { border-color: var(--line); }
.bp__pal.is-active { border-color: var(--purple); background: rgba(168, 85, 247, .14); }
.bp__pal b { grid-column: 2; overflow-wrap: anywhere; }
.bp__pal small { grid-column: 2; color: var(--muted); font-size: 12px; }
.bp__palimg { grid-row: 1 / span 2; position: relative; width: 40px; height: 40px; display: grid; place-items: center; font-size: 22px; }
.bp__palimg img, .bp__portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }

.bp__head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.bp__portrait {
  position: relative; flex: 0 0 auto; width: 84px; height: 84px; border-radius: 18px; display: grid; place-items: center; font-size: 40px;
  background: radial-gradient(circle at 50% 60%, rgba(168, 85, 247, .3), var(--bg) 70%); border: 1px solid var(--line);
}
.bp__name { margin: 0; font-size: 26px; }
.bp__sub { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.bp__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bp__field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.bp__field select {
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text);
  font: 700 15px "Nunito", sans-serif; text-transform: none; letter-spacing: 0;
}
.bp__field select:focus { outline: none; border-color: var(--purple); }
.bp__toggle { display: flex; align-items: center; gap: 10px; margin: 14px 0; font-weight: 700; cursor: pointer; }
.bp__toggle input { width: 20px; height: 20px; accent-color: var(--purple); }
.bp__toggle small { color: var(--muted); font-weight: 600; }

.bp__passives-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.bp__passives-head small { color: var(--muted); font-weight: 600; }
.bp__psearch {
  flex: 1 1 160px; max-width: 220px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: 600 14px "Nunito", sans-serif;
}
.bp__chosen { display: flex; flex-wrap: wrap; gap: 6px; min-height: 32px; margin-bottom: 10px; }
.bp__chip {
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--purple); background: rgba(168, 85, 247, .16);
  color: var(--text); font: 700 13px "Nunito", sans-serif; cursor: pointer;
}
.bp__hint { color: var(--muted); font-size: 13px; }
.bp__plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; max-height: 330px; overflow-y: auto; padding-right: 4px; }
.bp__passive {
  display: flex; flex-direction: column; gap: 1px; text-align: left; padding: 7px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); font: 700 13px "Nunito", sans-serif; cursor: pointer;
}
.bp__passive small { color: var(--muted); font-weight: 600; font-size: 12px; }
.bp__passive:hover:not([disabled]) { border-color: var(--purple); }
.bp__passive.is-active { border-color: var(--purple); background: rgba(168, 85, 247, .16); }
.bp__passive[disabled] { opacity: .45; cursor: default; }

.bp__summary { position: sticky; top: 90px; }
.bp__summary h3 { margin: 0 0 10px; }
.bp__lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.bp__lines li { display: flex; justify-content: space-between; gap: 10px; }
.bp__lines span { color: var(--muted); }
.bp__lines b { white-space: nowrap; }
.bp__total { display: flex; justify-content: space-between; align-items: baseline; margin: 12px 0; padding-top: 12px; border-top: 1px solid var(--line); }
.bp__total b { font: 700 28px "Oswald", sans-serif; color: var(--gold); }
.bp__note { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.bp__buy { font-size: 16px; padding: 12px 14px; }
.bp select:disabled, .bp input:disabled { opacity: .5; }
.bp > *, .bp__grid > *, .bp__field select { min-width: 0; max-width: 100%; }
.bp__field select { width: 100%; text-overflow: ellipsis; }

@media (max-width: 1100px) {
  .bp { grid-template-columns: minmax(200px, 250px) 1fr; }
  .bp__summary { grid-column: 1 / -1; position: static; }
}
@media (max-width: 760px) {
  .pw-steps { grid-template-columns: 1fr; }
  .bp { grid-template-columns: 1fr; }
  .bp__pals { max-height: 300px; }
  .bp__grid { grid-template-columns: 1fr; }
  .bp__psearch { max-width: none; }
}
