:root {
  --bf-bg: #080808;
  --bf-panel: #161616;
  --bf-panel-solid: #1a1a1a;
  --bf-line: rgba(255, 214, 120, 0.28);
  --bf-line-strong: rgba(255, 214, 120, 0.45);
  --bf-gold: #ffd166;
  --bf-gold-strong: #ffe08a;
  --bf-red: #ff5c5c;
  --bf-text: #fff8ee;
  --bf-muted: #d7cbb8;
  --bf-muted-soft: #b9ae9d;
  --bf-fill: linear-gradient(90deg, #a11f1f 0%, #ffd166 100%);
  --bf-focus: #ffe08a;
}

.bf-page {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(160, 28, 28, 0.22), transparent 38%),
    radial-gradient(circle at 88% 0%, rgba(255, 209, 102, 0.1), transparent 32%),
    linear-gradient(180deg, #050505 0%, #0d0d0d 55%, #090909 100%);
  color: var(--bf-text);
  min-height: 70vh;
  padding-bottom: 72px;
  font-family: peyda-regular, Yekan-Bakh, Tahoma, sans-serif;
  text-align: right;
  direction: rtl;
}

.bf-page a { color: inherit; text-decoration: none; }
.bf-page a:focus-visible,
.bf-submit:focus-visible,
.bf-item-choice:focus-within,
.bf-field input:focus-visible,
.bf-home-modal__close:focus-visible {
  outline: 2px solid var(--bf-focus);
  outline-offset: 2px;
}

.bf-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}
.bf-glow--a { top: -120px; right: -80px; background: rgba(180, 30, 30, 0.28); }
.bf-glow--b { bottom: 10%; left: -100px; background: rgba(240, 195, 90, 0.1); }

.bf-container {
  width: min(1100px, calc(100% - 28px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.bf-kicker {
  letter-spacing: 0.18em;
  color: var(--bf-gold);
  font-size: 12px;
  margin: 0 0 10px;
  font-family: peyda-bold, sans-serif;
  text-align: right;
}
.bf-title {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.35;
  font-family: peyda-extrabold, Yekantitr, sans-serif;
  color: #fff;
  text-align: right;
}
.bf-title--xl {
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  letter-spacing: 0.02em;
  text-align: right;
}
.bf-title--single {
  font-size: clamp(1.55rem, 4.2vw, 2.25rem);
  text-align: right;
}
.bf-lead {
  color: var(--bf-muted);
  font-size: 1rem;
  line-height: 1.9;
  margin: 0;
  max-width: 40rem;
  text-align: right;
}

.bf-archive-hero {
  padding: 40px 0 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 8px;
}
.bf-back {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--bf-muted);
  font-size: 0.9rem;
}
.bf-back:hover { color: var(--bf-gold); }
.bf-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  justify-content: flex-start;
}
.bf-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--bf-line);
  background: rgba(255,255,255,0.05);
  font-size: 0.84rem;
  color: var(--bf-text);
}
.bf-pill--gold {
  color: #1a1200;
  background: var(--bf-gold);
  border-color: transparent;
  font-family: peyda-bold, sans-serif;
}
.bf-pill--danger {
  color: #fff;
  background: #b42323;
  border-color: transparent;
}
.bf-pill--ghost {
  color: var(--bf-muted);
  background: rgba(255,255,255,0.03);
}

.bf-section { padding: 20px 0 40px; }

/* Archive cards — mobile-style horizontal layout on all screens */
.bf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.bf-card {
  background: var(--bf-panel-solid);
  border: 1px solid var(--bf-line);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.bf-card:hover {
  transform: translateY(-2px);
  border-color: var(--bf-line-strong);
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}
.bf-card--mini {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: stretch;
  min-height: 148px;
}
.bf-card--mini .bf-card__media {
  position: relative;
  display: block;
  overflow: hidden;
  background: #101010;
  min-height: 148px;
  height: 100%;
  aspect-ratio: auto;
  max-height: none;
}
.bf-card--mini .bf-card__image,
.bf-card--mini .bf-card__placeholder {
  width: 100%;
  height: 100%;
  min-height: 148px;
  max-height: none;
  object-fit: cover;
  display: block;
}
.bf-card__placeholder {
  display: grid;
  place-items: center;
  font-family: peyda-extrabold, sans-serif;
  color: var(--bf-gold);
  letter-spacing: 0.12em;
  background: linear-gradient(145deg, #1a0d0d, #101010);
}
.bf-card__ribbon {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #4a4a4a;
  color: #fff;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-family: peyda-bold, sans-serif;
}
.bf-card__ribbon--live {
  background: var(--bf-gold);
  color: #1a1200;
}
.bf-card--mini .bf-card__body {
  padding: 12px 14px;
  display: grid;
  gap: 8px;
  align-content: center;
  text-align: right;
}
.bf-card__title {
  margin: 0;
  font-size: 1rem;
  font-family: peyda-bold, sans-serif;
  line-height: 1.5;
  text-align: right;
  color: #fff;
}
.bf-card__title a { color: inherit; }
.bf-card__stats {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--bf-muted);
  font-size: 0.78rem;
}
.bf-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.bf-chip {
  display: grid;
  gap: 2px;
  text-align: center;
  padding: 7px 4px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: #101010;
}
.bf-chip em {
  font-style: normal;
  color: var(--bf-muted-soft);
  font-size: 0.7rem;
}
.bf-chip strong {
  font-family: peyda-bold, sans-serif;
  font-size: 0.86rem;
  color: var(--bf-gold-strong);
}
.bf-chip.is-active {
  border-color: rgba(255,209,102,0.65);
  background: rgba(255,209,102,0.08);
}
.bf-chip.is-full { opacity: 0.55; }
.bf-card__cta {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(90deg, #b42323, #d9a84a);
  color: #fff !important;
  font-family: peyda-bold, sans-serif;
  font-size: 0.9rem;
  min-height: 40px;
}

/* Single layout */
.bf-single-top { padding: 28px 0 24px; }
.bf-single-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  align-items: stretch;
}
.bf-single-media {
  position: sticky;
  top: 18px;
  align-self: stretch;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--bf-line);
  background: #0f0f0f;
  min-height: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bf-single-media__image,
.bf-single-media__placeholder {
  width: 100%;
  height: 100%;
  min-height: 520px;
  max-height: none;
  object-fit: contain;
  object-position: center top;
  display: block;
  background: #0f0f0f;
}
.bf-single-media__placeholder {
  display: grid;
  place-items: center;
  font-family: peyda-extrabold, sans-serif;
  color: var(--bf-gold);
  letter-spacing: 0.1em;
  background: linear-gradient(145deg, #1a0d0d, #101010);
}
.bf-single-main { min-width: 0; text-align: right; }
.bf-single-stack {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}
.bf-panel {
  background: var(--bf-panel-solid);
  border: 1px solid var(--bf-line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.22);
}
.bf-panel + .bf-panel {
  border-color: rgba(255,255,255,0.12);
}
.bf-panel--form {
  border-color: var(--bf-line-strong);
  background: linear-gradient(180deg, #1d1a14 0%, #161616 100%);
}
.bf-panel__head {
  text-align: right;
  margin-bottom: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 14px;
}
.bf-panel__head h2 {
  margin: 0 0 8px;
  font-size: 1.12rem;
  font-family: peyda-bold, sans-serif;
  color: #fff;
  text-align: right;
}
.bf-panel__head p {
  margin: 0;
  color: var(--bf-muted);
  font-size: 0.92rem;
  line-height: 1.8;
  text-align: right;
}
.bf-content {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: var(--bf-muted);
  line-height: 1.95;
  font-size: 0.95rem;
  text-align: right;
}
.bf-content p,
.bf-content ul,
.bf-content ol,
.bf-content li {
  text-align: right;
}
.bf-content ul,
.bf-content ol {
  padding-right: 1.2em;
  padding-left: 0;
}

.bf-items {
  display: grid;
  gap: 14px;
}
.bf-item-card {
  border: 1px solid rgba(255,255,255,0.12);
  background: #121212;
  border-radius: 14px;
  padding: 14px;
  text-align: right;
}
.bf-item-card.is-full { opacity: 0.7; }
.bf-item-card.is-open {
  border-color: rgba(255,209,102,0.28);
}
.bf-item-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.bf-item-card__head h3 {
  margin: 0;
  font-size: 1.08rem;
  font-family: peyda-bold, sans-serif;
  color: #fff;
  text-align: right;
}
.bf-item-card__price {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 10px;
  color: var(--bf-muted);
  justify-content: flex-start;
}
.bf-item-card__price s { opacity: 0.75; font-size: 0.88rem; }
.bf-item-card__price strong {
  color: var(--bf-gold-strong);
  font-size: 1.08rem;
  font-family: peyda-bold, sans-serif;
}
.bf-item-card__note {
  color: var(--bf-muted);
  font-size: 0.86rem;
  line-height: 1.7;
  text-align: right;
}
.bf-item-card__meta {
  margin-top: 10px;
  color: var(--bf-muted);
  font-size: 0.84rem;
  text-align: right;
}
.bf-field--items {
  text-align: right;
  width: 100%;
  max-width: 100%;
}
.bf-field--items .bf-field__label {
  display: block;
  margin-bottom: 8px;
  text-align: right;
  color: var(--bf-muted);
  font-size: 0.88rem;
}
.bf-item-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 100%;
}
.bf-item-choice {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  column-gap: 12px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 14px;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #101010;
  cursor: pointer;
  direction: ltr; /* col1=text, col2=radio on physical right */
  text-align: right;
  overflow: hidden;
}
.bf-item-choice__body {
  grid-column: 1;
  min-width: 0;
  display: grid;
  gap: 4px;
  direction: rtl;
  text-align: right;
}
.bf-item-choice__body strong {
  font-family: peyda-bold, sans-serif;
  color: #fff;
  text-align: right;
  display: block;
  overflow-wrap: anywhere;
}
.bf-item-choice__body em {
  font-style: normal;
  color: var(--bf-muted);
  font-size: 0.86rem;
  text-align: right;
  display: block;
  direction: rtl;
}
.bf-item-choice__bullet {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}
.bf-item-choice__bullet input[type="radio"] {
  margin: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--bf-gold);
}
.bf-item-choice:has(input:checked) {
  border-color: rgba(255,209,102,0.7);
  background: rgba(255,209,102,0.08);
  box-shadow: inset 0 0 0 1px rgba(255,209,102,0.12);
}
.bf-item-choice.is-disabled { opacity: 0.5; cursor: not-allowed; }

.bf-tiers { display: grid; gap: 10px; }
.bf-tier {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: #0f0f0f;
}
.bf-tier.is-active {
  border-color: rgba(255,209,102,0.65);
  background: rgba(255,209,102,0.07);
  box-shadow: 0 0 0 1px rgba(255,209,102,0.12) inset;
}
.bf-tier.is-full { opacity: 0.68; }
.bf-tier__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.bf-tier__label { color: var(--bf-muted); font-size: 0.88rem; }
.bf-tier__percent {
  font-size: 1.2rem;
  font-family: peyda-extrabold, sans-serif;
  color: var(--bf-gold-strong);
}
.bf-tier__track {
  height: 12px;
  border-radius: 999px;
  background: #242424;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}
.bf-tier__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--bf-fill);
  transition: width 0.7s cubic-bezier(.2,.8,.2,1);
}
.bf-tier__meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--bf-muted);
}
.bf-tier__badge {
  color: #1a1200;
  background: var(--bf-gold);
  padding: 2px 8px;
  border-radius: 999px;
  font-family: peyda-bold, sans-serif;
}
.bf-tier__badge--full {
  background: #5c5c5c;
  color: #fff;
}

.bf-form { display: grid; gap: 12px; width: 100%; max-width: 100%; box-sizing: border-box; }
.bf-field { display: grid; gap: 7px; text-align: right; width: 100%; max-width: 100%; box-sizing: border-box; min-width: 0; }
.bf-field span,
.bf-field > span {
  font-size: 0.88rem;
  color: var(--bf-muted);
  text-align: right;
}
.bf-field input {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.16);
  background: #0c0c0c;
  color: #fff;
  border-radius: 11px;
  padding: 14px 12px;
  outline: none;
  font-size: 16px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.bf-field input::placeholder { color: #8f877a; }
.bf-field input:focus {
  border-color: rgba(255,209,102,0.8);
  box-shadow: 0 0 0 3px rgba(255,209,102,0.16);
}
.bf-submit {
  border: 0;
  border-radius: 11px;
  padding: 15px 16px;
  background: linear-gradient(90deg, #b42323, #d9a84a);
  color: #fff;
  font-family: peyda-bold, sans-serif;
  font-size: 1rem;
  cursor: pointer;
  min-height: 48px;
}
.bf-submit:hover { filter: brightness(1.05); }
.bf-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.bf-hint {
  margin: 0;
  color: var(--bf-muted);
  font-size: 0.86rem;
  line-height: 1.8;
  text-align: right;
}
.bf-closed {
  border: 1px solid rgba(255,92,92,0.45);
  background: rgba(143,29,29,0.22);
  border-radius: 12px;
  padding: 14px;
  text-align: right;
}
.bf-closed strong {
  display: block;
  margin-bottom: 6px;
  color: #ffd0d0;
  text-align: right;
}
.bf-closed p {
  margin: 0;
  color: #f0d4d4;
  font-size: 0.9rem;
  text-align: right;
  line-height: 1.8;
}

.bf-toast {
  margin-bottom: 12px;
  border-radius: 12px;
  padding: 12px 14px;
  line-height: 1.85;
  border: 1px solid rgba(255,209,102,0.45);
  background: rgba(255,209,102,0.14);
  color: #ffe9b0;
  font-size: 0.92rem;
  text-align: right;
  animation: bfToastIn 0.35s ease;
}
.bf-toast.is-error {
  border-color: rgba(255,92,92,0.5);
  background: rgba(143,29,29,0.28);
  color: #ffd0d0;
}
@keyframes bfToastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.bf-countdown {
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--bf-line);
  background: rgba(0,0,0,0.4);
  text-align: right;
}
.bf-countdown--hero {
  margin-top: 20px;
  max-width: 480px;
}
.bf-countdown__label {
  margin: 0 0 10px;
  color: var(--bf-muted);
  font-size: 0.9rem;
  text-align: right;
}
.bf-countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.bf-countdown__grid div {
  text-align: center;
  background: #121212;
  border-radius: 10px;
  padding: 10px 4px;
  border: 1px solid rgba(255,255,255,0.08);
}
.bf-countdown__grid strong {
  display: block;
  font-size: 1.2rem;
  font-family: peyda-extrabold, sans-serif;
  color: var(--bf-gold-strong);
}
.bf-countdown__grid span {
  color: var(--bf-muted);
  font-size: 0.74rem;
}
.bf-empty {
  text-align: center;
  padding: 40px 18px;
  border: 1px dashed var(--bf-line);
  border-radius: 14px;
  color: var(--bf-muted);
  background: rgba(255,255,255,0.02);
}
.is-hidden { display: none !important; }

/* Home modal */
.bf-home-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 18px;
}
.bf-home-modal[hidden] { display: none !important; }
.bf-home-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(4px);
}
.bf-home-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  animation: bfModalIn 0.35s ease;
}
.bf-home-modal__close {
  position: absolute;
  top: -12px;
  left: -12px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #1a1a1a;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}
.bf-home-modal__link {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,209,102,0.4);
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}
.bf-home-modal__link img {
  display: block;
  width: 100%;
  height: auto;
}
@keyframes bfModalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 980px) {
  .bf-grid { grid-template-columns: 1fr; }
  .bf-card--mini {
    grid-template-columns: 120px minmax(0, 1fr);
    min-height: 132px;
  }
  .bf-card--mini .bf-card__media,
  .bf-card--mini .bf-card__image,
  .bf-card--mini .bf-card__placeholder {
    min-height: 132px;
  }
  .bf-single-shell {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .bf-single-media {
    position: static;
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
  }
  .bf-single-media__image,
  .bf-single-media__placeholder {
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    object-fit: contain;
    object-position: center top;
  }
  .bf-single-stack { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .bf-page { padding-bottom: 44px; }
  .bf-archive-hero { padding-top: 28px; }
  .bf-card--mini {
    grid-template-columns: 108px minmax(0, 1fr);
    min-height: 120px;
  }
  .bf-card--mini .bf-card__media,
  .bf-card--mini .bf-card__image,
  .bf-card--mini .bf-card__placeholder {
    min-height: 120px;
  }
  .bf-card--mini .bf-card__body { padding: 10px 12px; gap: 7px; }
  .bf-card__title { font-size: 0.92rem; text-align: right; }
  .bf-title--xl { text-align: right; }
  .bf-title--single { font-size: 1.4rem; text-align: right; }
  .bf-panel { padding: 14px; border-radius: 14px; }
  .bf-panel__head,
  .bf-panel__head h2,
  .bf-panel__head p,
  .bf-closed,
  .bf-closed strong,
  .bf-closed p,
  .bf-content {
    text-align: right;
  }
  .bf-chip strong { font-size: 0.78rem; }
  .bf-chip em { font-size: 0.66rem; }
  .bf-card__cta { padding: 8px 10px; font-size: 0.84rem; min-height: 36px; }
  .bf-single-top { padding-top: 18px; }
  .bf-countdown__grid strong { font-size: 1.05rem; }
  .bf-home-modal__close { left: 0; top: -14px; }
}
