/* ==========================================================================
   FacePair Celebrity Look-Alike & Twin Finder Stylesheet
   Design system scoped to #fcw.fcw-celebrity container
   ========================================================================== */

#fcw.fcw-celebrity {
  container-type: inline-size;
  container-name: celeb-widget;
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 1.5rem 1.75rem 1.25rem;
}

/* Inline Trust Bar Chips */
#fcw.fcw-celebrity .fcw-trust-bar {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

#fcw.fcw-celebrity .fcw-trust-chip,
#fcw.fcw-celebrity .fcw-help-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  white-space: nowrap;
  padding: 0.24rem 0.6rem;
  font-size: 0.76rem;
  line-height: 1.25;
}

/* Mode Tabs (Always Inline 3-Column Row on Desktop & Mobile) */
#fcw.fcw-celebrity .fcw-mode-tabs {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  flex-direction: row !important;
  align-items: stretch !important;
  width: 100% !important;
  gap: 0.45rem;
  margin: 1.15rem 0 1rem;
  padding: 0.35rem;
  background: var(--fcw-bg-subtle, #f1f5f9);
  border-radius: var(--fcw-radius-lg, 12px);
  border: 1px solid var(--fcw-border, #e2e8f0);
}

#fcw.fcw-celebrity .fcw-mode-tab {
  width: 100%;
  min-width: 0;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  padding: 0.72rem 0.6rem;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  color: var(--fcw-text-muted, #64748b);
  background: transparent;
  border: none;
  border-radius: var(--fcw-radius-md, 8px);
  cursor: pointer;
  transition: all 0.2s ease;
}

#fcw.fcw-celebrity .fcw-mode-tab:hover {
  color: var(--fcw-text-main, #0f172a);
}

#fcw.fcw-celebrity .fcw-mode-tab.is-active {
  color: var(--fcw-accent, #2563eb);
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Personalized Mode Options Panels (Tab 1, Tab 2, Tab 3) */
#fcw.fcw-celebrity .fcw-mode-options-panel,
#fcw.fcw-celebrity .fcw-celeb-filter-bar,
#fcw.fcw-celebrity .fcw-celeb-custom-star-bar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 0.95rem 1.1rem;
  background: #ffffff;
  border: 1px solid var(--fcw-border, #e2e8f0);
  border-radius: var(--fcw-radius-lg, 12px);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

#fcw.fcw-celebrity .fcw-mode-context-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #f1f5f9;
}

#fcw.fcw-celebrity .fcw-mode-hint-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

#fcw.fcw-celebrity .fcw-mode-hint-text {
  font-size: 0.84rem;
  color: #475569;
  line-height: 1.4;
}

#fcw.fcw-celebrity .fcw-mode-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
}

#fcw.fcw-celebrity .fcw-filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 210px;
}

#fcw.fcw-celebrity .fcw-filter-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fcw-text-muted, #64748b);
  white-space: nowrap;
}

#fcw.fcw-celebrity .fcw-star-search-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.86rem;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
}

#fcw.fcw-celebrity .fcw-star-search-input:focus {
  border-color: #2563eb;
  background: #ffffff;
}

#fcw.fcw-celebrity .fcw-selected-star-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.7rem 0.25rem 0.3rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e40af;
  white-space: nowrap;
}

#fcw.fcw-celebrity .fcw-selected-star-chip-img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #ffffff;
}

/* Dropzone & Upload */
#fcw.fcw-celebrity .fcw-celeb-upload-section {
  margin-bottom: 1.5rem;
}

#fcw.fcw-celebrity .fcw-dropzone {
  position: relative;
  border: 2px dashed var(--fcw-border, #cbd5e1);
  border-radius: var(--fcw-radius-lg, 12px);
  padding: 2.25rem 1.5rem;
  text-align: center;
  background: var(--fcw-bg-subtle, #f8fafc);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

#fcw.fcw-celebrity .fcw-dropzone:hover,
#fcw.fcw-celebrity .fcw-dropzone.is-dragover {
  border-color: var(--fcw-accent, #2563eb);
  background: #eff6ff;
}

#fcw.fcw-celebrity .fcw-dropzone-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

#fcw.fcw-celebrity .fcw-dropzone-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fcw-text-main, #0f172a);
}

#fcw.fcw-celebrity .fcw-dropzone-link {
  color: var(--fcw-accent, #2563eb);
  text-decoration: underline;
}

#fcw.fcw-celebrity .fcw-dropzone-sub {
  margin: 0;
  font-size: 0.82rem;
  color: var(--fcw-text-muted, #64748b);
}

#fcw.fcw-celebrity .fcw-dropzone-filled {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

#fcw.fcw-celebrity .fcw-user-preview-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

#fcw.fcw-celebrity .fcw-btn-change-photo {
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fcw-text-main, #0f172a);
  background: #ffffff;
  border: 1px solid var(--fcw-border, #cbd5e1);
  border-radius: var(--fcw-radius-md, 8px);
  cursor: pointer;
}

/* Loading State */
#fcw.fcw-celebrity .fcw-loading-wrap {
  margin: 2rem 0;
  padding: 2rem;
  text-align: center;
  background: #ffffff;
  border-radius: var(--fcw-radius-lg, 12px);
  border: 1px solid var(--fcw-border, #e2e8f0);
}

#fcw.fcw-celebrity .fcw-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 1rem;
  border: 4px solid #e2e8f0;
  border-top-color: var(--fcw-accent, #2563eb);
  border-radius: 50%;
  animation: fcw-spin 0.8s linear infinite;
}

@keyframes fcw-spin {
  to { transform: rotate(360deg); }
}

#fcw.fcw-celebrity .fcw-loading-header-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

#fcw.fcw-celebrity .fcw-loading-step-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

#fcw.fcw-celebrity .fcw-loading-pct {
  font-size: 0.85rem;
  font-weight: 800;
  color: #2563eb;
  font-variant-numeric: tabular-nums;
}

#fcw.fcw-celebrity .fcw-loading-text {
  margin: 0 auto 1rem;
  max-width: 520px;
  min-height: 2.6em;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--fcw-text-main, #0f172a);
}

#fcw.fcw-celebrity .fcw-loading-bar-track {
  width: 100%;
  max-width: 420px;
  height: 8px;
  margin: 0 auto 1rem;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

#fcw.fcw-celebrity .fcw-loading-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb 0%, #4f46e5 100%);
  border-radius: 999px;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

#fcw.fcw-celebrity .fcw-loading-stages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  max-width: 560px;
  margin: 0 auto;
}

#fcw.fcw-celebrity .fcw-stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
  transition: all 0.25s ease;
}

#fcw.fcw-celebrity .fcw-stage-pill.is-active {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #93c5fd;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.14);
}

#fcw.fcw-celebrity .fcw-stage-pill.is-done {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

/* Hero Match Card */
#fcw.fcw-celebrity .fcw-hero-match-card {
  padding: 1.75rem;
  background: #ffffff;
  border: 1px solid var(--fcw-border, #e2e8f0);
  border-radius: var(--fcw-radius-lg, 16px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.5rem;
}

#fcw.fcw-celebrity .fcw-match-portraits {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

#fcw.fcw-celebrity .fcw-portrait-box {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 150px;
}

#fcw.fcw-celebrity .fcw-portrait-img {
  width: 140px;
  height: 175px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#fcw.fcw-celebrity .fcw-portrait-caption {
  margin-top: 0.45rem;
  font-size: 0.75rem;
  color: var(--fcw-text-muted, #64748b);
  text-align: center;
  max-width: 150px;
  line-height: 1.3;
}

#fcw.fcw-celebrity .fcw-celeb-credit {
  font-size: 0.68rem;
  color: #94a3b8;
}

#fcw.fcw-celebrity .fcw-celeb-credit a {
  color: #64748b;
  text-decoration: underline;
}

#fcw.fcw-celebrity .fcw-match-badge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 2px solid #bfdbfe;
  padding: 0.85rem 1.1rem;
  border-radius: 50%;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
}

#fcw.fcw-celebrity .fcw-match-percent {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--fcw-accent, #2563eb);
  line-height: 1;
}

#fcw.fcw-celebrity .fcw-match-badge-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: #1e40af;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.2rem;
  text-align: center;
}

#fcw.fcw-celebrity .fcw-match-summary {
  text-align: center;
}

#fcw.fcw-celebrity .fcw-match-name {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--fcw-text-main, #0f172a);
}

#fcw.fcw-celebrity .fcw-match-category-tag {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
  text-transform: capitalize;
}

#fcw.fcw-celebrity .fcw-free-trait-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 999px;
}

/* Trait Resemblance Breakdown */
#fcw.fcw-celebrity .fcw-section-subhead {
  margin: 1.5rem 0 0.85rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--fcw-text-main, #0f172a);
}

#fcw.fcw-celebrity .fcw-traits-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

#fcw.fcw-celebrity .fcw-trait-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border: 1px solid var(--fcw-border, #e2e8f0);
  border-radius: var(--fcw-radius-md, 8px);
}

#fcw.fcw-celebrity .fcw-trait-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--fcw-text-main, #0f172a);
  min-width: 140px;
}

#fcw.fcw-celebrity .fcw-trait-bar-track {
  flex: 1;
  height: 8px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
}

#fcw.fcw-celebrity .fcw-trait-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  border-radius: 4px;
}

#fcw.fcw-celebrity .fcw-trait-score {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--fcw-text-main, #0f172a);
  min-width: 45px;
  text-align: right;
}

/* Locked Overlay & Badges */
#fcw.fcw-celebrity .fcw-locked-blur {
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
  opacity: 0.65;
}

#fcw.fcw-celebrity .fcw-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
}

/* Top 10 Matches List */
#fcw.fcw-celebrity .fcw-top-matches-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

#fcw.fcw-celebrity .fcw-match-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border: 1px solid var(--fcw-border, #e2e8f0);
  border-radius: var(--fcw-radius-md, 8px);
}

#fcw.fcw-celebrity .fcw-match-item-rank {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fcw-text-muted, #64748b);
  width: 28px;
}

#fcw.fcw-celebrity .fcw-match-item-thumb {
  width: 44px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

#fcw.fcw-celebrity .fcw-match-item-info {
  flex: 1;
}

#fcw.fcw-celebrity .fcw-match-item-name {
  margin: 0 0 0.15rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fcw-text-main, #0f172a);
}

#fcw.fcw-celebrity .fcw-match-item-cat {
  margin: 0;
  font-size: 0.75rem;
  color: var(--fcw-text-muted, #64748b);
  text-transform: capitalize;
}

#fcw.fcw-celebrity .fcw-match-item-score {
  font-size: 1rem;
  font-weight: 700;
  color: var(--fcw-accent, #2563eb);
}

/* Tab 2: Celebrity Parents Duo */
#fcw.fcw-celebrity .fcw-parents-hero-card {
  padding: 1.75rem;
  background: #ffffff;
  border: 1px solid var(--fcw-border, #e2e8f0);
  border-radius: var(--fcw-radius-lg, 16px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.5rem;
}

#fcw.fcw-celebrity .fcw-parents-duo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

#fcw.fcw-celebrity .fcw-parent-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

#fcw.fcw-celebrity .fcw-parent-role-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

#fcw.fcw-celebrity .fcw-parent-dad .fcw-parent-role-badge {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

#fcw.fcw-celebrity .fcw-parent-mom .fcw-parent-role-badge {
  background: #fdf2f8;
  color: #9d174d;
  border: 1px solid #fbcfe8;
}

#fcw.fcw-celebrity .fcw-parent-name {
  margin: 0.4rem 0 0.15rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fcw-text-main, #0f172a);
}

#fcw.fcw-celebrity .fcw-parent-score {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fcw-text-muted, #64748b);
}

/* Parents Split Meter */
#fcw.fcw-celebrity .fcw-parents-split-meter {
  flex: 1.5;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0 1rem;
}

#fcw.fcw-celebrity .fcw-split-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
}

#fcw.fcw-celebrity .fcw-split-label-dad {
  color: #2563eb;
}

#fcw.fcw-celebrity .fcw-split-label-center {
  color: var(--fcw-text-muted, #64748b);
  font-weight: 600;
}

#fcw.fcw-celebrity .fcw-split-label-mom {
  color: #db2777;
}

#fcw.fcw-celebrity .fcw-split-bar-track {
  height: 14px;
  background: #e2e8f0;
  border-radius: 999px;
  display: flex;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

#fcw.fcw-celebrity .fcw-split-bar-dad {
  background: #3b82f6;
  height: 100%;
  transition: width 0.4s ease;
}

#fcw.fcw-celebrity .fcw-split-bar-mom {
  background: #ec4899;
  height: 100%;
  transition: width 0.4s ease;
}

#fcw.fcw-celebrity .fcw-split-verdict {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--fcw-text-muted, #64748b);
  text-align: center;
}

/* Inheritance Table */
#fcw.fcw-celebrity .fcw-inheritance-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.88rem;
}

#fcw.fcw-celebrity .fcw-inheritance-table th,
#fcw.fcw-celebrity .fcw-inheritance-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--fcw-border, #e2e8f0);
  text-align: left;
}

#fcw.fcw-celebrity .fcw-inheritance-table th {
  font-weight: 700;
  color: var(--fcw-text-muted, #64748b);
  background: #f8fafc;
}

/* Cross-Tool Upsell Card */
#fcw.fcw-celebrity .fcw-celeb-upsell-card {
  margin: 1.75rem 0;
  padding: 1.75rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid #cbd5e1;
  border-radius: var(--fcw-radius-lg, 16px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  text-align: center;
}

#fcw.fcw-celebrity .fcw-upsell-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}

#fcw.fcw-celebrity .fcw-upsell-title {
  margin: 0 0 0.45rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--fcw-text-main, #0f172a);
}

#fcw.fcw-celebrity .fcw-upsell-desc {
  margin: 0 auto 1.25rem;
  max-width: 540px;
  font-size: 0.92rem;
  color: var(--fcw-text-muted, #64748b);
  line-height: 1.45;
}

#fcw.fcw-celebrity .fcw-bundle-features {
  max-width: 520px;
  margin: 0 auto 1.5rem;
  padding: 1rem 1.25rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--fcw-radius-md, 10px);
  text-align: left;
}

#fcw.fcw-celebrity .fcw-bundle-feature-title {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e40af;
}

#fcw.fcw-celebrity .fcw-bundle-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.82rem;
  color: #1e3a8a;
  line-height: 1.5;
}

#fcw.fcw-celebrity .fcw-pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

#fcw.fcw-celebrity .fcw-price-tier {
  position: relative;
  padding: 1.25rem 1rem;
  background: #ffffff;
  border: 1px solid var(--fcw-border, #e2e8f0);
  border-radius: var(--fcw-radius-md, 10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#fcw.fcw-celebrity .fcw-tier-featured {
  border: 2px solid var(--fcw-accent, #2563eb);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.15);
  transform: translateY(-2px);
}

#fcw.fcw-celebrity .fcw-tier-ribbon {
  position: absolute;
  top: -10px;
  background: var(--fcw-accent, #2563eb);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
}

#fcw.fcw-celebrity .fcw-tier-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fcw-text-main, #0f172a);
}

#fcw.fcw-celebrity .fcw-tier-price {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--fcw-text-main, #0f172a);
  margin-bottom: 0.25rem;
}

#fcw.fcw-celebrity .fcw-tier-featured .fcw-tier-price {
  color: var(--fcw-accent, #2563eb);
}

#fcw.fcw-celebrity .fcw-tier-sub {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  color: var(--fcw-text-muted, #64748b);
  min-height: 32px;
}

#fcw.fcw-celebrity .fcw-btn-tier {
  width: 100%;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--fcw-text-main, #0f172a);
  background: #f1f5f9;
  border: 1px solid var(--fcw-border, #cbd5e1);
  border-radius: var(--fcw-radius-md, 8px);
  cursor: pointer;
  transition: all 0.2s ease;
}

#fcw.fcw-celebrity .fcw-btn-tier:hover {
  background: #e2e8f0;
}

#fcw.fcw-celebrity .fcw-btn-featured {
  color: #ffffff;
  background: var(--fcw-accent, #2563eb);
  border-color: var(--fcw-accent, #2563eb);
}

#fcw.fcw-celebrity .fcw-btn-featured:hover {
  background: #1d4ed8;
}

#fcw.fcw-celebrity .fcw-reassure-text {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  color: var(--fcw-text-muted, #64748b);
}

#fcw.fcw-celebrity .fcw-restore-trigger {
  background: none;
  border: none;
  color: var(--fcw-accent, #2563eb);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* Result Action Buttons */
#fcw.fcw-celebrity .fcw-result-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 1.5rem 0;
}

#fcw.fcw-celebrity .fcw-btn-export,
#fcw.fcw-celebrity .fcw-btn-repeat {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--fcw-radius-md, 8px);
  cursor: pointer;
  transition: all 0.2s ease;
}

#fcw.fcw-celebrity .fcw-btn-export {
  color: #ffffff;
  background: var(--fcw-accent, #2563eb);
  border: 1px solid var(--fcw-accent, #2563eb);
}

#fcw.fcw-celebrity .fcw-btn-repeat {
  color: var(--fcw-text-main, #0f172a);
  background: #ffffff;
  border: 1px solid var(--fcw-border, #cbd5e1);
}

/* Legal Footer */
#fcw.fcw-celebrity .fcw-legal-disclaimer {
  margin: 1.5rem 0 0;
  font-size: 0.78rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1.4;
}

/* Inline Restore Access Bar (Below Upload Dropzone) */
#fcw.fcw-celebrity .fcw-celeb-restore-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.35rem 0 1.5rem 0;
  padding: 0.25rem 0;
}

#fcw.fcw-celebrity .fcw-restore-inline-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.2rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #1e40af;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: background 0.15s ease, border-color 0.15s ease;
}

#fcw.fcw-celebrity .fcw-restore-inline-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

#fcw.fcw-celebrity .fcw-restore-unlocked-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.85rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  color: #047857;
  font-size: 0.78rem;
  font-weight: 700;
}

/* Standalone & Scoped Modal Styles for Restore Pass & Share Card */
#fc-restore-modal-backdrop,
#fcw.fcw-celebrity .fcw-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#fc-restore-modal-backdrop .fcw-modal-dialog,
#fcw.fcw-celebrity .fcw-modal-dialog {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  padding: 1.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 90vh;
  overflow-y: auto;
}

#fcw.fcw-celebrity .fcw-bundle-list a {
  color: #1e3a8a;
  text-decoration: underline;
}

/* Container & Media Queries for Responsive Mobile Layout */
@container celeb-widget (max-width: 640px) {
  #fcw.fcw-celebrity .fcw-mode-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    flex-direction: row !important;
    gap: 0.25rem;
    padding: 0.2rem;
  }

  #fcw.fcw-celebrity .fcw-mode-tab {
    padding: 0.5rem 0.25rem;
    font-size: 0.75rem;
    gap: 0.22rem;
  }

  #fcw.fcw-celebrity .fcw-match-portraits {
    flex-direction: column;
    gap: 1rem;
  }

  #fcw.fcw-celebrity .fcw-portrait-box {
    width: 100%;
    max-width: 180px;
  }

  #fcw.fcw-celebrity .fcw-parents-duo {
    flex-direction: column;
    gap: 1.25rem;
  }

  #fcw.fcw-celebrity .fcw-pricing-grid {
    grid-template-columns: 1fr;
  }

  #fcw.fcw-celebrity .fcw-result-actions {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  #fcw.fcw-celebrity {
    padding: 1rem 0.75rem;
    border-radius: 14px;
    margin: 0 auto;
  }

  #fcw.fcw-celebrity .fcw-trust-bar {
    gap: 0.3rem;
  }

  #fcw.fcw-celebrity .fcw-trust-chip,
  #fcw.fcw-celebrity .fcw-help-toggle {
    padding: 0.2rem 0.48rem;
    font-size: 0.69rem;
  }

  #fcw.fcw-celebrity .fcw-mode-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    flex-direction: row !important;
    gap: 0.25rem;
    padding: 0.2rem;
  }

  #fcw.fcw-celebrity .fcw-mode-tab {
    padding: 0.5rem 0.22rem;
    font-size: 0.74rem;
    gap: 0.2rem;
  }
}
