    .page-hero {
      padding: 1.2rem 0 1.75rem;
    }

    .page-hero h1 {
      font-family: var(--heading-font);
      line-height: 1.04;
      letter-spacing: -0.04em;
      margin: 1rem 0 0.8rem;
      max-width: 12ch;
    }

    .page-hero p {
      color: var(--muted);
      max-width: 70ch;
    }

    .page-actions {
      display: flex;
      gap: 0.9rem;
      flex-wrap: wrap;
      margin-top: 1.5rem;
    }

    .page-actions .btn {
      min-width: 180px;
    }

    .builder-section {
      padding: 1rem 0 4rem;
    }

    .builder-layout {
      display: grid;
      grid-template-columns: 320px 1fr;
      gap: 1rem;
      align-items: start;
    }

    .builder-panel {
      background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
      border: 1px solid var(--border);
      border-radius: 24px;
      padding: 1rem;
      box-shadow: var(--shadow);
    }

    .builder-side-column {
      display: grid;
      gap: 1rem;
      align-items: start;
    }

    .builder-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 0.75rem;
      margin-bottom: 1rem;
      flex-wrap: wrap;
    }

    .builder-header h2,
    .builder-header h3,
    .builder-header h4 {
      margin: 0;
      font-size: 1rem;
    }

    .builder-header-main {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      flex-wrap: wrap;
    }

    .builder-actions {
      display: flex;
      gap: 0.5rem;
      flex-wrap: wrap;
    }

    .builder-actions .btn {
      min-height: 40px;
      padding: 0.65rem 0.9rem;
    }

    .manual-selection-button {
      color: #8fc2ff;
    }

    .builder-help {
      color: var(--muted);
      font-size: 0.9rem;
      margin-bottom: 1rem;
    }

    .deck-switcher {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      margin-bottom: 1rem;
    }

    .deck-switcher-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 36px;
      padding: 0.45rem 0.75rem;
      border-radius: 12px;
      border: 1px solid rgba(255,255,255,0.1);
      background: rgba(255,255,255,0.04);
      color: var(--muted);
      font-size: 0.82rem;
      font-weight: 600;
      cursor: pointer;
      transition: 0.2s ease;
    }

    .deck-switcher-button.active {
      background: rgba(94,162,255,0.16);
      border-color: rgba(94,162,255,0.42);
      color: var(--text);
      box-shadow: 0 0 0 1px rgba(94,162,255,0.24) inset;
    }

    .builder-search {
      width: 240px;
      max-width: 100%;
      min-height: 42px;
      border-radius: 12px;
      border: 1px solid rgba(255,255,255,0.12);
      background: rgba(255,255,255,0.05);
      color: var(--text);
      padding: 0.75rem 0.9rem;
      outline: none;
    }

    .builder-search::placeholder {
      color: var(--muted);
    }

    .deck-builder-slots {
      display: grid;
      grid-template-columns: repeat(4, minmax(64px, 88px));
      justify-content: start;
      gap: 0.45rem;
    }

    .deck-slot {
      min-height: 102px;
      border-radius: 14px;
      border: 1px dashed rgba(255,255,255,0.18);
      background: rgba(255,255,255,0.03);
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      overflow: hidden;
      cursor: pointer;
    }

    .deck-slot::before {
      content: "Pick slot";
      font-size: 0.7rem;
      color: var(--muted);
    }

    .deck-slot.filled::before {
      display: none;
    }

    .deck-slot img {
      width: 54px;
      object-fit: contain;
    }

    .deck-slot .slot-name {
      position: absolute;
      left: 0.25rem;
      right: 0.25rem;
      bottom: 0.95rem;
      font-size: 0.56rem;
      text-align: center;
      color: var(--text);
      line-height: 1.1;
    }

    .deck-slot .slot-badge {
      position: absolute;
      left: 0.3rem;
      right: 0.3rem;
      bottom: 0.25rem;
      font-size: 0.52rem;
      text-align: center;
      color: var(--muted);
      line-height: 1.1;
    }

    .builder-card-pool {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
      gap: 0.5rem;
      max-height: 720px;
      overflow: auto;
      padding-right: 0.15rem;
    }

    .builder-card {
      border-radius: 14px;
      border: 1px solid rgba(255,255,255,0.08);
      background: rgba(255,255,255,0.04);
      padding: 0.35rem;
      text-align: center;
      cursor: pointer;
      user-select: none;
    }

    .builder-card img {
      width: 100%;
      max-width: 54px;
      margin: 0 auto 0.25rem;
      object-fit: contain;
    }

    .builder-card span {
      display: block;
      font-size: 0.64rem;
      line-height: 1.15;
      color: var(--text);
    }

    .builder-card small {
      display: block;
      margin-top: 0.15rem;
      color: var(--muted);
      font-size: 0.58rem;
    }

    .builder-card.selected,
    .deck-slot.selected {
      border-color: var(--accent);
      background: rgba(94,162,255,0.12);
      box-shadow: 0 0 0 1px rgba(94,162,255,0.35) inset;
    }

    .builder-card.disabled {
      opacity: 0.42;
      border-color: rgba(255,255,255,0.04);
      background: rgba(255,255,255,0.02);
      cursor: not-allowed;
    }

    .builder-card.disabled img {
      filter: grayscale(0.2);
    }

    .builder-card.disabled span,
    .builder-card.disabled small {
      color: var(--muted);
    }

    .builder-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.builder-card-pool.is-collapsed {
  display: none;
}

    .recommendation-subtitle {
      color: var(--muted);
      font-size: 0.84rem;
      margin: -0.35rem 0 1rem;
    }

    .recommendation-filters {
      display: grid;
      gap: 0.85rem;
      margin-bottom: 1rem;
    }

    .recommendation-filter-controls {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.75rem;
      align-items: start;
    }

    .deck-mode-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 0.55rem;
      margin: 0.8rem 0 1rem;
    }

    .deck-mode-control {
      display: grid;
      gap: 0.3rem;
      min-width: 0;
    }

    .deck-mode-control label {
      color: var(--muted);
      font-size: 0.68rem;
      font-weight: 800;
      text-transform: uppercase;
    }

    .deck-mode-select {
      min-height: 42px;
      width: 100%;
      border-radius: 12px;
      border: 1px solid rgba(255, 255, 255, 0.12);
      background: rgba(18, 28, 51, 0.95);
      color: #f4f7ff;
      padding: 0.65rem 0.85rem;
      outline: none;
    }

    .filter-group {
      display: grid;
      gap: 0.55rem;
      min-width: 0;
    }

    .filter-toggle {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      justify-self: start;
      min-height: 36px;
      width: fit-content;
      max-width: 100%;
      padding: 0.48rem 0.8rem;
      border-radius: 12px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      background: rgba(255, 255, 255, 0.04);
      color: var(--text);
      font-size: 0.84rem;
      font-weight: 700;
      cursor: pointer;
      transition: 0.2s ease;
      color: #ffffff;
    }

    .filter-toggle.active {
      box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    }

    .filter-toggle-include.active {
      background: rgba(57, 217, 138, 0.12);
      border-color: rgba(57, 217, 138, 0.4);
    }

    .filter-toggle-exclude.active {
      background: rgba(255, 116, 116, 0.12);
      border-color: rgba(255, 116, 116, 0.38);
    }

    .filter-picker {
      display: grid;
      width: 100%;
      gap: 0.75rem;
      padding: 0.9rem;
      border-radius: 18px;
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .filter-picker.hidden {
      display: none;
    }

    .filter-search {
      width: 100%;
      min-height: 42px;
      border-radius: 12px;
      border: 1px solid rgba(255, 255, 255, 0.12);
      background: rgba(255, 255, 255, 0.05);
      color: var(--text);
      padding: 0.75rem 0.9rem;
      outline: none;
    }

    .filter-search::placeholder {
      color: var(--muted);
    }

    .filter-card-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(98px, 1fr));
      gap: 0.55rem;
    }

    .filter-card {
      display: grid;
      justify-items: center;
      gap: 0.35rem;
      padding: 0.55rem 0.45rem;
      border-radius: 14px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(255, 255, 255, 0.04);
      color: var(--text);
      text-align: center;
      cursor: pointer;
      transition: 0.2s ease;
    }

    .filter-card img {
      width: 100%;
      max-width: 52px;
      aspect-ratio: 1 / 1.2;
      object-fit: contain;
    }

    .filter-card span {
      font-size: 0.66rem;
      line-height: 1.15;
    }

    .filter-card small {
      color: var(--muted);
      font-size: 0.58rem;
      line-height: 1.15;
    }

    .filter-card.selected-include,
    .filter-card.selected-exclude {
      border-color: rgba(57, 217, 138, 0.72);
      background: rgba(57, 217, 138, 0.34);
      box-shadow: 0 0 0 1px rgba(57, 217, 138, 0.38) inset;
    }

    .filter-card.disabled,
    .filter-card.disabled.selected-include,
    .filter-card.disabled.selected-exclude {
      opacity: 0.42;
      border-color: rgba(255, 255, 255, 0.04);
      background: rgba(255, 255, 255, 0.02);
      box-shadow: none;
      cursor: not-allowed;
    }

    .filter-card.disabled img {
      filter: grayscale(0.2);
    }

    .filter-card.disabled span,
    .filter-card.disabled small {
      color: var(--muted);
    }

    .filter-empty-state {
      padding: 1rem;
      border-radius: 14px;
      background: rgba(255, 255, 255, 0.02);
      border: 1px dashed rgba(255, 255, 255, 0.08);
    }

    .filter-empty-state p {
      margin: 0;
      color: var(--muted);
    }

    .active-filter-summary {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.85rem;
    }

    .active-filter-row {
      display: grid;
      gap: 0.55rem;
      min-width: 0;
    }

    .active-filter-label {
      display: inline-flex;
      width: fit-content;
      align-items: center;
      min-height: 28px;
      padding: 0.25rem 0.6rem;
      border-radius: 999px;
      font-size: 0.74rem;
      font-weight: 700;
    }

    .active-filter-label.include {
      color: #baf7d8;
      background: rgba(57, 217, 138, 0.12);
    }

    .active-filter-label.exclude {
      color: #ffc7c7;
      background: rgba(255, 116, 116, 0.12);
    }

    .filter-chip-list {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
    }

    .filter-chip {
      display: inline-flex;
      align-items: center;
      gap: 0.45rem;
      min-height: 34px;
      padding: 0.45rem 0.7rem;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(255, 255, 255, 0.04);
      color: #ffffff;
      font-size: 0.78rem;
    }

    .use-recommendation-button {
      color: #ffffff;
    }

    .filter-chip strong {
      font-size: 0.95rem;
      line-height: 1;
    }

    .filter-chip-include {
      cursor: pointer;
      border-color: rgba(57, 217, 138, 0.36);
      background: rgba(57, 217, 138, 0.14);
    }

    .filter-chip-exclude {
      cursor: pointer;
      border-color: rgba(255, 116, 116, 0.32);
      background: rgba(255, 116, 116, 0.14);
    }

    .filter-chip-empty {
      color: var(--muted);
    }

.recommendation-list {
  display: grid;
  gap: 0.75rem;
  position: relative;
}

.recommendation-list.is-loading {
  opacity: 0.7;
}

.recommendation-list.is-loading::after {
  content: "Loading recommendations...";
  position: sticky;
  top: 0.5rem;
  z-index: 2;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.28rem 0.62rem;
  background: rgba(94, 162, 255, 0.22);
  border: 1px solid rgba(94, 162, 255, 0.42);
  color: #dce9ff;
  font-size: 0.76rem;
  font-weight: 700;
}

    .recommendation-state {
      padding: 1rem;
      border-radius: 16px;
      background: rgba(255,255,255,0.03);
      border: 1px dashed rgba(255,255,255,0.08);
    }

    .recommendation-state p {
      margin: 0;
      color: var(--muted);
      font-size: 0.9rem;
    }

    .recommendation-card {
      border-radius: 18px;
      border: 1px solid rgba(255,255,255,0.08);
      background: rgba(255,255,255,0.04);
      padding: 0.85rem;
      display: grid;
      gap: 0.75rem;
    }

    .recommendation-head {
      display: flex;
      justify-content: space-between;
      align-items: start;
      gap: 0.75rem;
    }

    .recommendation-rank {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 40px;
      min-height: 32px;
      padding: 0.35rem 0.6rem;
      border-radius: 12px;
      background: rgba(94,162,255,0.14);
      color: #dce9ff;
      font-size: 0.86rem;
      font-weight: 800;
    }

    .recommendation-meta {
      display: grid;
      gap: 0.15rem;
      justify-items: end;
      text-align: right;
    }

    .recommendation-meta strong {
      font-size: 1rem;
    }

    .recommendation-meta span,
    .recommendation-meta small {
      color: var(--muted);
      font-size: 0.76rem;
    }

    .recommendation-cards {
      display: grid;
      grid-template-columns: repeat(4, minmax(54px, 72px));
      gap: 0.4rem;
      justify-content: start;
    }

    .recommendation-card-tile {
      border-radius: 12px;
      border: 1px solid rgba(255,255,255,0.08);
      background: rgba(255,255,255,0.03);
      padding: 0.3rem;
      text-align: center;
    }

    .recommendation-card-tile img {
      width: 100%;
      max-width: 42px;
      aspect-ratio: 1 / 1.2;
      object-fit: contain;
      margin: 0 auto;
    }

.recommendation-actions .btn {
  min-height: 36px;
  padding: 0.55rem 0.8rem;
}

.reject-recommendation-button {
  border-color: rgba(255, 150, 150, 0.38);
}

    .recommendation-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.6rem;
    }

    .active-deck-actions {
      margin-top: 1rem;
      display: flex;
      flex-wrap: wrap;
      gap: 0.6rem;
    }

    @media (max-width: 900px) {
      .builder-layout {
        grid-template-columns: 1fr;
      }

      .builder-search {
        width: 100%;
      }

      .deck-builder-slots {
        grid-template-columns: repeat(4, minmax(58px, 76px));
        gap: 0.35rem;
      }

      .deck-slot {
        min-height: 88px;
      }

      .deck-slot img {
        width: 46px;
      }

      .deck-slot .slot-name {
        font-size: 0.5rem;
      }

      .deck-slot .slot-badge {
        font-size: 0.48rem;
      }

      .deck-switcher-button {
        flex: 1 1 calc(50% - 0.25rem);
        justify-content: center;
      }

      .recommendation-cards {
        grid-template-columns: repeat(4, minmax(48px, 64px));
      }

      .recommendation-card-tile img {
        max-width: 38px;
      }
    }

    @media (max-width: 380px) {
      .recommendation-filter-controls {
        grid-template-columns: 1fr;
      }

      .active-filter-summary {
        grid-template-columns: 1fr;
      }
    }

    @media (prefers-color-scheme: dark) {
      .builder-panel,
      .recommendation-card {
        background: linear-gradient(180deg, rgba(44, 59, 98, 0.84), rgba(27, 40, 71, 0.92)) !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
        color: var(--text) !important;
      }

      .deck-switcher-button,
      .builder-card,
      .filter-toggle,
      .filter-card,
      .filter-chip,
      .recommendation-card-tile {
        background: rgba(64, 81, 126, 0.34) !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
        color: var(--text) !important;
      }

      .builder-search,
      .filter-search {
        background: rgba(19, 29, 54, 0.9) !important;
        border-color: rgba(255, 255, 255, 0.1) !important;
        color: var(--text) !important;
      }

      .deck-slot,
      .recommendation-state,
      .filter-empty-state {
        background: rgba(64, 81, 126, 0.2) !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
        color: var(--text) !important;
      }

      .filter-picker {
        background: rgba(32, 45, 78, 0.76) !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
      }

      .builder-card.disabled,
      .filter-card.disabled,
      .filter-card.disabled.selected-include,
      .filter-card.disabled.selected-exclude {
        background: rgba(33, 45, 74, 0.4) !important;
        border-color: rgba(255, 255, 255, 0.05) !important;
      }

      .builder-help,
      .recommendation-subtitle,
      .recommendation-meta span,
      .recommendation-meta small,
      .filter-empty-state p,
      .recommendation-state p,
      .builder-card small,
      .filter-card small,
      .deck-slot .slot-badge {
        color: var(--muted) !important;
      }
    }

/* Mobile-first step flow refinements */
.page-hero {
  padding: 0.9rem 0 1.2rem;
}

.page-hero h1 {
  max-width: 20ch;
  margin-bottom: 0.5rem;
}

.page-hero p {
  margin: 0;
  max-width: 56ch;
}

.how-it-works-accordion {
  margin-top: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.55rem 0.7rem;
}

.how-it-works-accordion summary {
  cursor: pointer;
  font-weight: 700;
}

.how-it-works-accordion ul {
  margin: 0.65rem 0 0.2rem;
  padding-left: 1rem;
  color: var(--muted);
  font-size: 0.86rem;
  display: grid;
  gap: 0.35rem;
}

.builder-section {
  padding: 0.45rem 0 5.5rem;
}

.builder-layout {
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.builder-step-column {
  display: grid;
  gap: 0.8rem;
}

.builder-step-card {
  padding: 0.85rem;
}

.step-heading {
  margin-bottom: 0.75rem;
}

.step-heading h2 {
  margin: 0.2rem 0 0;
  font-size: 1.02rem;
}

.step-kicker {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  background: rgba(94, 162, 255, 0.15);
  color: #dce9ff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.selected-mode-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  overflow: visible;
  padding-bottom: 0.15rem;
}

.mode-summary-chip {
  flex: 1 1 calc(50% - 0.25rem);
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0.32rem 0.62rem;
  font-size: 0.7rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  cursor: pointer;
}

.mode-summary-chip.active {
  color: #ffffff;
  background: rgba(94, 162, 255, 0.22);
  border-color: rgba(94, 162, 255, 0.52);
}

.mode-chip-row {
  margin: 0.65rem 0 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  overflow: visible;
  padding-bottom: 0.2rem;
}

.mode-chip {
  flex: 1 1 calc(25% - 0.38rem);
  min-width: 0;
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0.5rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.mode-chip.active {
  background: rgba(94, 162, 255, 0.18);
  border-color: rgba(94, 162, 255, 0.5);
}

.deck-mode-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0.45rem 0 0;
}

.deck-slot {
  min-height: 96px;
}

.recommendation-card {
  gap: 0.55rem;
}

.recommendation-head {
  align-items: center;
}

.recommendation-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.recommendation-score-line {
  color: var(--muted);
  font-size: 0.78rem;
}

.recommendation-details {
  display: none;
}

.recommendation-card.open .recommendation-details {
  display: grid;
  gap: 0.7rem;
}

.recommendation-details-toggle {
  min-height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.11);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  padding: 0.45rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.mobile-step-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0.6rem 0.8rem calc(0.6rem + env(safe-area-inset-bottom));
  background: rgba(10, 18, 36, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.mobile-step-bar-button {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-weight: 700;
}

.mobile-step-bar-button-primary {
  background: rgba(94, 162, 255, 0.2);
  border-color: rgba(94, 162, 255, 0.48);
}

@media (min-width: 901px) {
  .builder-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
    gap: 1rem;
  }

  .deck-mode-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mobile-step-bar {
    display: none;
  }

  .builder-section {
    padding-bottom: 2rem;
  }
}

/* Overflow fixes for narrow mobile widths */
.builder-layout,
.builder-step-column,
.builder-side-column,
.builder-panel,
.builder-header,
.builder-header-actions,
.recommendation-filters,
.recommendation-filter-controls,
.active-filter-summary {
  min-width: 0;
}

.deck-builder-slots,
.recommendation-cards {
  width: 100%;
  min-width: 0;
}

.deck-builder-slots {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.recommendation-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.deck-slot img {
  max-width: 100%;
}

@media (max-width: 430px) {
  html,
  body {
    overflow-x: hidden;
  }

  .container {
    overflow-x: clip;
  }

  .builder-search {
    width: 100%;
    min-width: 0;
  }

  .deck-builder-slots {
    gap: 0.32rem;
  }

  .recommendation-cards {
    gap: 0.32rem;
  }

  .mode-chip {
    flex-basis: calc(33.333% - 0.34rem);
    font-size: 0.78rem;
    padding: 0.45rem 0.55rem;
  }

  .mode-summary-chip {
    font-size: 0.67rem;
    padding: 0.3rem 0.5rem;
  }
}
