/* Profile Pic Maker */
.pfp-hero {
  background:
    radial-gradient(circle at 84% 8%, rgba(0, 136, 255, 0.16), transparent 28rem),
    radial-gradient(circle at 8% 32%, rgba(29, 185, 84, 0.11), transparent 24rem);
}

.pfp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 34px;
  align-items: center;
}

.pfp-hero-card {
  min-height: 360px;
  display: grid;
  place-items: center;
  border-radius: 38px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.pfp-orbit {
  position: relative;
  width: min(100%, 330px);
  aspect-ratio: 1;
}

.pfp-orbit span {
  position: absolute;
  width: 58%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.02)),
    var(--bg) center / cover;
  border: 10px solid #fff;
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.18);
}

.pfp-orbit span:nth-child(1) {
  inset: 4% auto auto 6%;
}

.pfp-orbit span:nth-child(2) {
  inset: 26% 0 auto auto;
}

.pfp-orbit span:nth-child(3) {
  inset: auto auto 4% 22%;
}

.pfp-orbit-bg-1 {
  --bg: url("/assets/images/bg/1.png");
}

.pfp-orbit-bg-2 {
  --bg: url("/assets/images/bg/8.png");
}

.pfp-orbit-bg-3 {
  --bg: url("/assets/images/bg/12.png");
}

.pfp-maker {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.pfp-editor {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
  background: #fff;
  color: #07111f;
}

.pfp-editor .dropzone {
  background:
    linear-gradient(145deg, rgba(0, 136, 255, 0.09), rgba(29, 185, 84, 0.06)),
    #ffffff;
  border-color: rgba(0, 136, 255, 0.24);
  color: #07111f;
}

.pfp-editor .preview {
  margin-top: 0;
  background:
    linear-gradient(45deg, #edf2f7 25%, transparent 25%),
    linear-gradient(-45deg, #edf2f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #edf2f7 75%),
    linear-gradient(-45deg, transparent 75%, #edf2f7 75%),
    #ffffff;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  background-size: 24px 24px;
}

.pfp-editor .preview img {
  max-height: 260px;
}

.pfp-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-color: rgba(15, 23, 42, 0.1);
  background: #f5f8fc;
}

.pfp-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  background: #f8fbff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  animation: slide-up 180ms ease both;
}

.pfp-panel label {
  display: grid;
  gap: 8px;
  color: #172033;
}

.pfp-panel select {
  background: #fff;
  color: #07111f;
  border-color: rgba(15, 23, 42, 0.12);
}

.pfp-panel input[type="range"] {
  accent-color: var(--blue);
  padding: 0;
}

.pfp-progress {
  display: grid;
  gap: 9px;
  padding: 14px;
  border-radius: 18px;
  background: #eef7ff;
  border: 1px solid #cde9ff;
}

.pfp-progress div {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 136, 255, 0.13);
}

.pfp-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--blue), var(--green));
  transition: width 220ms ease;
}

.pfp-progress p {
  margin: 0;
  color: #075985;
  font-size: 0.9rem;
  font-weight: 750;
}

.pfp-template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 210px;
  overflow: auto;
}

.pfp-template-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 7px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #334155;
  font-size: 0.78rem;
  font-weight: 800;
}

.pfp-template-chip img {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
}

.pfp-results-wrap {
  min-width: 0;
}

.pfp-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}

.pfp-result-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 30px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.pfp-result-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 58px rgba(15, 23, 42, 0.12);
}

.pfp-result-preview {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 26px;
  background:
    radial-gradient(circle at 30% 20%, #ffffff, transparent 28%),
    #eef3f9;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.07);
}

.pfp-result-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.pfp-result-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.pfp-result-meta strong {
  color: #0f172a;
  font-size: 0.98rem;
}

.pfp-result-meta .btn {
  width: 100%;
  min-height: 42px;
  font-size: 0.88rem;
}

.pfp-result-meta .btn:disabled,
.pfp-editor .btn:disabled {
  cursor: not-allowed;
  opacity: 0.64;
  transform: none;
}

.pfp-editor .status {
  color: #526174;
}

.pfp-editor .status.success {
  color: #087443;
}


@media (max-width: 980px) {
  .pfp-hero-grid,
  .pfp-maker {
    grid-template-columns: 1fr;
  }

  .pfp-editor {
    position: static;
  }
}

@media (max-width: 560px) {
  .pfp-hero-card {
    min-height: 260px;
    border-radius: 28px;
  }

  .pfp-maker {
    gap: 18px;
  }

  .pfp-editor {
    padding: 16px;
    border-radius: 24px;
  }

  .pfp-results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .pfp-result-card {
    padding: 10px;
    border-radius: 22px;
  }

  .pfp-result-meta strong {
    font-size: 0.82rem;
  }

  .pfp-result-meta .btn {
    min-height: 38px;
    padding-inline: 10px;
    font-size: 0.76rem;
  }
}

/* Profile Pic Maker mobile-first polish */
.pfp-maker {
  display: block;
}

.pfp-upload-stage {
  max-width: 760px;
  margin: 0 auto;
}

.pfp-upload-stage[hidden] {
  display: none !important;
}

.pfp-studio[hidden] {
  display: none !important;
}

.pfp-workspace-status {
  display: grid;
  gap: 10px;
  max-width: 760px;
  margin: 0 auto 14px;
}

.pfp-workspace-status:not(:has(.pfp-progress:not([hidden]))):has(.status:empty) {
  display: none;
}

.pfp-maker.is-processing .pfp-workspace-status {
  max-width: none;
  margin-bottom: 18px;
}

.pfp-maker.is-processing .pfp-results-wrap,
.pfp-maker.is-processing .pfp-selected-editor,
.pfp-maker.is-processing .pfp-dropdown-panels,
.pfp-maker.is-processing .pfp-mobile-toolbar {
  display: none;
}

.pfp-upload-stage .dropzone {
  min-height: 220px;
}

.pfp-studio {
  position: relative;
}

.pfp-mobile-toolbar {
  position: sticky;
  top: 82px;
  z-index: 30;
  display: grid;
  grid-template-columns: 1.05fr 0.8fr 0.85fr 0.8fr;
  gap: 10px;
  padding: 12px 0;
  margin-bottom: 18px;
  background:
    linear-gradient(180deg, rgba(247, 249, 252, 0.98), rgba(247, 249, 252, 0.88)),
    #f7f9fc;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.pfp-toolbar-button {
  min-height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 18px;
  background: #ffffff;
  color: #101827;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  font-weight: 900;
  letter-spacing: -0.03em;
  overflow: hidden;
  padding: 0 10px;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.pfp-toolbar-button:hover,
.pfp-toolbar-button[aria-expanded="true"] {
  color: #ffffff;
  background: linear-gradient(135deg, #6754f4, #5140d8);
  box-shadow: 0 18px 38px rgba(81, 64, 216, 0.24);
}

.pfp-toolbar-button img {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  background: #eef2ff;
  box-shadow: 0 0 0 3px rgba(103, 84, 244, 0.08);
}

.pfp-toolbar-button > span:last-child {
  min-width: 0;
  line-height: 1;
  white-space: nowrap;
}

.pfp-icon-drop,
.pfp-icon-shape,
.pfp-icon-settings {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: currentColor;
}

.pfp-icon-drop {
  position: relative;
}

.pfp-icon-drop::before {
  content: "";
  width: 18px;
  height: 18px;
  display: block;
  border-radius: 70% 70% 70% 8%;
  background: currentColor;
  transform: rotate(45deg);
  box-shadow: inset -3px -3px 0 rgba(255, 255, 255, 0.16);
}

.pfp-icon-shape {
  position: relative;
  border: 0;
}

.pfp-icon-shape::before {
  content: "";
  width: 22px;
  height: 22px;
  display: block;
  border: 3px dashed currentColor;
  border-radius: 50%;
}

.pfp-icon-settings {
  position: relative;
}

.pfp-icon-settings::before,
.pfp-icon-settings::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.pfp-icon-settings::before {
  top: 9px;
}

.pfp-icon-settings::after {
  bottom: 9px;
}

.pfp-icon-settings {
  background:
    radial-gradient(circle at 67% 9px, currentColor 0 4px, transparent 4.5px),
    radial-gradient(circle at 34% 21px, currentColor 0 4px, transparent 4.5px);
}

.pfp-toolbar-button:hover .pfp-icon-drop::before,
.pfp-toolbar-button[aria-expanded="true"] .pfp-icon-drop::before {
  box-shadow: inset -3px -3px 0 rgba(255, 255, 255, 0.22);
}

.pfp-dropdown-panels {
  position: sticky;
  top: 154px;
  z-index: 32;
}

.pfp-dropdown-panels .pfp-panel {
  width: min(100%, 430px);
  margin-left: auto;
  margin-bottom: 18px;
  padding: 20px;
  border: 0;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

.pfp-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pfp-panel-head strong {
  color: #111827;
  font-size: 1.12rem;
}

.pfp-panel-head button {
  border: 0;
  color: #5140d8;
  background: #f2f0ff;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 900;
}

.pfp-segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: #f1f5f9;
}

.pfp-segmented button,
.pfp-filter-grid button,
.pfp-menu-panel button {
  border: 0;
  cursor: pointer;
  font-weight: 900;
}

.pfp-segmented button {
  min-height: 46px;
  border-radius: 999px;
  color: #4b5563;
  background: transparent;
}

.pfp-segmented button.is-active,
.pfp-filter-grid button.is-active,
.pfp-menu-panel button.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, #6754f4, #5140d8);
}

.pfp-swatch-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 20px;
}

.pfp-swatch-grid button {
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08), 0 8px 18px rgba(15, 23, 42, 0.08);
  cursor: pointer;
}

.pfp-template-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 320px;
}

.pfp-template-chip {
  border: 0;
  cursor: pointer;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.pfp-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.pfp-filter-grid button {
  min-height: 44px;
  border-radius: 14px;
  color: #374151;
  background: #f1f5f9;
}

.pfp-menu-panel {
  max-width: 280px;
}

.pfp-menu-panel button {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 12px;
  color: #111827;
  background: transparent;
  border-radius: 14px;
  font-size: 1rem;
  text-align: left;
}

.pfp-menu-panel button span {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border: 2px dashed currentColor;
}

.shape-square {
  border-radius: 0;
}

.shape-round {
  border-radius: 50%;
}

.shape-rounded {
  border-radius: 7px;
}

.shape-extra-rounded {
  border-radius: 12px;
}

.pfp-selected-editor {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin: 0 0 30px;
  padding: 20px;
  border-radius: 30px;
  background: #ffffff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.1);
}

.pfp-selected-preview {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #eef2f7;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.07);
}

.pfp-selected-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pfp-selected-preview.is-round {
  border-radius: 50%;
}

.pfp-selected-preview.is-square {
  border-radius: 0;
}

.pfp-selected-preview.is-rounded {
  border-radius: 28px;
}

.pfp-selected-preview.is-extra-rounded {
  border-radius: 74px;
}

.pfp-selected-copy h2 {
  color: #0f172a;
}

.pfp-results-wrap .section-head {
  margin-bottom: 20px;
}

.pfp-results-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 22px;
}

.pfp-result-card {
  display: grid;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  text-align: left;
  opacity: 0;
  transform: translateY(14px);
  animation: pfp-card-in 420ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--pfp-delay, 0ms);
  transition: filter 180ms ease;
}

.pfp-result-card:hover {
  filter: brightness(1.03);
}

.pfp-result-card.is-selected {
  filter: none;
}

.pfp-result-card.is-selected .pfp-result-preview {
  outline: 4px solid #6754f4;
  outline-offset: 4px;
}

.pfp-result-preview {
  border-radius: 26px;
  background: #f1f5f9;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.1);
}

.pfp-result-card.is-round .pfp-result-preview {
  border-radius: 50%;
}

.pfp-result-card.is-square .pfp-result-preview {
  border-radius: 0;
}

.pfp-result-card.is-rounded .pfp-result-preview {
  border-radius: 24px;
}

.pfp-result-card.is-extra-rounded .pfp-result-preview {
  border-radius: 48px;
}

.pfp-result-card strong {
  color: #1f2937;
  padding: 0 4px;
  font-size: 0.92rem;
}

.pfp-result-label {
  display: grid;
  gap: 6px;
  padding: 0 2px;
}

.pfp-result-label strong {
  color: #0f172a;
  font-size: 0.88rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pfp-shape-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(103, 84, 244, 0.12);
  color: #5140d8;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pfp-result-card.is-ready .pfp-result-preview img {
  animation: pfp-preview-pop 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.pfp-result-card.is-selected .pfp-result-preview {
  outline: 4px solid #6754f4;
  outline-offset: 4px;
  box-shadow: 0 0 0 6px rgba(103, 84, 244, 0.16);
}

.pfp-selected-editor {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 320ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.pfp-selected-editor.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.pfp-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 180;
  border: 0;
  background: rgba(2, 6, 23, 0.58);
  opacity: 0;
  transition: opacity 280ms ease;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.pfp-sheet-backdrop.is-visible {
  opacity: 1;
}

.pfp-toolbar-button.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(103, 84, 244, 0.95), rgba(81, 64, 216, 0.95));
  box-shadow: 0 10px 28px rgba(81, 64, 216, 0.35);
}

@keyframes pfp-card-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pfp-preview-pop {
  from {
    opacity: 0;
    transform: scale(0.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pfp-sheet-in {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.pfp-results-wrap .tools-actions {
  justify-content: center;
  margin-top: 28px;
}

.pfp-mobile-toolbar {
  background:
    linear-gradient(180deg, rgba(5, 10, 20, 0.98), rgba(5, 10, 20, 0.86)),
    var(--bg);
}

.pfp-upload-stage,
.pfp-dropdown-panels .pfp-panel,
.pfp-selected-editor {
  background: #ffffff;
  color: #07111f;
}

@media (max-width: 820px) {
  .pfp-hero {
    display: none;
  }

  .pfp-mobile-toolbar {
    top: 74px;
    gap: 8px;
    overflow-x: auto;
    grid-template-columns: repeat(4, minmax(92px, 1fr));
    margin-inline: -8px;
    padding-inline: 8px;
    z-index: 190;
  }

  .pfp-toolbar-button {
    min-height: 58px;
    border-radius: 14px;
    font-size: 0.92rem;
  }

  .pfp-dropdown-panels {
    position: fixed;
    inset: 0;
    top: auto;
    z-index: 200;
    pointer-events: none;
  }

  .pfp-dropdown-panels .pfp-panel:not([hidden]) {
    pointer-events: auto;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: min(86vh, 620px);
    margin: 0;
    overflow-y: auto;
    border-radius: 24px 24px 0 0;
    animation: pfp-sheet-in 320ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
    box-shadow: 0 -18px 60px rgba(15, 23, 42, 0.28);
  }

  .pfp-maker.is-sheet-open {
    overflow: hidden;
  }

  .pfp-selected-editor {
    grid-template-columns: 1fr;
    margin-bottom: 20px;
  }

  .pfp-selected-preview {
    width: min(100%, 360px);
    margin: 0 auto;
  }
}

@media (max-width: 560px) {
  .pfp-upload-stage {
    padding: 16px;
    border-radius: 24px;
  }

  .pfp-upload-stage .dropzone {
    min-height: 190px;
  }

  .pfp-mobile-toolbar {
    top: 68px;
    grid-template-columns: repeat(4, minmax(82px, 1fr));
  }

  .pfp-toolbar-button {
    min-height: 54px;
    gap: 6px;
    font-size: 0.84rem;
  }

  .pfp-toolbar-button img {
    width: 30px;
    height: 30px;
  }

  .pfp-icon-drop,
  .pfp-icon-shape,
  .pfp-icon-settings {
    width: 24px;
    height: 24px;
  }

  .pfp-dropdown-panels {
    top: 130px;
  }

  .pfp-dropdown-panels .pfp-panel:not([hidden]) {
    padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px));
    border-radius: 20px 20px 0 0;
  }

  .pfp-swatch-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
  }

  .pfp-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pfp-selected-editor {
    padding: 14px;
    border-radius: 24px;
  }

  .pfp-selected-copy h2 {
    font-size: 1.45rem;
  }

  .pfp-results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 16px;
  }

  .pfp-result-card strong {
    font-size: 0.78rem;
  }
}
/* Profile Pic Maker contrast tune */
.pfp-toolbar-button {
  color: var(--control-text);
  background: var(--control-bg);
  border: 1px solid var(--line);
}

.pfp-toolbar-button:hover,
.pfp-toolbar-button[aria-expanded="true"] {
  color: #ffffff;
  background: linear-gradient(135deg, #6754f4, #5140d8);
  border-color: transparent;
}

.pfp-mobile-toolbar {
  background:
    linear-gradient(180deg, rgba(5, 10, 20, 0.96), rgba(5, 10, 20, 0.82)),
    var(--bg);
}


.pfp-upload-stage,
.pfp-dropdown-panels .pfp-panel,
.pfp-selected-editor,
.pfp-result-preview,
.pfp-template-chip {
  color: var(--control-text);
  background: var(--control-bg);
  border-color: var(--line);
}

.pfp-panel-head strong,
.pfp-panel label,
.pfp-selected-copy h2,
.pfp-result-card strong,
.pfp-menu-panel button {
  color: var(--control-text);
}

.pfp-panel-head button,
.pfp-segmented button,
.pfp-filter-grid button {
  color: var(--control-text);
  background: var(--surface-soft);
}

.pfp-panel .hint,
.pfp-selected-copy p {
  color: var(--control-muted);
}


@media (max-width: 560px) {
  .pfp-mobile-toolbar {
    grid-template-columns: repeat(4, minmax(92px, 1fr));
  }

  .pfp-toolbar-button {
    padding: 0 8px;
  }

  .pfp-icon-drop,
  .pfp-icon-shape,
  .pfp-icon-settings {
    width: 22px;
    height: 22px;
  }

  .pfp-icon-shape::before {
    width: 18px;
    height: 18px;
  }
}
/* Background Remover */
.bgrem-hero {
  background:
    radial-gradient(circle at 10% 0%, rgba(14, 165, 233, 0.14), transparent 30rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.4));
}

.bgrem-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
}

.bgrem-hero-card,
.bgrem-upload-card,
.bgrem-preview-card,
.bgrem-compare-card,
.bgrem-options-card {
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

.bgrem-hero-card {
  min-height: 360px;
  border-radius: 34px;
  padding: 24px;
}

.bgrem-hero-checker,
.bgrem-checkerboard,
.bgrem-final-preview.is-transparent {
  background-color: #f8fafc;
  background-image:
    linear-gradient(45deg, #dbe3ee 25%, transparent 25%),
    linear-gradient(-45deg, #dbe3ee 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #dbe3ee 75%),
    linear-gradient(-45deg, transparent 75%, #dbe3ee 75%);
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  background-size: 24px 24px;
}

.bgrem-hero-checker {
  height: 100%;
  min-height: 312px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  overflow: hidden;
}

.bgrem-cutout {
  position: relative;
  z-index: 1;
  width: min(72%, 260px);
  aspect-ratio: 1;
  display: block;
  border-radius: 38% 62% 48% 52%;
  background:
    radial-gradient(circle at 50% 20%, #fef3c7 0 10%, transparent 10.5%),
    radial-gradient(circle at 43% 38%, #111827 0 3%, transparent 3.5%),
    radial-gradient(circle at 58% 38%, #111827 0 3%, transparent 3.5%),
    linear-gradient(180deg, #38bdf8 0 40%, #0f172a 40% 100%);
  box-shadow: 0 28px 60px rgba(14, 165, 233, 0.24);
}

.bgrem-layout {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.bgrem-tool {
  display: grid;
  gap: 24px;
}

.bgrem-upload-card {
  color: #0f172a;
}

.bgrem-upload-card .section-head p,
.bgrem-upload-card .hint {
  color: #64748b;
}

.bgrem-dropzone {
  min-height: 220px;
  place-items: center;
  text-align: center;
  border: 2px dashed rgba(14, 165, 233, 0.34);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(14, 165, 233, 0.12), transparent 22rem),
    #f8fbff;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.bgrem-dropzone:hover,
.bgrem-dropzone.is-dragover {
  transform: translateY(-2px);
  border-color: rgba(14, 165, 233, 0.7);
  background: #eef8ff;
}

.bgrem-dropzone.is-disabled {
  cursor: wait;
  opacity: 0.7;
}

.bgrem-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.bgrem-loading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 18px;
  padding: 16px;
  border-radius: 20px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #0f172a;
}

.bgrem-loading p {
  margin: 2px 0 0;
  color: #475569;
}

.bgrem-progress {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbeafe;
}

.bgrem-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, #0ea5e9, #22c55e);
  transition: width 180ms ease;
}

.bgrem-results {
  display: grid;
  gap: 24px;
}

.bgrem-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.bgrem-preview-card,
.bgrem-compare-card,
.bgrem-options-card {
  color: #0f172a;
  border-radius: 30px;
  padding: clamp(16px, 2.4vw, 24px);
}

.bgrem-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.bgrem-card-head h2 {
  margin: 8px 0 0;
}

.bgrem-card-head strong,
.bgrem-range-label {
  color: #475569;
  font-size: 0.9rem;
}

.bgrem-preview-card > img,
.bgrem-checkerboard,
.bgrem-final-preview,
.bgrem-compare {
  width: 100%;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background-color: #f8fafc;
}

.bgrem-preview-card > img,
.bgrem-checkerboard img,
.bgrem-final-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.bgrem-compare {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #f8fafc;
}

.bgrem-compare img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bgrem-compare > img,
.bgrem-compare-after {
  position: absolute;
  inset: 0;
}

.bgrem-compare-after {
  width: 50%;
  overflow: hidden;
  background-color: #f8fafc;
  background-image:
    linear-gradient(45deg, #dbe3ee 25%, transparent 25%),
    linear-gradient(-45deg, #dbe3ee 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #dbe3ee 75%),
    linear-gradient(-45deg, transparent 75%, #dbe3ee 75%);
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  background-size: 24px 24px;
}

.bgrem-compare-after img {
  width: 200%;
  max-width: none;
}

.bgrem-compare [data-bgrem-compare-handle] {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.16), 0 0 20px rgba(15, 23, 42, 0.22);
}

.bgrem-compare [data-bgrem-compare-handle]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 38px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}

.bgrem-range-label {
  display: grid;
  min-width: min(240px, 100%);
  gap: 8px;
  font-weight: 800;
}

.bgrem-options-card .section-head p {
  color: #64748b;
}

.bgrem-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.bgrem-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #f8fafc;
  color: #0f172a;
}

.bgrem-options input[type="radio"] {
  width: auto;
}

.bgrem-options input[type="color"] {
  width: 42px;
  height: 34px;
  min-height: 0;
  padding: 2px;
}

.bgrem-options input[type="file"] {
  font-size: 0.82rem;
}

.bgrem-final-preview {
  margin-top: 12px;
}

.bgrem-downloads {
  justify-content: flex-start;
}

.btn:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none !important;
  box-shadow: none;
}

.bgrem-hero {
  background:
    radial-gradient(circle at 10% 0%, rgba(14, 165, 233, 0.16), transparent 30rem),
    rgba(3, 7, 18, 0.28);
}

.bgrem-hero-card,
.bgrem-upload-card,
.bgrem-preview-card,
.bgrem-compare-card,
.bgrem-options-card {
  color: #0f172a;
  background: #ffffff;
}

@media (max-width: 980px) {
  .bgrem-layout,
  .bgrem-hero-grid {
    grid-template-columns: 1fr;
  }

  .bgrem-hero-card {
    min-height: 280px;
  }
}

@media (max-width: 720px) {
  .bgrem-preview-grid,
  .bgrem-options {
    grid-template-columns: 1fr;
  }

  .bgrem-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .bgrem-downloads .btn {
    width: 100%;
  }
}

/* Background Remover mobile-first polish */
.bgrem-hero {
  padding: clamp(42px, 7vw, 84px) 0 clamp(32px, 5vw, 54px);
  overflow: hidden;
}

.bgrem-hero-copy {
  max-width: 650px;
}

.bgrem-hero-copy h1 {
  max-width: 780px;
  margin-top: 18px;
  color: #172033;
  font-size: clamp(2.8rem, 7vw, 6.1rem);
  letter-spacing: -0.07em;
}

.bgrem-hero-copy .lead {
  color: #4b5563;
  font-size: clamp(1.08rem, 2vw, 1.32rem);
}

.bgrem-hero-badges,
.bgrem-try-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.bgrem-hero-badges {
  margin-top: 22px;
}

.bgrem-hero-badges span,
.bgrem-try-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: #334155;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  font-weight: 800;
  font-size: 0.9rem;
}

.bgrem-upload-cta {
  min-height: 62px;
  padding: 0 34px;
  font-size: 1.12rem;
  box-shadow: 0 18px 38px rgba(14, 116, 233, 0.28);
}

.bgrem-hero-card {
  position: relative;
  padding: 18px;
  border-radius: 38px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.86)),
    #ffffff;
}

.bgrem-hero-checker {
  position: relative;
  isolation: isolate;
  min-height: 330px;
  border-radius: 30px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.bgrem-before-pane {
  position: absolute;
  inset: 0 48% 0 0;
  z-index: 0;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(34, 197, 94, 0.08)),
    #e0f2fe;
}

.bgrem-hero-handle {
  position: absolute;
  z-index: 2;
  top: 11%;
  bottom: 11%;
  left: 52%;
  width: 3px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12), 0 14px 40px rgba(15, 23, 42, 0.18);
}

.bgrem-hero-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 52px;
  height: 52px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 0 35%, #475569 35% 42%, transparent 42% 58%, #475569 58% 65%, transparent 65%),
    #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.2);
}

.bgrem-layout {
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
}

.bgrem-upload-card,
.bgrem-preview-card,
.bgrem-compare-card,
.bgrem-options-card {
  border-radius: 36px;
}

.bgrem-upload-card {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 38px);
}

.bgrem-upload-head {
  max-width: 720px;
  margin: 0 auto 22px;
  text-align: center;
}

.bgrem-upload-head h2 {
  color: #172033;
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.bgrem-upload-head p {
  color: #64748b;
}

.bgrem-dropzone {
  position: relative;
  min-height: clamp(240px, 33vw, 330px);
  align-content: center;
  justify-items: center;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
  border: 0;
  border-radius: 34px;
  background:
    radial-gradient(circle at 50% 0%, rgba(14, 165, 233, 0.18), transparent 19rem),
    linear-gradient(180deg, #ffffff, #f7fbff);
  box-shadow:
    inset 0 0 0 2px rgba(14, 165, 233, 0.14),
    0 24px 70px rgba(14, 116, 233, 0.13);
}

.bgrem-dropzone::before {
  content: none;
  display: none;
}

.bgrem-dropzone::after {
  content: "";
  position: absolute;
  inset: 16px;
  width: auto;
  height: auto;
  margin: 0;
  border: 2px dashed rgba(14, 165, 233, 0.22);
  border-radius: 26px;
  background: transparent;
  clip-path: none;
  transform: none;
  pointer-events: none;
}

.bgrem-upload-icon {
  position: relative;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  color: #ffffff;
  background: linear-gradient(135deg, #0b84ff, #38bdf8);
  box-shadow: 0 18px 38px rgba(14, 132, 255, 0.28);
}

.bgrem-upload-icon::before,
.bgrem-upload-icon::after {
  content: "";
  position: absolute;
  background: currentColor;
  border-radius: 999px;
}

.bgrem-upload-icon::before {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 4px;
}

.bgrem-upload-icon::after {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 30px;
}

.bgrem-dropzone strong {
  color: #172033;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  letter-spacing: -0.04em;
}

.bgrem-dropzone .hint {
  max-width: 440px;
  color: #64748b;
  font-weight: 700;
}

.bgrem-try-row {
  justify-content: center;
  margin: 22px auto 0;
  color: #64748b;
  text-align: center;
}

.bgrem-try-row > span:first-child {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #64748b;
}

.bgrem-example::before {
  content: "";
  width: 24px;
  height: 24px;
  margin-right: 7px;
  border-radius: 9px;
  background: linear-gradient(135deg, #dbeafe, #bbf7d0);
}

.bgrem-example-product::before {
  background: linear-gradient(135deg, #fef3c7, #f59e0b);
}

.bgrem-example-animal::before {
  background: linear-gradient(135deg, #fed7aa, #92400e);
}

.bgrem-example-car::before {
  background: linear-gradient(135deg, #bae6fd, #2563eb);
}

.bgrem-loading {
  max-width: 720px;
  margin: 20px auto 0;
  box-shadow: 0 18px 40px rgba(14, 116, 233, 0.1);
}

.bgrem-upload-card .status {
  max-width: 720px;
  min-height: 26px;
  margin: 18px auto 0;
  text-align: center;
  font-weight: 800;
}

.bgrem-upload-card .status.success {
  color: #15803d;
}

.bgrem-upload-card .status.error {
  color: #dc2626;
}

.bgrem-result-toolbar {
  position: sticky;
  top: 88px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 52px rgba(15, 23, 42, 0.09);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.bgrem-result-toolbar h2 {
  margin: 6px 0 0;
  color: #172033;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.bgrem-result-toolbar .btn {
  flex: 0 0 auto;
}

.bgrem-preview-grid {
  gap: 22px;
}

.bgrem-preview-card {
  padding: 14px;
  background: #ffffff;
}

.bgrem-card-head {
  padding: 2px 4px 0;
}

.bgrem-card-head h2,
.bgrem-options-card h2 {
  color: #172033;
}

.bgrem-preview-card > img,
.bgrem-checkerboard,
.bgrem-final-preview,
.bgrem-compare {
  border-radius: 28px;
  background-color: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
}

.bgrem-preview-card > img,
.bgrem-checkerboard img,
.bgrem-final-preview img {
  min-height: 330px;
}

.bgrem-compare {
  aspect-ratio: 16 / 9;
}

.bgrem-range-label input[type="range"] {
  accent-color: #0b84ff;
}

.bgrem-options-card {
  padding: clamp(16px, 3vw, 30px);
}

.bgrem-options-card .section-head {
  margin-bottom: 20px;
}

.bgrem-options {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.bgrem-options label {
  position: relative;
  min-height: 64px;
  padding: 12px 14px;
  border-radius: 22px;
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.bgrem-options label:hover,
.bgrem-options label:has(input[type="radio"]:checked) {
  transform: translateY(-1px);
  border-color: rgba(14, 132, 255, 0.42);
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(14, 116, 233, 0.1);
}

.bgrem-options input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bgrem-option-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
}

.bgrem-option-icon.is-transparent {
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, #cbd5e1 25%, transparent 25%),
    linear-gradient(-45deg, #cbd5e1 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #cbd5e1 75%),
    linear-gradient(-45deg, transparent 75%, #cbd5e1 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.bgrem-option-icon.is-white {
  background: #ffffff;
}

.bgrem-option-icon.is-black {
  background: #0f172a;
}

.bgrem-option-icon.is-custom {
  background: linear-gradient(135deg, #8b5cf6, #ec4899, #f59e0b);
}

.bgrem-option-icon.is-photo {
  background:
    radial-gradient(circle at 70% 34%, #fde68a 0 14%, transparent 15%),
    linear-gradient(135deg, #86efac, #38bdf8);
}

.bgrem-options input[type="color"] {
  margin-left: auto;
  border: 0;
  border-radius: 10px;
  background: transparent;
}

.bgrem-bg-image-option {
  grid-column: span 2;
}

.bgrem-bg-image-option input[type="file"] {
  max-width: 230px;
  margin-left: auto;
  color: #64748b;
}

.bgrem-final-preview {
  padding: 10px;
  background: #f8fafc;
}

.bgrem-final-preview img {
  border-radius: 22px;
}

.bgrem-downloads {
  gap: 10px;
}

.bgrem-downloads .btn {
  min-height: 52px;
}

.bgrem-mobile-action {
  display: none;
}

.bgrem-guide-section .content-prose,
.bgrem-faq-section .content-prose {
  max-width: 980px;
}

.bgrem-guide-list {
  gap: 12px;
}

.bgrem-guide-list li {
  background: rgba(255, 255, 255, 0.06);
}

.bgrem-guide-list strong {
  max-width: 320px;
}

.bgrem-faq-section .faq-list details {
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
}

.bgrem-faq-section .faq-list summary {
  color: #172033;
}

.bgrem-faq-section .faq-list p {
  color: #64748b;
}

.bgrem-hero-copy h1,
.bgrem-hero-copy .lead {
  color: #ffffff;
}

.bgrem-hero-copy .lead {
  color: #cbd5e1;
}

@media (max-width: 980px) {
  .bgrem-layout {
    display: block;
  }

  .bgrem-layout .related-tools {
    margin-top: 28px;
  }

  .bgrem-hero-copy {
    max-width: none;
    text-align: center;
  }

  .bgrem-hero-badges,
  .bgrem-hero-copy .hero-actions {
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .bgrem-hero {
    padding-top: 34px;
  }

  .bgrem-hero-grid {
    gap: 22px;
  }

  .bgrem-hero-copy h1 {
    margin-top: 14px;
    font-size: clamp(3rem, 14vw, 4.4rem);
  }

  .bgrem-hero-badges {
    gap: 8px;
  }

  .bgrem-hero-badges span {
    min-height: 34px;
    padding: 0 11px;
    font-size: 0.82rem;
  }

  .bgrem-hero-copy .hero-actions .btn {
    width: 100%;
  }

  .bgrem-hero-card {
    padding: 12px;
    border-radius: 28px;
  }

  .bgrem-hero-checker {
    min-height: 252px;
    border-radius: 22px;
  }

  .bgrem-cutout {
    width: min(70%, 210px);
  }

  .bgrem-upload-card {
    padding: 14px;
    border-radius: 28px;
  }

  .bgrem-upload-head {
    padding: 8px 4px 0;
    text-align: left;
  }

  .bgrem-upload-head h2 {
    font-size: 2.1rem;
  }

  .bgrem-dropzone {
    min-height: 250px;
    border-radius: 28px;
  }

  .bgrem-dropzone::after {
    inset: 10px;
    border-radius: 22px;
  }

  .bgrem-upload-icon {
    width: 68px;
    height: 68px;
    border-radius: 22px;
  }

  .bgrem-try-row {
    justify-content: flex-start;
    flex-wrap: wrap;
    padding-bottom: 4px;
  }

  .bgrem-try-row span {
    flex: 0 0 auto;
  }

  .bgrem-try-row > span:first-child {
    width: 100%;
    flex-basis: 100%;
    justify-content: flex-start;
  }

  .bgrem-result-toolbar {
    top: 78px;
    border-radius: 22px;
  }

  .bgrem-result-toolbar .btn {
    display: none;
  }

  .bgrem-preview-card,
  .bgrem-compare-card,
  .bgrem-options-card {
    border-radius: 26px;
    padding: 12px;
  }

  .bgrem-preview-card > img,
  .bgrem-checkerboard img,
  .bgrem-final-preview img {
    min-height: 260px;
    aspect-ratio: 3 / 4;
  }

  .bgrem-compare {
    aspect-ratio: 4 / 5;
  }

  .bgrem-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bgrem-options label {
    min-height: 58px;
    padding: 10px;
    gap: 8px;
    font-size: 0.92rem;
  }

  .bgrem-option-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }

  .bgrem-bg-image-option {
    grid-column: 1 / -1;
    flex-wrap: wrap;
  }

  .bgrem-bg-image-option input[type="file"] {
    max-width: 100%;
    width: 100%;
    margin-left: 0;
  }

  .bgrem-downloads {
    display: none;
  }

  .bgrem-mobile-action {
    position: sticky;
    bottom: 12px;
    z-index: 10;
    display: block;
    margin-top: 16px;
    padding: 0;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .bgrem-mobile-action .btn {
    width: 100%;
    min-height: 58px;
    box-shadow: 0 14px 28px rgba(14, 116, 233, 0.22);
  }

  .bgrem-guide-list li {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .bgrem-guide-list strong {
    grid-column: 2;
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 420px) {
  .bgrem-options {
    grid-template-columns: 1fr;
  }

  .bgrem-hero-copy h1 {
    font-size: 3rem;
  }
}
/* Profile Pic Maker gallery finish */
.pfp-results-wrap {
  padding: clamp(14px, 2.6vw, 28px);
  border-radius: 34px;
  background:
    radial-gradient(circle at 12% 0%, rgba(103, 84, 244, 0.16), transparent 24rem),
    radial-gradient(circle at 90% 8%, rgba(14, 165, 233, 0.12), transparent 22rem),
    rgba(3, 7, 18, 0.48);
  border: 1px solid rgba(226, 232, 240, 0.08);
}

.pfp-results-grid {
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

.pfp-result-card {
  display: block;
  min-width: 0;
  padding: 10px;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.1);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.pfp-result-card:hover,
.pfp-result-card.is-selected {
  transform: translateY(-3px);
  border-color: rgba(103, 84, 244, 0.55);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.pfp-result-card > strong {
  display: none;
}

.pfp-result-preview {
  width: 100%;
  border-radius: 24px;
  background:
    radial-gradient(circle at 26% 18%, rgba(255, 255, 255, 0.28), transparent 30%),
    rgba(15, 23, 42, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.pfp-result-card.is-round .pfp-result-preview {
  border-radius: 50%;
}

.pfp-result-card.is-rounded .pfp-result-preview {
  border-radius: 24px;
}

.pfp-result-card.is-extra-rounded .pfp-result-preview {
  border-radius: 42px;
}

.pfp-result-card.is-selected .pfp-result-preview {
  outline: 3px solid #7c6dff;
  outline-offset: 4px;
}


@media (max-width: 560px) {
  .pfp-results-wrap {
    padding: 12px;
    border-radius: 24px;
  }

  .pfp-results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .pfp-result-card {
    padding: 7px;
    border-radius: 22px;
  }
}

/* Keep the selected editor readable when the page is in dark mode. */
.pfp-selected-editor {
  color: #0f172a;
  background: #ffffff;
}

.pfp-selected-editor .eyebrow {
  color: #075985;
  background: #eaf6ff;
  border-color: #bae6fd;
}

.pfp-selected-editor .eyebrow::before {
  background: #22c55e;
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.58);
}

.pfp-selected-copy h2,
.pfp-selected-copy p {
  color: #0f172a;
}

.pfp-selected-editor .btn-ghost {
  color: #0f172a;
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.14);
}
/* QR Code Generator */
.qr-page {
  --qr-card: rgba(3, 7, 18, 0.78);
  --qr-card-strong: rgba(8, 18, 34, 0.92);
  --qr-line: rgba(148, 163, 184, 0.2);
  --qr-text: #f8fafc;
  --qr-muted: #aebdca;
  --qr-soft: rgba(255, 255, 255, 0.065);
  --qr-preview-bg: #ffffff;
  --qr-preview-text: #0f172a;
  color-scheme: dark;
}

.qr-hero {
  position: relative;
  overflow: hidden;
}

.qr-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 8%, rgba(14, 165, 233, 0.18), transparent 24rem),
    radial-gradient(circle at 86% 22%, rgba(32, 212, 123, 0.15), transparent 22rem);
  pointer-events: none;
}

.qr-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
}

.qr-hero-badges,
.qr-preset-row,
.qr-toggle-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.qr-hero-badges span,
.qr-privacy-badge,
.qr-preset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--qr-line);
  border-radius: 999px;
  color: var(--qr-text);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.9rem;
  font-weight: 850;
}

.qr-hero-card {
  min-height: 340px;
  display: grid;
  place-items: center;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--qr-line);
  border-radius: 36px;
  background:
    radial-gradient(circle at 20% 0%, rgba(14, 165, 233, 0.24), transparent 22rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035)),
    rgba(3, 7, 18, 0.72);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.qr-hero-icon {
  display: block;
  width: min(100%, 220px);
  height: auto;
  max-height: 220px;
  object-fit: contain;
  border-radius: 34px;
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.32), 0 0 46px rgba(14, 165, 233, 0.22);
  transform: none;
}

.qr-hero-frame {
  width: min(72vw, 240px);
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(7, 1fr);
  gap: 9px;
  padding: 20px;
  border-radius: 30px;
  background: #ffffff;
  box-shadow: 0 22px 54px rgba(2, 6, 23, 0.32);
}

.qr-hero-frame span,
.qr-hero-frame i {
  border-radius: 8px;
  background: #07111f;
}

.qr-hero-frame span:nth-child(1) {
  grid-column: 1 / span 2;
  grid-row: 1 / span 2;
}

.qr-hero-frame span:nth-child(2) {
  grid-column: 6 / span 2;
  grid-row: 1 / span 2;
}

.qr-hero-frame span:nth-child(3) {
  grid-column: 1 / span 2;
  grid-row: 6 / span 2;
}

.qr-hero-frame span:nth-child(4) {
  grid-column: 4 / span 2;
  grid-row: 4 / span 2;
  background: linear-gradient(135deg, #0a84ff, #20d47b);
}

.qr-hero-frame i:nth-of-type(1) {
  grid-column: 4;
  grid-row: 1;
}

.qr-hero-frame i:nth-of-type(2) {
  grid-column: 3;
  grid-row: 3;
}

.qr-hero-frame i:nth-of-type(3) {
  grid-column: 6;
  grid-row: 4;
}

.qr-hero-frame i:nth-of-type(4) {
  grid-column: 4;
  grid-row: 7;
}

.qr-hero-frame i:nth-of-type(5) {
  grid-column: 7;
  grid-row: 6;
}

.qr-tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: start;
}

.qr-tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 24px;
  align-items: start;
  min-width: 0;
}

.qr-settings-card,
.qr-preview-card {
  position: relative;
  overflow: hidden;
  border-color: var(--qr-line);
  background:
    radial-gradient(circle at 14% 0%, rgba(14, 165, 233, 0.15), transparent 18rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035)),
    var(--qr-card);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.24);
}

.qr-settings-card .section-head h2 {
  margin-bottom: 10px;
}

.qr-preset-row {
  margin: 18px 0 22px;
}

.qr-preset {
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
  color: var(--qr-text);
}

.qr-preset:not(.is-active) {
  color: var(--qr-text);
}

.qr-preset.is-active {
  color: #ffffff;
}

.qr-preset:hover,
.qr-preset.is-active {
  transform: translateY(-1px);
  border-color: rgba(14, 165, 233, 0.5);
  background: linear-gradient(135deg, rgba(10, 132, 255, 0.22), rgba(32, 212, 123, 0.16));
}

.qr-fields.full,
.qr-customize.full,
.qr-toggle-list.full {
  grid-column: 1 / -1;
}

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

.qr-customize {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--qr-line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.045);
}

.qr-customize input[type="color"] {
  min-height: 54px;
  padding: 6px;
}

.qr-upload {
  padding: 16px;
  border: 1px dashed rgba(14, 165, 233, 0.45);
  border-radius: 20px;
  background: rgba(14, 165, 233, 0.07);
  cursor: pointer;
}

.qr-upload strong {
  color: var(--qr-muted);
  font-size: 0.9rem;
  word-break: break-word;
}

.qr-upload input {
  display: none;
}

.qr-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--qr-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--qr-text);
  font-weight: 850;
}

.qr-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #0a84ff;
}

.status.success {
  color: #7cf4a5;
}

.qr-preview-card {
  position: sticky;
  top: 96px;
}

.qr-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

.qr-preview-head h2 {
  margin: 4px 0 0;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.qr-privacy-badge {
  min-height: 34px;
  white-space: nowrap;
  color: #ccfbf1;
  background: rgba(20, 184, 166, 0.14);
}

.qr-preview-surface {
  position: relative;
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 28px);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 28px;
  background:
    linear-gradient(45deg, rgba(15, 23, 42, 0.05) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(15, 23, 42, 0.05) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(15, 23, 42, 0.05) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(15, 23, 42, 0.05) 75%),
    var(--qr-preview-bg);
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  background-size: 24px 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 22px 56px rgba(0, 0, 0, 0.18);
}

.qr-preview-surface.is-transparent {
  background-color: #f8fafc;
}

.qr-preview-surface.is-loading::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  border: 4px solid rgba(10, 132, 255, 0.22);
  border-top-color: #0a84ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.qr-preview {
  width: min(100%, 320px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.qr-preview canvas,
.qr-preview svg {
  width: 100% !important;
  height: auto !important;
  display: block;
  border-radius: 18px;
}

.qr-preview-empty {
  max-width: 280px;
  color: var(--qr-preview-text);
  text-align: center;
  font-weight: 850;
}

.qr-preview-note {
  margin: 16px 0 0;
  color: var(--qr-muted);
  font-size: 0.94rem;
}

.qr-downloads {
  margin-top: 18px;
}

.qr-downloads .btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.qr-page .related-tools-section {
  padding-top: 0;
}

.qr-page .eyebrow {
  color: #cde9ff;
}

.qr-page .hero-actions .btn-ghost {
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.07);
}

.qr-page .related-tools-head p,
.qr-page .related-tool-card .tool-kicker {
  color: var(--qr-muted);
}

.qr-page .qr-upload strong {
  color: var(--qr-muted);
}

@media (max-width: 1180px) {
  .qr-tool-layout,
  .qr-tool {
    grid-template-columns: 1fr;
  }

  .qr-preview-card {
    position: static;
  }
}

@media (max-width: 980px) {
  .qr-hero-grid {
    grid-template-columns: 1fr;
  }

  .qr-hero-card {
    min-height: 280px;
  }
}

@media (max-width: 720px) {
  .qr-fields,
  .qr-customize {
    grid-template-columns: 1fr;
  }

  .qr-preview-surface {
    min-height: 300px;
  }
}

@media (max-width: 560px) {
  .qr-page .container {
    width: min(100% - 18px, var(--max));
  }

  .qr-hero-card {
    display: none;
  }

  .qr-preset,
  .qr-toggle,
  .qr-downloads .btn {
    width: 100%;
  }

  .qr-preview-head {
    display: grid;
  }

  .qr-preview {
    width: min(100%, 250px);
  }
}
/* Background remover dark UI alignment */
.bgrem-layout {
  align-items: start;
}

.bgrem-tool,
.bgrem-results {
  min-width: 0;
}

.bgrem-upload-card,
.bgrem-preview-card,
.bgrem-compare-card,
.bgrem-options-card,
.bgrem-result-toolbar,
.bgrem-faq-section .faq-list details {
  color: var(--text-strong, #ffffff) !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  background:
    radial-gradient(circle at 14% 0%, rgba(14, 165, 233, 0.14), transparent 18rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    rgba(3, 7, 18, 0.78) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.26) !important;
}

.bgrem-upload-head h2,
.bgrem-result-toolbar h2,
.bgrem-card-head h2,
.bgrem-options-card h2,
.bgrem-faq-section .section-head h2,
.bgrem-faq-section .faq-list summary {
  color: #ffffff !important;
}

.bgrem-upload-head p,
.bgrem-upload-card .hint,
.bgrem-try-row,
.bgrem-try-row > span:first-child,
.bgrem-card-head strong,
.bgrem-range-label,
.bgrem-options-card .section-head p,
.bgrem-faq-section .section-head p,
.bgrem-faq-section .faq-list p {
  color: #aebdca !important;
}

.bgrem-upload-card {
  max-width: none;
  margin-inline: 0;
}

.bgrem-upload-head {
  text-align: left;
  margin-inline: 0;
}

.bgrem-dropzone,
.bgrem-loading {
  color: #ffffff !important;
  border: 1px dashed rgba(56, 189, 248, 0.34) !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(14, 165, 233, 0.18), transparent 22rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(3, 7, 18, 0.74) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 46px rgba(0, 0, 0, 0.22) !important;
}

.bgrem-dropzone:hover,
.bgrem-dropzone.is-dragover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.7) !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(14, 165, 233, 0.24), transparent 22rem),
    rgba(8, 18, 34, 0.92) !important;
}

.bgrem-dropzone::after {
  border-color: rgba(56, 189, 248, 0.24) !important;
}

.bgrem-upload-icon {
  background: linear-gradient(135deg, #0a84ff, #46b7ff 52%, #20d47b) !important;
  box-shadow: 0 18px 40px rgba(10, 132, 255, 0.32) !important;
}

.bgrem-dropzone strong {
  color: #ffffff !important;
}

.bgrem-example {
  color: #f8fafc !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 30px rgba(0, 0, 0, 0.18) !important;
}

.bgrem-upload-card .status.success {
  color: #86efac !important;
}

.bgrem-upload-card .status.error {
  color: #fb7185 !important;
}

.bgrem-result-toolbar {
  position: sticky;
  top: 88px;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.bgrem-preview-card,
.bgrem-compare-card,
.bgrem-options-card {
  overflow: hidden;
}

.bgrem-preview-card > img,
.bgrem-checkerboard,
.bgrem-final-preview,
.bgrem-compare {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  background-color: rgba(248, 250, 252, 0.96) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 18px 42px rgba(0, 0, 0, 0.18) !important;
}

.bgrem-checkerboard,
.bgrem-final-preview.is-transparent,
.bgrem-compare-after {
  background-color: #f8fafc !important;
  background-image:
    linear-gradient(45deg, #dbe3ee 25%, transparent 25%),
    linear-gradient(-45deg, #dbe3ee 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #dbe3ee 75%),
    linear-gradient(-45deg, transparent 75%, #dbe3ee 75%) !important;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0 !important;
  background-size: 24px 24px !important;
}

.bgrem-preview-card > img,
.bgrem-checkerboard img,
.bgrem-final-preview img {
  width: 100%;
  max-width: 100%;
  min-height: 0;
  max-height: min(62vh, 520px);
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.bgrem-compare {
  max-height: min(68vh, 620px);
}

.bgrem-compare img {
  max-width: none;
}

.bgrem-compare [data-bgrem-compare-handle] {
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.2), 0 0 24px rgba(14, 165, 233, 0.28) !important;
}

.bgrem-compare [data-bgrem-compare-handle]::after {
  background: linear-gradient(135deg, #0a84ff, #20d47b) !important;
  border: 4px solid #ffffff;
  box-shadow: 0 16px 36px rgba(10, 132, 255, 0.28) !important;
}

.bgrem-range-label input[type="range"] {
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  accent-color: #0a84ff;
}

.bgrem-options label {
  color: #f8fafc !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  background:
    radial-gradient(circle at 14% 0%, rgba(14, 165, 233, 0.1), transparent 12rem),
    rgba(255, 255, 255, 0.055) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.bgrem-options label:hover,
.bgrem-options label:has(input[type="radio"]:checked) {
  border-color: rgba(56, 189, 248, 0.52) !important;
  background: linear-gradient(135deg, rgba(10, 132, 255, 0.2), rgba(32, 212, 123, 0.12)) !important;
  box-shadow: 0 16px 34px rgba(10, 132, 255, 0.16) !important;
}

.bgrem-options input[type="color"] {
  background: transparent !important;
}

.bgrem-bg-image-option input[type="file"] {
  color: #cbd5e1 !important;
}

.bgrem-final-preview {
  padding: clamp(10px, 2vw, 16px);
}

.bgrem-downloads .btn,
.bgrem-mobile-action .btn {
  box-shadow: 0 14px 34px rgba(10, 132, 255, 0.2);
}

.bgrem-guide-list li,
.bgrem-faq-section .faq-list details {
  color: #f8fafc !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  background:
    radial-gradient(circle at 14% 0%, rgba(14, 165, 233, 0.1), transparent 16rem),
    rgba(255, 255, 255, 0.055) !important;
}

@media (max-width: 980px) {
  .bgrem-upload-head {
    text-align: center;
    margin-inline: auto;
  }
}

@media (max-width: 720px) {
  .bgrem-result-toolbar {
    position: static;
    display: grid;
    align-items: start;
  }

  .bgrem-result-toolbar .btn {
    width: 100%;
  }

  .bgrem-preview-card,
  .bgrem-compare-card,
  .bgrem-options-card {
    border-radius: 24px;
    padding: 16px;
  }

  .bgrem-preview-card > img,
  .bgrem-checkerboard img,
  .bgrem-final-preview img {
    max-height: 440px;
  }

  .bgrem-compare {
    aspect-ratio: 4 / 5;
    max-height: 520px;
  }
}

@media (max-width: 480px) {
  .bgrem-upload-card,
  .bgrem-result-toolbar,
  .bgrem-preview-card,
  .bgrem-compare-card,
  .bgrem-options-card {
    border-radius: 22px;
  }

  .bgrem-dropzone {
    min-height: 220px;
    border-radius: 24px;
  }

  .bgrem-card-head {
    display: grid;
  }

  .bgrem-options {
    grid-template-columns: 1fr;
  }

  .bgrem-bg-image-option {
    grid-column: auto;
  }

  .bgrem-downloads {
    display: grid;
    grid-template-columns: 1fr;
  }
}
