.bdx-account-page {
  --bdx-bg: #f7f8fa;
  --bdx-panel: #ffffff;
  --bdx-card: #f1f2f7;
  --bdx-card-2: #f7f8fb;
  --bdx-ink: #111418;
  --bdx-muted: #858991;
  --bdx-line: rgba(17, 20, 24, .12);
  --bdx-blue: #0a84ff;
  --bdx-orange: #ff8a1c;
  --bdx-yellow: #ffc107;
  --bdx-red: #ff3b48;
  --bdx-green: #27c466;
  --bdx-purple: #d777ea;
  min-height: 100vh;
  color: var(--bdx-ink);
  background: var(--bdx-bg);
}

.bdx-account-page.is-bdx-modal-open {
  overflow: hidden;
}

.bdx-account-page .site-header {
  background: rgba(255, 255, 255, .92);
  border-bottom-color: rgba(17, 20, 24, .05);
}

.bdx-account-page .bdx-app-shell {
  width: min(1840px, calc(100% - 44px));
  max-width: none;
}

.bdx-account-hero {
  padding: 34px 0 18px;
}

.bdx-account-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.bdx-account-title,
.bdx-app-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bdx-account-title img {
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(18, 28, 45, .12);
}

.bdx-account-title strong,
.bdx-account-title span {
  display: block;
}

.bdx-account-title strong {
  font-size: 1.08rem;
}

.bdx-account-title span {
  color: var(--bdx-muted);
  font-size: .9rem;
}

.bdx-auth-shell {
  padding: 16px 0 76px;
}

.bdx-auth-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 410px);
  gap: 28px;
  padding: clamp(24px, 5vw, 46px);
  border: 1px solid var(--bdx-line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, .84)),
    url("/assets/brickdisplay/ipad/collection.jpg") center / cover;
  box-shadow: 0 28px 70px rgba(18, 28, 45, .12);
}

.bdx-auth-card h1 {
  max-width: 760px;
  margin: 8px 0 0;
  font-size: clamp(2.4rem, 6vw, 4.9rem);
  line-height: .95;
  letter-spacing: 0;
}

.bdx-auth-card p {
  max-width: 600px;
  margin: 18px 0 0;
  color: var(--bdx-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.bdx-mode-kicker {
  color: var(--bdx-blue);
  font-size: .74rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.bdx-auth-form,
.bdx-item-form {
  display: grid;
  align-content: start;
  gap: 12px;
}

.bdx-auth-form {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 18px 40px rgba(18, 28, 45, .11);
  backdrop-filter: blur(18px);
}

.bdx-provider-actions {
  display: grid;
  gap: 10px;
}

.bdx-provider-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid #dadce0;
  border-radius: 8px;
  color: var(--bdx-ink);
  background: #fff;
  box-shadow: 0 1px 2px rgba(18, 28, 45, .08);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.bdx-provider-button svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.bdx-provider-button.apple {
  border-color: #000;
  color: #fff;
  background: #000;
}

.bdx-provider-button:hover,
.bdx-provider-button:focus-visible {
  transform: translateY(-1px);
}

.bdx-provider-button:disabled {
  cursor: not-allowed;
  opacity: .58;
  transform: none;
}

.bdx-auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--bdx-muted);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.bdx-auth-divider::before,
.bdx-auth-divider::after {
  content: "";
  height: 1px;
  background: var(--bdx-line);
}

.bdx-app-shell {
  display: grid;
  gap: 18px;
  align-items: start;
  padding: 16px 0 78px;
}

.bdx-app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 66px;
}

.bdx-app-title img {
  flex: 0 0 auto;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(18, 28, 45, .12);
}

.bdx-app-title h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1;
  letter-spacing: 0;
}

.bdx-app-title p {
  margin: 5px 0 0;
  color: var(--bdx-muted);
  font-size: .92rem;
  font-weight: 700;
}

.bdx-app-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.bdx-account-menu {
  position: relative;
}

.bdx-account-menu summary,
.bdx-add-card > summary,
.bdx-item-details summary {
  list-style: none;
}

.bdx-account-menu summary::-webkit-details-marker,
.bdx-add-card > summary::-webkit-details-marker,
.bdx-item-details summary::-webkit-details-marker {
  display: none;
}

.bdx-account-menu summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  max-width: 290px;
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--bdx-line);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(18, 28, 45, .06);
  cursor: pointer;
}

.bdx-account-menu img {
  border-radius: 8px;
}

.bdx-account-menu span {
  overflow: hidden;
  color: #3d4651;
  font-size: .86rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bdx-profile-panel {
  position: absolute;
  z-index: 4;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid var(--bdx-line);
  border-radius: 14px;
  color: var(--bdx-ink);
  background: #fff;
  box-shadow: 0 18px 42px rgba(18, 28, 45, .14);
}

.bdx-profile-panel p {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  color: var(--bdx-muted);
  font-size: .78rem;
  font-weight: 780;
}

.bdx-profile-panel strong {
  overflow-wrap: anywhere;
  color: var(--bdx-ink);
  text-align: right;
}

.bdx-profile-panel small {
  display: block;
  padding: 10px 12px;
  border: 1px solid rgba(255, 138, 28, .24);
  border-radius: 12px;
  color: var(--bdx-muted);
  background: #fff8ee;
  font-size: .75rem;
  font-weight: 720;
  line-height: 1.4;
}

.bdx-profile-panel button,
.bdx-reset-link {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--bdx-line);
  border-radius: 999px;
  color: var(--bdx-ink);
  background: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.bdx-profile-panel button.danger {
  border-color: rgba(255, 59, 72, .28);
  color: #a11624;
  background: #fff5f6;
}

.bdx-profile-sensitive {
  display: grid;
  gap: 6px;
}

.bdx-profile-sensitive[hidden] {
  display: none;
}

.bdx-profile-sensitive label {
  color: var(--bdx-muted);
  font-size: .76rem;
  font-weight: 820;
}

.bdx-profile-sensitive input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--bdx-line);
  border-radius: 10px;
  color: var(--bdx-ink);
  background: #fff;
  font: inherit;
  font-size: .9rem;
}

.bdx-reset-link {
  justify-self: start;
  border: 0;
  color: var(--bdx-blue);
  background: transparent;
  padding-inline: 0;
}

.bdx-auth-note {
  margin: 0;
  color: var(--bdx-muted);
  font-size: .76rem;
  font-weight: 720;
  line-height: 1.45;
}

.bdx-mode-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  border-bottom: 1px solid rgba(17, 20, 24, .08);
}

.bdx-mode-tab {
  position: relative;
  min-width: 0;
  min-height: 64px;
  padding: 0 10px 15px;
  border: 0;
  color: #8b8d93;
  background: transparent;
  font: inherit;
  font-size: clamp(1rem, 1.4vw, 1.36rem);
  font-weight: 900;
  text-align: center;
  cursor: pointer;
}

.bdx-mode-tab::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 4px;
  border-radius: 999px;
  background: transparent;
}

.bdx-mode-tab:hover,
.bdx-mode-tab:focus-visible,
.bdx-mode-tab.is-active {
  color: var(--bdx-blue);
}

.bdx-mode-tab.is-active::after {
  background: var(--bdx-blue);
}

.bdx-mode-tab div {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
}

.bdx-mode-tab span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bdx-mode-tab strong {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  color: #626873;
  background: #e8ebf0;
  font-size: .78rem;
}

.bdx-mode-tab.is-active strong {
  color: #fff;
  background: var(--bdx-blue);
}

.bdx-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(18, 28, 45, .07);
}

.bdx-summary-stat {
  min-width: 0;
  padding: 15px 18px;
  border: 1px solid rgba(17, 20, 24, .09);
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfcff, #f5f6fb);
}

.bdx-summary-stat span,
.bdx-summary-stat strong {
  display: block;
  text-align: center;
}

.bdx-summary-stat span {
  overflow: hidden;
  color: #858991;
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.bdx-summary-stat span::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--bdx-yellow);
  vertical-align: 1px;
}

.bdx-summary-stat.pieces span::before {
  background: var(--bdx-red);
}

.bdx-summary-stat.paid span::before {
  background: var(--bdx-blue);
}

.bdx-summary-stat.value span::before {
  background: var(--bdx-green);
}

.bdx-summary-stat strong {
  margin-top: 8px;
  color: #07090c;
  font-size: clamp(1.5rem, 2.4vw, 2.05rem);
  letter-spacing: 0;
  line-height: 1.08;
}

.bdx-control-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.bdx-toolbar {
  display: flex;
  flex: 1 1 380px;
  max-width: 520px;
}

.bdx-toolbar input {
  width: 100%;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--bdx-line);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(18, 28, 45, .05);
  font: inherit;
}

.bdx-add-card {
  position: relative;
  min-width: min(100%, 520px);
}

.bdx-add-card > summary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255, 138, 28, .25);
  border-radius: 999px;
  color: var(--bdx-orange);
  background: #fff4e8;
  box-shadow: 0 8px 22px rgba(255, 138, 28, .12);
  font-weight: 900;
  cursor: pointer;
}

.bdx-add-card > summary::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 20px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: #fff;
  background: var(--bdx-orange);
  font-weight: 900;
}

.bdx-add-card[open] > summary::before {
  content: "-";
}

.bdx-add-card .bdx-item-form {
  position: absolute;
  z-index: 3;
  right: 0;
  width: min(560px, calc(100vw - 44px));
  max-height: calc(100vh - 150px);
  overflow: auto;
  margin-top: 10px;
  padding: 16px;
  border: 1px solid var(--bdx-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 28px 65px rgba(18, 28, 45, .18);
}

.bdx-add-search-panel,
.bdx-selected-set,
.bdx-add-collection-details,
.bdx-manual-fields {
  border: 1px solid rgba(17, 20, 24, .08);
  border-radius: 8px;
  background: #f6f7fa;
}

.bdx-add-search-panel,
.bdx-add-collection-details,
.bdx-manual-fields {
  display: grid;
  gap: 12px;
  padding: 13px;
}

.bdx-add-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.bdx-add-help {
  margin: 0;
  color: var(--bdx-muted);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.35;
}

.bdx-set-results {
  overflow: hidden;
  border: 1px solid rgba(17, 20, 24, .08);
  border-radius: 8px;
  background: #fff;
}

.bdx-set-result-list {
  display: grid;
  max-height: 374px;
  overflow: auto;
}

.bdx-set-result {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 10px;
  border: 0;
  border-bottom: 1px solid rgba(17, 20, 24, .08);
  color: var(--bdx-ink);
  background: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.bdx-set-result:last-child {
  border-bottom: 0;
}

.bdx-set-result:hover,
.bdx-set-result:focus-visible {
  background: #eef5ff;
}

.bdx-set-result:focus-visible {
  outline: 3px solid rgba(10, 132, 255, .3);
  outline-offset: -3px;
}

.bdx-set-result-image {
  display: grid;
  place-items: center;
  width: 62px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: #f4f5f8;
}

.bdx-set-result-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
}

.bdx-set-result-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.bdx-set-result-copy strong {
  overflow: hidden;
  color: var(--bdx-blue);
  font-size: .95rem;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bdx-set-result-copy span,
.bdx-selected-set span {
  overflow: hidden;
  color: #6f7781;
  font-size: .78rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bdx-set-results-message {
  margin: 0;
  padding: 12px;
  color: #5d6670;
  font-size: .82rem;
  font-weight: 750;
  line-height: 1.4;
}

.bdx-set-results-message.error {
  color: #8f1f2b;
}

.bdx-selected-set {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: #fff;
}

.bdx-selected-set img {
  width: 78px;
  aspect-ratio: 1;
  object-fit: contain;
  padding: 5px;
  border-radius: 8px;
  background: #f5f6fa;
}

.bdx-selected-set strong {
  display: block;
  overflow: hidden;
  color: var(--bdx-blue);
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bdx-manual-fields summary {
  color: #46515d;
  font-size: .86rem;
  font-weight: 950;
  cursor: pointer;
  list-style: none;
}

.bdx-manual-fields summary::-webkit-details-marker {
  display: none;
}

.bdx-manual-fields summary::after {
  content: "Edit catalogue fields";
  float: right;
  color: var(--bdx-muted);
  font-size: .72rem;
  font-weight: 800;
}

.bdx-manual-fields[open] summary {
  padding-bottom: 2px;
}

.bdx-add-collection-details h3 {
  margin: 0;
  color: var(--bdx-ink);
  font-size: 1rem;
  letter-spacing: 0;
}

.bdx-add-collection-details .bdx-list-segmented {
  max-width: none;
}

.bdx-workspace {
  min-width: 0;
}

.bdx-workspace-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 16px;
}

.bdx-workspace-top h1 {
  max-width: 760px;
  margin: 5px 0 0;
  font-size: clamp(1.8rem, 2.8vw, 2.8rem);
  line-height: 1;
  letter-spacing: 0;
}

.bdx-workspace-top p {
  max-width: 600px;
  margin: 8px 0 0;
  color: var(--bdx-muted);
  font-size: .95rem;
  line-height: 1.45;
}

.bdx-mode-callout {
  flex: 0 1 430px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 138, 28, .3);
  border-radius: 14px;
  color: #6f4300;
  background: linear-gradient(135deg, #fff7eb, #fff);
  box-shadow: 0 14px 30px rgba(255, 138, 28, .12);
}

.bdx-mode-callout[hidden] {
  display: none;
}

.bdx-mode-callout strong,
.bdx-mode-callout span {
  display: block;
}

.bdx-mode-callout strong {
  color: #111418;
  font-size: .95rem;
  font-weight: 900;
}

.bdx-mode-callout span {
  margin-top: 5px;
  font-size: .86rem;
  font-weight: 780;
  line-height: 1.42;
}

.bdx-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.bdx-items.is-collector {
  display: block;
}

.bdx-item-card,
.bdx-empty,
.bdx-collector-theme {
  border: 1px solid rgba(17, 20, 24, .08);
  border-radius: 8px;
  background: var(--bdx-card);
  box-shadow: 0 12px 28px rgba(18, 28, 45, .08);
}

.bdx-item-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.bdx-item-card:hover,
.bdx-item-card:focus-visible {
  border-color: rgba(10, 132, 255, .38);
  box-shadow: 0 18px 38px rgba(18, 28, 45, .13);
  transform: translateY(-2px);
}

.bdx-item-card:focus-visible {
  outline: 3px solid rgba(10, 132, 255, .32);
  outline-offset: 3px;
}

.bdx-item-image {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #f7f7fb;
}

.bdx-item-image img {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  padding: 14px 14px 12px;
}

.bdx-item-image-placeholder {
  display: grid;
  place-items: center;
  width: 62px;
  aspect-ratio: 1;
  border-radius: 8px;
  color: rgba(17, 20, 24, .45);
  background: rgba(255, 255, 255, .78);
  font-weight: 900;
}

.bdx-item-image:not(.is-missing) .bdx-item-image-placeholder {
  display: none;
}

.bdx-card-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-width: calc(100% - 24px);
  pointer-events: none;
}

.bdx-item-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 168px;
  padding: 14px;
}

.bdx-item-topline {
  display: grid;
  justify-items: center;
  min-width: 0;
  text-align: center;
}

.bdx-item-title {
  min-width: 0;
}

.bdx-item-title h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--bdx-blue);
  font-size: 1.04rem;
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.bdx-item-title p {
  margin: 8px 0 0;
  color: #7b808a;
  font-size: .9rem;
  font-weight: 850;
}

.bdx-card-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  min-height: 66px;
  margin-top: auto;
}

.bdx-card-facts,
.bdx-item-meta,
.bdx-collector-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.bdx-card-facts {
  align-items: flex-start;
  align-content: flex-end;
  flex: 1 1 auto;
  justify-content: flex-start;
  min-width: 0;
}

.bdx-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 25px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #555b66;
  background: #e7eaf0;
  font-size: .74rem;
  font-weight: 850;
  line-height: 1;
  overflow-wrap: normal;
  white-space: nowrap;
  word-break: normal;
}

.bdx-pill.theme {
  overflow: hidden;
  color: #fff;
  background: rgba(215, 119, 234, .88);
  font-size: .84rem;
  text-overflow: ellipsis;
}

.bdx-pill.wishlist {
  color: #fff;
  background: var(--bdx-purple);
}

.bdx-pill.quantity {
  color: #fff;
  background: var(--bdx-orange);
}

.bdx-pill.condition {
  color: #fff;
  background: var(--bdx-green);
}

.bdx-pill.opened {
  color: #fff;
  background: var(--bdx-blue);
}

.bdx-pill.incomplete {
  color: #151515;
  background: var(--bdx-yellow);
}

.bdx-pill.special {
  color: #fff;
  background: #bf22d8;
}

.bdx-pill.retired {
  color: #fff;
  background: var(--bdx-red);
}

.bdx-pill.card-status {
  flex: 0 0 auto;
  align-self: flex-end;
  max-width: none;
  min-width: 48px;
  min-height: 38px;
  padding: 7px 12px;
  font-size: .8rem;
}

.bdx-build-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe3ea;
}

.bdx-build-progress span {
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  border-radius: inherit;
  background: var(--bdx-orange);
}

.bdx-item-edit {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 0;
}

.bdx-item-edit .bdx-field:nth-last-child(3),
.bdx-item-edit .bdx-field:nth-last-child(2) {
  grid-column: 1 / -1;
}

.bdx-field {
  display: grid;
  gap: 6px;
}

.bdx-field label {
  color: #46515d;
  font-size: .73rem;
  font-weight: 850;
}

.bdx-field input,
.bdx-field select,
.bdx-field textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--bdx-line);
  border-radius: 8px;
  color: var(--bdx-ink);
  background: #fff;
  font: inherit;
}

.bdx-field textarea {
  min-height: 76px;
  resize: vertical;
}

.bdx-form-row,
.bdx-auth-actions,
.bdx-account-actions,
.bdx-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.bdx-form-row > * {
  flex: 1 1 118px;
}

.bdx-account-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff;
  background: var(--bdx-blue);
  font: inherit;
  font-size: .88rem;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.bdx-account-button.secondary {
  border-color: var(--bdx-line);
  color: var(--bdx-ink);
  background: #fff;
}

.bdx-account-button.danger {
  color: #9f1d2a;
  border-color: rgba(255, 59, 72, .24);
  background: #fff1f2;
}

.bdx-account-button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.bdx-status {
  margin: 0 0 14px;
  padding: 11px 13px;
  border-radius: 8px;
  color: #375246;
  background: #eaf7ef;
  font-size: .84rem;
  line-height: 1.45;
}

.bdx-status.error {
  color: #8f1f2b;
  background: #fff1f2;
}

.bdx-detail-modal {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
}

.bdx-detail-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(17, 20, 24, .46);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.bdx-detail-dialog {
  position: relative;
  width: min(820px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid rgba(17, 20, 24, .14);
  border-radius: 8px;
  background: #f9faf9;
  box-shadow: 0 34px 90px rgba(0, 0, 0, .24);
}

.bdx-edit-toolbar {
  position: sticky;
  z-index: 4;
  top: 0;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 132px;
  align-items: center;
  min-height: 82px;
  padding: 10px 20px;
  border-bottom: 1px solid rgba(17, 20, 24, .08);
  background: rgba(249, 250, 249, .94);
  backdrop-filter: blur(14px);
}

.bdx-edit-toolbar h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
}

.bdx-edit-toolbar-actions {
  display: inline-flex;
  justify-self: end;
  padding: 4px;
  border: 1px solid rgba(17, 20, 24, .11);
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 8px 22px rgba(18, 28, 45, .07);
}

.bdx-edit-icon {
  display: grid;
  place-items: center;
  width: 46px;
  aspect-ratio: 1;
  border: 1px solid rgba(17, 20, 24, .12);
  border-radius: 999px;
  color: var(--bdx-ink);
  background: rgba(255, 255, 255, .9);
  font: inherit;
  font-size: 1.75rem;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.bdx-edit-toolbar-actions .bdx-edit-icon {
  border: 0;
  background: transparent;
}

.bdx-edit-icon:hover,
.bdx-edit-icon:focus-visible {
  background: #fff;
}

.bdx-edit-icon.danger {
  color: #111418;
}

.bdx-edit-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.bdx-detail-body {
  display: block;
  padding: 26px 22px 28px;
}

.bdx-detail-image {
  width: min(310px, 66vw);
  margin: 0 auto;
  border: 0;
  background: transparent;
  aspect-ratio: 1 / 1;
}

.bdx-detail-image img {
  padding: 0;
}

.bdx-edit-hero {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 12px 10px 20px;
  border-bottom: 1px solid rgba(17, 20, 24, .11);
  text-align: center;
}

.bdx-edit-hero h3 {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--bdx-ink);
  font-size: clamp(1.8rem, 4.5vw, 2.55rem);
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: 0;
}

.bdx-edit-hero p {
  margin: 0;
  color: #7a7f88;
  font-size: 1.1rem;
  font-weight: 850;
}

.bdx-detail-facts {
  justify-content: center;
  margin-top: 2px;
}

.bdx-detail-dialog .bdx-item-edit {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 20px 10px 0;
}

.bdx-edit-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.bdx-edit-tile,
.bdx-edit-section,
.bdx-edit-advanced {
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .84), rgba(245, 247, 247, .96));
  box-shadow: inset 0 1px rgba(255, 255, 255, .86);
}

.bdx-edit-tile {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 94px;
  padding: 17px 20px;
}

.bdx-edit-tile span,
.bdx-edit-section h3,
.bdx-edit-date span {
  color: #7c8088;
  font-weight: 900;
}

.bdx-edit-tile span {
  font-size: .98rem;
}

.bdx-edit-tile strong {
  min-width: 0;
  color: var(--bdx-ink);
  font-size: 1.45rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.bdx-edit-money div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.bdx-edit-money small {
  color: #8b8f98;
  font-size: 1rem;
  font-weight: 900;
}

.bdx-edit-money input {
  min-width: 0;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  color: var(--bdx-ink);
  background: transparent;
  font-size: 1.45rem;
  font-weight: 950;
  line-height: 1.05;
}

.bdx-edit-profit strong {
  color: var(--bdx-green);
}

.bdx-edit-profit strong.is-loss {
  color: var(--bdx-red);
}

.bdx-edit-section {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
}

.bdx-edit-section h3 {
  margin: 0;
  color: var(--bdx-ink);
  font-size: 1.15rem;
  letter-spacing: 0;
}

.bdx-segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 4px;
  border-radius: 999px;
  background: #e3e4e5;
}

.bdx-list-segmented {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 360px;
}

.bdx-segmented label {
  min-width: 0;
}

.bdx-segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bdx-segmented span {
  display: grid;
  place-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  color: #151719;
  font-size: .85rem;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}

.bdx-segmented input:checked + span {
  background: #fff;
  box-shadow: 0 1px 4px rgba(18, 28, 45, .13);
}

.bdx-edit-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 1.05rem;
  font-weight: 850;
}

.bdx-edit-switch input {
  position: absolute;
  opacity: 0;
}

.bdx-edit-switch i {
  position: relative;
  flex: 0 0 auto;
  width: 58px;
  height: 34px;
  border-radius: 999px;
  background: #afb2b6;
  cursor: pointer;
}

.bdx-edit-switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(18, 28, 45, .18);
  transition: transform .18s ease;
}

.bdx-edit-switch input:checked + i {
  background: var(--bdx-green);
}

.bdx-edit-switch input:checked + i::after {
  transform: translateX(24px);
}

.bdx-quantity-stepper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.bdx-quantity-stepper button {
  display: grid;
  place-items: center;
  width: 28px;
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--bdx-blue);
  font: inherit;
  font-size: 1.15rem;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.bdx-quantity-stepper input {
  width: 60px;
  min-height: 38px;
  padding: 0 8px;
  border: 0;
  border-radius: 13px;
  color: #111418;
  background: #fff1e4;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 950;
  text-align: center;
}

.bdx-edit-stack {
  display: grid;
  gap: 10px;
}

.bdx-edit-stack > input,
.bdx-edit-stack .bdx-edit-date,
.bdx-edit-section textarea,
.bdx-edit-advanced input {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid rgba(17, 20, 24, .15);
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-weight: 780;
}

.bdx-edit-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bdx-edit-date input {
  min-width: 150px;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 850;
  text-align: right;
}

.bdx-edit-section textarea {
  min-height: 72px;
  resize: vertical;
}

.bdx-edit-advanced {
  padding: 13px 16px;
}

.bdx-edit-advanced summary {
  color: #4c535d;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.bdx-edit-advanced summary::-webkit-details-marker {
  display: none;
}

.bdx-edit-advanced input {
  margin-top: 10px;
}

.bdx-setup-warning {
  padding: 14px;
  border: 1px solid rgba(255, 138, 28, .34);
  border-radius: 8px;
  color: #6b4a0c;
  background: #fff7db;
  font-size: .86rem;
  line-height: 1.5;
}

.bdx-empty {
  grid-column: 1 / -1;
  padding: 38px 22px;
  border-style: dashed;
  color: var(--bdx-muted);
  text-align: center;
}

.bdx-empty strong {
  display: block;
  margin-bottom: 6px;
  color: var(--bdx-ink);
  font-size: 1.08rem;
}

.bdx-collector-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
}

.bdx-collector-header h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 2rem);
  letter-spacing: 0;
}

.bdx-collector-header p {
  max-width: 620px;
  margin: 9px 0 0;
  color: var(--bdx-muted);
  font-size: .94rem;
  font-weight: 750;
  line-height: 1.42;
}

.bdx-collector-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.bdx-collector-theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.bdx-collector-theme {
  position: relative;
  display: grid;
  gap: 9px;
  min-height: 150px;
  padding: 18px 54px 18px 18px;
  border: 1px solid rgba(17, 20, 24, .08);
  border-radius: 16px;
  color: var(--bdx-ink);
  background: #fff;
  box-shadow: 0 12px 28px rgba(18, 28, 45, .06);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.bdx-collector-theme:hover,
.bdx-collector-theme:focus-visible {
  border-color: rgba(10, 132, 255, .3);
  box-shadow: 0 18px 36px rgba(18, 28, 45, .1);
}

.bdx-collector-theme:focus-visible {
  outline: 3px solid rgba(10, 132, 255, .28);
  outline-offset: 3px;
}

.bdx-collector-theme h3 {
  margin: 0;
  color: var(--bdx-ink);
  font-size: 1.2rem;
  letter-spacing: 0;
}

.bdx-collector-theme p {
  margin: 0;
  color: var(--bdx-muted);
  font-size: .92rem;
  font-weight: 850;
}

.bdx-collector-theme .bdx-build-progress {
  align-self: end;
  height: 6px;
}

.bdx-collector-chevron {
  position: absolute;
  top: 18px;
  right: 18px;
  color: #8c9199;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.bdx-collector-note {
  margin: 0 0 14px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 138, 28, .24);
  border-radius: 12px;
  color: #6d4a10;
  background: #fff6e8;
  font-size: .86rem;
  font-weight: 800;
}

.bdx-collector-theme-list {
  display: grid;
  gap: 8px;
}

.bdx-collector-theme-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 12px 14px;
  border: 1px solid rgba(17, 20, 24, .08);
  border-radius: 12px;
  color: var(--bdx-ink);
  background: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.bdx-collector-theme-option[aria-pressed="true"] {
  border-color: rgba(255, 138, 28, .42);
  background: #fff8ef;
}

.bdx-collector-theme-option strong,
.bdx-collector-theme-option small {
  display: block;
}

.bdx-collector-theme-option small {
  margin-top: 3px;
  color: var(--bdx-muted);
  font-size: .76rem;
  font-weight: 800;
}

.bdx-collector-theme-option b {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--bdx-orange);
  font-size: .76rem;
}

.bdx-collector-theme-option[aria-pressed="true"] b {
  background: var(--bdx-green);
}

.bdx-collector-set-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.bdx-collector-set-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(17, 20, 24, .08);
  border-radius: 8px;
  background: var(--bdx-card);
  box-shadow: 0 12px 28px rgba(18, 28, 45, .08);
  overflow: hidden;
}

.bdx-collector-set-image {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #f7f7fb;
}

.bdx-collector-set-image img {
  padding: 18px 18px 14px;
}

.bdx-pill.collector-owned {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  min-height: 28px;
  padding-inline: 14px;
  font-size: .84rem;
}

.bdx-pill.collector-owned.muted {
  color: #4d5662;
  background: #e7e9ee;
}

.bdx-collector-set-copy {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 5px;
  min-height: 118px;
  padding: 14px;
  text-align: center;
}

.bdx-collector-set-copy h3 {
  overflow: hidden;
  margin: 0;
  color: var(--bdx-ink);
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.12;
  letter-spacing: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.bdx-collector-set-copy p {
  margin: 0;
  color: var(--bdx-muted);
  font-size: .9rem;
  font-weight: 850;
}

.bdx-collector-icon {
  position: absolute;
  z-index: 2;
  top: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  color: var(--bdx-ink);
  background: #f0f1f5;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 950;
  cursor: pointer;
}

.bdx-collector-icon.ignore {
  left: 12px;
}

.bdx-collector-icon.wishlist {
  right: 12px;
  color: #ff2d62;
}

.bdx-collector-icon.wishlist.is-active {
  color: #fff;
  background: #ff2d62;
}

.bdx-collector-ignored {
  margin-top: 18px;
  border: 1px solid rgba(17, 20, 24, .08);
  border-radius: 14px;
  background: #fff;
}

.bdx-collector-ignored summary {
  padding: 14px 16px;
  color: var(--bdx-ink);
  font-weight: 950;
  cursor: pointer;
}

.bdx-collector-ignored > p {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--bdx-muted);
  font-weight: 800;
}

.bdx-collector-ignored-list {
  display: grid;
}

.bdx-collector-ignored-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-top: 1px solid rgba(17, 20, 24, .08);
}

.bdx-collector-ignored-row strong,
.bdx-collector-ignored-row small {
  display: block;
}

.bdx-collector-ignored-row small {
  margin-top: 2px;
  color: var(--bdx-muted);
  font-size: .82rem;
  font-weight: 800;
}

.bdx-collector-ignored-row button {
  border: 0;
  color: var(--bdx-orange);
  background: transparent;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1180px) {
  .bdx-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bdx-mode-tabs {
    gap: 8px;
  }

  .bdx-mode-tab {
    font-size: 1rem;
  }
}

@media (max-width: 820px) {
  .bdx-account-heading,
  .bdx-app-topbar,
  .bdx-control-row,
  .bdx-workspace-top {
    align-items: stretch;
    flex-direction: column;
  }

  .bdx-app-actions {
    justify-content: flex-start;
  }

  .bdx-mode-callout {
    flex-basis: auto;
    width: 100%;
  }

  .bdx-mode-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bdx-mode-tab {
    min-height: 58px;
  }

  .bdx-add-card .bdx-item-form {
    position: static;
    width: 100%;
    max-height: none;
  }

  .bdx-add-search-row,
  .bdx-selected-set {
    grid-template-columns: 1fr;
  }

  .bdx-selected-set img {
    width: 92px;
  }

  .bdx-auth-card {
    grid-template-columns: 1fr;
  }

  .bdx-collector-header {
    flex-direction: column;
  }

  .bdx-collector-actions {
    justify-content: flex-start;
  }

  .bdx-collector-theme-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .bdx-account-page .bdx-app-shell {
    width: min(100% - 28px, 1840px);
  }

  .bdx-auth-card {
    padding: 20px;
  }

  .bdx-auth-card h1 {
    font-size: clamp(2.05rem, 12vw, 3.4rem);
  }

  .bdx-mode-tabs,
  .bdx-summary-grid {
    grid-template-columns: 1fr;
  }

  .bdx-items,
  .bdx-items.is-collector {
    grid-template-columns: 1fr;
  }

  .bdx-collector-set-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  .bdx-collector-set-copy {
    min-height: 106px;
    padding: 12px;
  }

  .bdx-collector-set-image img {
    padding: 14px;
  }

  .bdx-collector-theme {
    min-height: 142px;
    padding: 16px 46px 16px 16px;
  }

  .bdx-item-edit {
    grid-template-columns: 1fr;
  }

  .bdx-detail-modal {
    padding: 8px;
  }

  .bdx-detail-dialog {
    max-height: calc(100vh - 16px);
  }

  .bdx-edit-toolbar {
    grid-template-columns: 52px minmax(0, 1fr) 104px;
    min-height: 66px;
    padding: 8px 10px;
  }

  .bdx-edit-toolbar-actions {
    padding: 3px;
  }

  .bdx-edit-icon {
    width: 40px;
    font-size: 1.5rem;
  }

  .bdx-edit-icon svg {
    width: 24px;
    height: 24px;
  }

  .bdx-detail-body {
    padding: 18px 12px 20px;
  }

  .bdx-detail-dialog .bdx-item-edit {
    padding: 0;
  }

  .bdx-edit-overview {
    grid-template-columns: 1fr;
  }

  .bdx-edit-hero {
    padding-inline: 0;
  }

  .bdx-edit-hero h3 {
    font-size: clamp(1.55rem, 8vw, 2rem);
  }

  .bdx-edit-tile,
  .bdx-edit-section {
    padding: 16px;
  }

  .bdx-segmented span {
    min-height: 30px;
    padding: 0 5px;
    font-size: .74rem;
  }
}
