/* =========================================================
   LEARNING REWIRED LAB — THE LAB
   BUILDER CARD  (collectible builder identity)
   File: /assets/css/builder-card.css
   Version: builder-card-3
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #eef4f4;
}

body {
  margin: 0;
  min-height: 100%;
  background: #eef4f4;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(20, 184, 166, 0.2);
}

/* =========================================================
   MOTION
   ========================================================= */

@keyframes bc-foil {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 300% 50%;
  }
}

@keyframes bc-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-7px);
  }
}

@keyframes bc-pop {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }

  100% {
    opacity: 1;
    transform: none;
  }
}

/* =========================================================
   TOP ACTIONS / FUNCTIONAL STATE
   ========================================================= */

.bc-top-actions {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  position: relative;
  z-index: 10;
}

.bc-close-link,
.bc-save-close {
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.78);
  color: #0f172a;
  min-height: 42px;
  padding: 0 15px;
  border-radius: 999px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.bc-save-close {
  background: linear-gradient(135deg, #14b8a6, #0f766e);
  color: #ffffff;
  border-color: rgba(20, 184, 166, 0.4);
}

.bc-close-link:hover,
.bc-save-close:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

.bc-close-link:focus-visible,
.bc-save-close:focus-visible,
.bc-btn:focus-visible,
.bc-pick:focus-visible {
  outline: 3px solid rgba(20, 184, 166, 0.35);
  outline-offset: 3px;
}

.bc-status {
  width: min(1120px, calc(100% - 32px));
  margin: 12px auto 0;
  display: none;
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
  border: 1px solid rgba(20, 184, 166, 0.24);
  background: rgba(240, 253, 250, 0.88);
  color: #0f766e;
  position: relative;
  z-index: 10;
}

.bc-status.is-visible {
  display: block;
}

.bc-status.is-error {
  border-color: rgba(180, 83, 9, 0.24);
  background: #fff7ed;
  color: #92400e;
}

.bc-member-loading .bc-title,
.bc-member-loading .bc-sub,
.bc-member-loading .bc-name,
.bc-member-loading .bc-role,
.bc-member-loading .bc-back-name,
.bc-member-loading .bc-back-meta,
.bc-member-loading .bc-bio,
.bc-member-loading .bc-sig {
  opacity: 0.72;
}

/* =========================================================
   PAGE
   ========================================================= */

.bc-page {
  position: relative;
  min-height: calc(100vh - 64px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 44px 24px 60px;
  background: radial-gradient(70% 60% at 50% 0%, #f4fbfa 0%, #e7f1f0 60%, #dfeceb 100%);
}

.bc-bgglow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(40% 40% at 80% 20%, rgba(20, 184, 166, 0.12), transparent 60%),
    radial-gradient(40% 40% at 10% 90%, rgba(37, 99, 235, 0.06), transparent 60%);
}

/* =========================================================
   HEADER
   ========================================================= */

.bc-head {
  position: relative;
  text-align: center;
  max-width: 620px;
  z-index: 2;
}

.bc-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(20, 184, 166, 0.3);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 7px 14px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0f766e;
}

.bc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #14b8a6;
  display: block;
}

.bc-title {
  font-weight: 900;
  font-size: 30px;
  letter-spacing: -0.035em;
  color: #07111f;
  margin: 16px 0 0;
}

.bc-title span:last-child {
  color: #0f766e;
}

.bc-sub {
  font-size: 14px;
  color: #5a6b7e;
  margin: 6px 0 0;
}

/* =========================================================
   CARD STAGE
   ========================================================= */

.bc-stage {
  position: relative;
  margin-top: 30px;
  animation: bc-pop 0.5s ease both;
  perspective: 1100px;
  z-index: 2;
}

.bc-tilt {
  position: relative;
  width: 360px;
  height: 516px;
  transform-style: preserve-3d;
  transition: transform 0.12s ease-out;
  will-change: transform;
  animation: bc-float 6s ease-in-out infinite;
}

.bc-flip {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.bc-flip.is-flipped {
  transform: rotateY(180deg);
}

.bc-face {
  position: absolute;
  inset: 0;
  border-radius: 26px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 30px 70px rgba(11, 42, 42, 0.34);
}

.bc-front {
  background: linear-gradient(125deg, #06201f 0%, #0f766e 48%, #14b8a6 100%);
}

.bc-back {
  transform: rotateY(180deg);
  background: linear-gradient(160deg, #fff 0%, #f3faf9 100%);
  border: 1px solid rgba(20, 184, 166, 0.18);
}

/* =========================================================
   FOIL + TEXTURE
   ========================================================= */

.bc-foil {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  mix-blend-mode: color-dodge;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(94, 234, 212, 0.5) 38%,
    rgba(125, 211, 252, 0.45) 48%,
    rgba(167, 139, 250, 0.4) 58%,
    transparent 76%
  );
  background-size: 300% 100%;
  animation: bc-foil 7s linear infinite;
}

.bc-lines {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  pointer-events: none;
  background-image: repeating-linear-gradient(135deg, #fff 0 2px, transparent 2px 7px);
}

/* =========================================================
   TOP CHROME
   ========================================================= */

.bc-chrome {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 20px 0;
  z-index: 2;
}

.bc-chrome-l {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.bc-lvl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  color: #06201f;
  background: linear-gradient(180deg, #fff, #d7faf3);
  border-radius: 9px;
  padding: 5px 11px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  letter-spacing: -0.02em;
}

.bc-rarity {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #06201f;
  background: linear-gradient(100deg, #f4c95d, #fde9b0);
  border-radius: 7px;
  padding: 4px 9px;
  width: max-content;
}

.bc-chrome-r {
  text-align: right;
}

.bc-number {
  font-weight: 900;
  font-size: 40px;
  line-height: 0.8;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: -0.04em;
}

.bc-pos {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #bff3e9;
  margin-top: 4px;
}

/* =========================================================
   AVATAR
   ========================================================= */

.bc-avatar-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: 8px;
  z-index: 2;
}

.bc-avatar {
  position: relative;
  width: 150px;
  height: 150px;
}

.bc-avatar-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #5eead4, #7dd3fc, #a78bfa, #f4c95d, #5eead4);
  filter: blur(2px);
  opacity: 0.85;
}

.bc-avatar-img {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.6);
  background: #0b2a2a;
}

.bc-avatar-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =========================================================
   NAME PLATE
   ========================================================= */

.bc-nameplate {
  position: relative;
  text-align: center;
  margin-top: 14px;
  padding: 0 20px;
  z-index: 2;
}

.bc-name {
  font-weight: 900;
  font-size: 25px;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.bc-role {
  font-size: 12px;
  font-weight: 700;
  color: #bff3e9;
  margin-top: 2px;
  letter-spacing: 0.02em;
}

/* =========================================================
   STATS PANEL
   ========================================================= */

.bc-stats {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), #fff);
  border-top: 1px solid rgba(20, 184, 166, 0.2);
  padding: 16px 20px;
  border-radius: 22px 22px 26px 26px;
  z-index: 2;
}

.bc-stats-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}

.bc-ovr {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.bc-ovr-n {
  font-weight: 900;
  font-size: 30px;
  color: #0f766e;
  letter-spacing: -0.03em;
}

.bc-ovr-l {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
}

.bc-sig {
  font-family: Caveat, cursive;
  font-size: 26px;
  color: #0f766e;
  transform: rotate(-4deg);
  max-width: 155px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bc-sig-sm {
  font-size: 22px;
  max-width: 130px;
}

.bc-attrs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
}

.bc-attr {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bc-attr-v {
  font-size: 10px;
  font-weight: 800;
  color: #0f766e;
  width: 22px;
  flex: none;
}

.bc-attr-k {
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bc-attr-bar {
  width: 34px;
  height: 5px;
  border-radius: 999px;
  background: #e6eef0;
  overflow: hidden;
  flex: none;
}

.bc-attr-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #14b8a6, #0f766e);
}

/* =========================================================
   BACK FACE
   ========================================================= */

.bc-back-lines {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  pointer-events: none;
  background-image: repeating-linear-gradient(135deg, #0f766e 0 2px, transparent 2px 8px);
}

.bc-back-body {
  position: relative;
  padding: 20px 22px 18px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.bc-back-head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.bc-back-ava {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  overflow: hidden;
  flex: none;
  background: #0b2a2a;
  display: block;
}

.bc-back-ava img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bc-back-id {
  line-height: 1.1;
  min-width: 0;
}

.bc-back-name {
  font-weight: 900;
  font-size: 16px;
  color: #07111f;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
}

.bc-back-meta {
  font-size: 11px;
  color: #64748b;
}

.bc-back-lvl {
  margin-left: auto;
  font-size: 10px;
  font-weight: 800;
  color: #0f766e;
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.24);
  border-radius: 999px;
  padding: 4px 9px;
  flex: none;
}

.bc-bio {
  font-size: 12.5px;
  line-height: 1.5;
  color: #475569;
  margin: 14px 0 0;
}

.bc-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 16px 0 9px;
}

.bc-season {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.bc-season-cell {
  text-align: center;
  border: 1px solid #e6eef0;
  border-radius: 11px;
  padding: 9px 4px;
  background: #fafdfc;
}

.bc-season-v {
  font-weight: 900;
  font-size: 17px;
  color: #0f766e;
  letter-spacing: -0.02em;
}

.bc-season-k {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-top: 2px;
}

.bc-timeline {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.bc-tl-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.bc-tl-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 4px;
  flex: none;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
}

.bc-tl-title {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
}

.bc-tl-meta {
  font-size: 10.5px;
  color: #94a3b8;
}

.bc-back-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid #eef2f6;
}

.bc-foot-brand {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94a3b8;
}

/* =========================================================
   CURSOR GLARE
   ========================================================= */

.bc-glare {
  position: absolute;
  inset: 0;
  border-radius: 26px;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.2s ease;
  mix-blend-mode: soft-light;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.7), transparent 45%);
}

/* =========================================================
   BURST
   ========================================================= */

.bc-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  overflow: visible;
}

.bc-burst span {
  position: absolute;
  pointer-events: none;
  will-change: transform, opacity;
}

/* =========================================================
   PICKER
   ========================================================= */

.bc-picker {
  position: relative;
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 2;
}

.bc-picker-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0f766e;
}

.bc-picker-grid {
  display: flex;
  gap: 11px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 372px;
}

.bc-pick {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  border: 3px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  background: #0b2a2a;
}

.bc-pick:hover {
  transform: translateY(-3px) scale(1.08);
}

.bc-pick.is-active {
  border-color: #0f766e;
  box-shadow: 0 8px 22px rgba(15, 118, 110, 0.45);
}

.bc-pick img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Support the newer picker class if it appears in the HTML later */
.bc-picker-item {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  border: 3px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  background: #0b2a2a;
}

.bc-picker-item:hover {
  transform: translateY(-3px) scale(1.08);
}

.bc-picker-item.is-active {
  border-color: #0f766e;
  box-shadow: 0 8px 22px rgba(15, 118, 110, 0.45);
}

.bc-picker-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bc-teammate {
  font-size: 13.5px;
}

.bc-teammate strong {
  font-weight: 800;
  color: #07111f;
}

.bc-teammate span {
  color: #5a6b7e;
}

/* =========================================================
   ACTIONS
   ========================================================= */

.bc-actions {
  position: relative;
  display: flex;
  gap: 11px;
  margin-top: 34px;
  flex-wrap: wrap;
  justify-content: center;
  z-index: 2;
}

.bc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14.5px;
  border-radius: 12px;
  padding: 13px 22px;
  cursor: pointer;
  min-height: 48px;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.bc-btn:hover {
  transform: translateY(-1px);
}

.bc-btn-primary {
  font-weight: 800;
  color: #fff;
  background: #14b8a6;
  border: none;
  box-shadow: 0 12px 26px rgba(20, 184, 166, 0.3);
}

.bc-btn-primary:hover {
  background: #0f9e8e;
}

.bc-btn-ghost {
  font-weight: 700;
  color: #0f172a;
  background: #fff;
  border: 1px solid #d8e0ea;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  padding: 13px 20px;
}

.bc-btn-ghost:hover {
  border-color: #14b8a6;
  color: #0f766e;
}

/* =========================================================
   COLLECTION
   ========================================================= */

.bc-collection {
  position: relative;
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 13px;
  flex-wrap: wrap;
  justify-content: center;
  z-index: 2;
}

.bc-collection-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
}

.bc-collection-rail {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.bc-coll-card {
  width: 38px;
  height: 52px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 11px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.bc-coll-add {
  width: 38px;
  height: 52px;
  border-radius: 8px;
  background: #fff;
  border: 1.5px dashed #cbd5e1;
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 18px;
}

/* Support newer collection card markup if used later */
.bc-collection-card {
  width: 54px;
  min-height: 68px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(203, 213, 225, 0.8);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  display: grid;
  grid-template-rows: 42px auto;
}

.bc-collection-card img {
  width: 100%;
  height: 42px;
  object-fit: cover;
  display: block;
  background: #0b2a2a;
}

.bc-collection-card span {
  padding: 5px 4px;
  font-size: 8.5px;
  line-height: 1.1;
  font-weight: 800;
  text-align: center;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 720px) {
  .bc-top-actions {
    justify-content: stretch;
    flex-direction: column-reverse;
  }

  .bc-close-link,
  .bc-save-close {
    width: 100%;
  }

  .bc-page {
    min-height: calc(100vh - 120px);
    padding: 34px 16px 50px;
  }

  .bc-title {
    font-size: 27px;
  }

  .bc-sub {
    font-size: 13px;
  }

  .bc-stage {
    margin-top: 24px;
  }

  .bc-tilt {
    width: min(360px, calc(100vw - 40px));
    height: min(516px, calc((100vw - 40px) * 1.433));
  }

  .bc-avatar {
    width: 138px;
    height: 138px;
  }

  .bc-name {
    font-size: 22px;
  }

  .bc-role {
    font-size: 11px;
  }

  .bc-stats {
    padding: 14px 16px;
  }

  .bc-attrs {
    gap: 6px 10px;
  }

  .bc-attr-k {
    font-size: 10px;
  }

  .bc-actions {
    width: 100%;
    max-width: 420px;
  }

  .bc-btn {
    width: 100%;
  }

  .bc-picker-grid {
    max-width: 330px;
    gap: 9px;
  }

  .bc-pick,
  .bc-picker-item {
    width: 52px;
    height: 52px;
  }
}

@media (max-width: 420px) {
  .bc-page {
    padding-inline: 12px;
  }

  .bc-badge {
    font-size: 10px;
    letter-spacing: 0.11em;
  }

  .bc-title {
    font-size: 24px;
  }

  .bc-chrome {
    padding: 16px 16px 0;
  }

  .bc-number {
    font-size: 34px;
  }

  .bc-avatar {
    width: 126px;
    height: 126px;
  }

  .bc-nameplate {
    margin-top: 12px;
    padding: 0 16px;
  }

  .bc-name {
    font-size: 20px;
  }

  .bc-ovr-n {
    font-size: 26px;
  }

  .bc-sig {
    font-size: 23px;
    max-width: 130px;
  }

  .bc-attrs {
    grid-template-columns: 1fr;
  }

  .bc-attr-bar {
    width: 48px;
  }

  .bc-back-body {
    padding: 18px 18px 16px;
  }

  .bc-back-name {
    max-width: 160px;
  }

  .bc-season {
    grid-template-columns: repeat(2, 1fr);
  }

  .bc-back-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .bc-sig-sm {
    max-width: 100%;
  }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .bc-tilt,
  .bc-foil,
  .bc-stage {
    animation: none !important;
  }

  .bc-flip,
  .bc-btn,
  .bc-pick,
  .bc-picker-item,
  .bc-close-link,
  .bc-save-close {
    transition: none !important;
  }
}
/* =========================================================
   Builder Card V9
   Responsive product workspace layout
   Desktop = wide workbench
   Tablet/mobile = portrait app flow
   ========================================================= */

@media (min-width: 980px) {
  .bc-page {
    min-height: 100vh;
    padding: 84px 32px 56px;
  }

  .bc-head {
    max-width: 1180px;
    margin-inline: auto;
    text-align: center;
  }

  .bc-stage,
  .bc-editor-panel,
  .bc-picker,
  .bc-actions,
  .bc-collection {
    max-width: none;
  }

  .bc-page::after {
    content: "";
    display: block;
    clear: both;
  }

  .bc-stage {
    position: sticky;
    top: 96px;
    float: left;
    width: min(46vw, 520px);
    margin-left: max(32px, calc((100vw - 1180px) / 2));
    margin-top: 28px;
    z-index: 2;
  }

  .bc-tilt {
    margin-inline: auto;
  }

  .bc-editor-panel,
  .bc-picker,
  .bc-actions,
  .bc-collection {
    width: min(48vw, 560px);
    margin-left: calc(max(32px, calc((100vw - 1180px) / 2)) + min(46vw, 520px) + 44px);
    margin-right: max(32px, calc((100vw - 1180px) / 2));
  }

  .bc-editor-panel {
    margin-top: 34px;
  }

  .bc-picker {
    margin-top: 28px;
  }

  .bc-actions {
    margin-top: 26px;
    justify-content: flex-start;
  }

  .bc-collection {
    margin-top: 26px;
  }

  .bc-picker-grid {
    justify-content: flex-start;
  }
}

/* Large desktop: true workbench feel */
@media (min-width: 1280px) {
  .bc-stage {
    width: 500px;
  }

  .bc-editor-panel,
  .bc-picker,
  .bc-actions,
  .bc-collection {
    width: 620px;
    margin-left: calc(max(48px, calc((100vw - 1240px) / 2)) + 540px);
  }

  .bc-editor-grid {
    grid-template-columns: 1fr;
  }
}

/* iPad/tablet: stacked but tighter */
@media (min-width: 720px) and (max-width: 979px) {
  .bc-page {
    padding: 76px 28px 64px;
  }

  .bc-stage {
    margin-top: 24px;
  }

  .bc-editor-panel,
  .bc-picker,
  .bc-actions,
  .bc-collection {
    width: min(720px, 100%);
    margin-inline: auto;
  }

  .bc-editor-panel {
    margin-top: 24px;
  }

  .bc-picker {
    margin-top: 24px;
  }
}

/* Phone: portrait app flow */
@media (max-width: 719px) {
  .bc-page {
    padding: 72px 16px 40px;
  }

  .bc-head {
    margin-bottom: 18px;
  }

  .bc-title {
    font-size: clamp(34px, 11vw, 48px);
  }

  .bc-stage {
    margin-top: 18px;
  }

  .bc-editor-panel {
    margin-top: 20px;
  }

  .bc-picker {
    margin-top: 22px;
  }

  .bc-picker-grid {
    grid-template-columns: repeat(5, minmax(44px, 54px));
    justify-content: center;
    gap: 10px;
  }

  .bc-actions {
    position: sticky;
    bottom: 12px;
    z-index: 20;
    padding: 10px;
    border-radius: 22px;
    background: rgba(240, 253, 250, 0.86);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
  }

  .bc-actions .bc-btn {
    flex: 1 1 auto;
  }
}
/* =========================================================
   Builder Card V10
   Responsive app/workbench layout
   Desktop: card left, controls right
   Tablet: centered portrait
   Mobile: compact app flow
   ========================================================= */

.bc-page {
  --bc-shell-max: 1180px;
}

/* Desktop workbench */
@media (min-width: 1024px) {
  .bc-page {
    min-height: 100vh;
    padding: 88px 32px 64px;
  }

  .bc-head {
    width: min(var(--bc-shell-max), 100%);
    margin: 0 auto 28px;
    text-align: center;
  }

  .bc-stage,
  .bc-editor-panel,
  .bc-picker,
  .bc-actions,
  .bc-collection {
    margin: 0;
  }

  .bc-stage {
    position: sticky;
    top: 112px;
    align-self: start;
  }

  .bc-page {
    display: grid;
    grid-template-columns:
      minmax(360px, 480px)
      minmax(420px, 620px);
    grid-template-areas:
      "head head"
      "card editor"
      "card picker"
      "card actions"
      "card collection";
    justify-content: center;
    align-items: start;
    column-gap: clamp(48px, 6vw, 96px);
    row-gap: 24px;
  }

  .bc-head {
    grid-area: head;
  }

  .bc-stage {
    grid-area: card;
  }

  .bc-editor-panel {
    grid-area: editor;
    width: 100%;
    max-width: 620px;
    margin-top: 0;
  }

  .bc-picker {
    grid-area: picker;
    width: 100%;
    max-width: 620px;
  }

  .bc-picker-grid {
    justify-content: flex-start;
  }

  .bc-teammate {
    text-align: left;
  }

  .bc-actions {
    grid-area: actions;
    width: 100%;
    max-width: 620px;
    justify-content: flex-start;
  }

  .bc-collection {
    grid-area: collection;
    width: 100%;
    max-width: 620px;
    justify-content: flex-start;
  }
}

/* Mid-size laptops */
@media (min-width: 1024px) and (max-width: 1240px) {
  .bc-page {
    grid-template-columns: 420px minmax(420px, 540px);
    column-gap: 44px;
  }
}

/* Tablet */
@media (min-width: 720px) and (max-width: 1023px) {
  .bc-page {
    display: block;
    padding: 76px 28px 64px;
  }

  .bc-head,
  .bc-stage,
  .bc-editor-panel,
  .bc-picker,
  .bc-actions,
  .bc-collection {
    width: min(720px, 100%);
    margin-left: auto;
    margin-right: auto;
  }

  .bc-editor-panel {
    margin-top: 24px;
  }

  .bc-picker,
  .bc-actions,
  .bc-collection {
    margin-top: 24px;
  }
}

/* Phone */
@media (max-width: 719px) {
  .bc-page {
    display: block;
    padding: 72px 16px 44px;
  }

  .bc-head,
  .bc-stage,
  .bc-editor-panel,
  .bc-picker,
  .bc-actions,
  .bc-collection {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .bc-editor-panel {
    margin-top: 20px;
  }

  .bc-picker {
    margin-top: 22px;
  }

  .bc-picker-grid {
    grid-template-columns: repeat(5, minmax(42px, 54px));
    justify-content: center;
    gap: 10px;
  }

  .bc-actions {
    position: sticky;
    bottom: 12px;
    z-index: 40;
    margin-top: 22px;
    padding: 10px;
    border-radius: 22px;
    background: rgba(240, 253, 250, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
  }

  .bc-actions .bc-btn {
    flex: 1 1 auto;
  }
}
/* Builder Card V11 — dynamic signature fix */
.bc-stats-top {
  display: grid;
  grid-template-columns: minmax(96px, auto) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.bc-sig {
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.05;
  text-align: right;
  justify-self: end;
}

.bc-front .bc-sig {
  font-size: clamp(20px, 5.2vw, 30px);
}

.bc-back-foot .bc-sig,
.bc-sig-sm {
  font-size: clamp(18px, 4.4vw, 25px);
  max-width: 46%;
}
