/**
 * טופס מילוי צ'אנס בדף הראשי – מתאים ל־--chance-accent
 * Spoiler מקומי רק בכפתורי «סוג משחק» (ראו .chance-index-form__game-wrap)
 */
.chance-index-form {
  width: 100%;
  min-width: 0;
  font-family: 'Heebo', 'Segoe UI', Arial, sans-serif;
  /*
   * צ'יפים (הגרלה, שלבים, בחירה בסוג משחק): ירוק שטוח כהה כמו פס הכותרת — בלי גרדיאנט ובלי זוהר
   */
  --chance-chip-bg: color-mix(in srgb, var(--chance-accent) 72%, #121212);
  --chance-chip-fg: rgba(255, 255, 255, 0.96);
}

.chance-index-form__game-wrap {
  font-family: 'Spoiler', 'Heebo', 'Segoe UI', Arial, sans-serif;
}

.chance-index-form button,
.chance-index-form input,
.chance-index-form select,
.chance-index-form textarea {
  font-family: inherit;
}

.chance-index-form__message {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.chance-index-form__message--success {
  background: color-mix(in srgb, var(--chance-accent) 14%, rgba(40, 120, 60, 0.35));
  border: 1px solid color-mix(in srgb, var(--chance-accent) 25%, rgba(255, 255, 255, 0.12));
  color: rgba(255, 255, 255, 0.92);
}

.chance-index-form__message--error {
  background: rgba(120, 40, 40, 0.35);
  border: 1px solid rgba(255, 120, 120, 0.25);
  color: #fecaca;
}

.chance-index-form__success-draw {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  opacity: 0.9;
}

/* פאנל "נדרשת התחברות" – יורש מ־.betting-auth-panel ב־style.css; צבע לפי --chance-accent */
.chance-index-form .betting-auth-panel--chance {
  --auth-accent: var(--chance-accent, var(--accent-sport, #f5c518));
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}

body.page-hub-chance .chance-index-form .betting-auth-panel--chance {
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.chance-index-form__guest-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--chance-accent) 14%, rgba(28, 26, 22, 0.95)),
    color-mix(in srgb, var(--chance-accent) 6%, rgba(18, 16, 14, 0.88))
  );
  border: 1px solid color-mix(in srgb, var(--chance-accent) 32%, rgba(255, 255, 255, 0.12));
  border-inline-start: 3px solid color-mix(in srgb, var(--chance-accent) 58%, transparent);
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 18px color-mix(in srgb, var(--chance-accent) 12%, transparent);
}

.chance-index-form__guest-banner-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-top: 0;
  border-radius: 10px;
  color: color-mix(in srgb, var(--chance-accent) 90%, #fff);
  background: color-mix(in srgb, var(--chance-accent) 14%, rgba(0, 0, 0, 0.25));
  border: 1px solid color-mix(in srgb, var(--chance-accent) 28%, rgba(255, 255, 255, 0.12));
}

.chance-index-form__guest-banner-icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.chance-index-form__guest-banner-text {
  flex: 1;
  min-width: 0;
}

.chance-index-form__guest-banner a {
  color: color-mix(in srgb, var(--chance-accent) 95%, #fff);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.chance-index-form--guest-preview form.chance-index-form__inner {
  pointer-events: none;
  opacity: 0.88;
  filter: saturate(0.92);
}
.chance-index-form--guest-preview .chance-index-form__guest-banner {
  pointer-events: auto;
}

.chance-index-form__block {
  margin-bottom: 22px;
  padding-block: 14px 16px;
  padding-inline: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(0, 0, 0, 0.32) 100%
  );
}

/* דף hub צ'אנס: אותו דפוס כמו כרטיסי hub ספורט (פס accent + גרדיאנט לפי --chance-accent) */
body.page-hub-chance .chance-index-form__block {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--chance-accent) 10%, rgba(255, 255, 255, 0.06)),
    color-mix(in srgb, var(--chance-accent) 4%, rgba(255, 255, 255, 0.03))
  );
  border: 1px solid color-mix(in srgb, var(--chance-accent) 22%, rgba(255, 255, 255, 0.1));
  border-inline-start: 3px solid color-mix(in srgb, var(--chance-accent) 55%, transparent);
}

/* כרטיס עליון: כותרת + הסבר + הגרלה + סוג משחק + תצוגת קלפים */
.chance-index-form__block--sheet {
  padding: 18px 16px 22px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

body.page-hub-chance .chance-index-form__block--sheet {
  box-shadow: 0 8px 28px rgba(14, 10, 6, 0.38);
}

/* פנים כרטיס הטופס (hub): כותרת, מקטעים, בקרים וסיכום — אותה שפת צבע כמו מסגרת הכרטיס */
body.page-hub-chance .chance-index-form__block--sheet > .chance-index-form__header-card {
  margin-inline: -8px;
  margin-top: -2px;
  padding: 12px 10px 18px;
  margin-bottom: 14px;
  border-radius: 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--chance-accent) 14%, rgba(255, 255, 255, 0.1));
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--chance-accent) 12%, rgba(26, 20, 16, 0.58)),
    color-mix(in srgb, var(--chance-accent) 5%, rgba(22, 17, 14, 0.24))
  );
}

body.page-hub-chance .chance-index-form__sheet-section + .chance-index-form__sheet-section {
  border-top-color: color-mix(in srgb, var(--chance-accent) 16%, rgba(255, 255, 255, 0.1));
}

body.page-hub-chance .chance-index-form__sheet-section--types .chance-index-form__game-wrap {
  margin-top: 6px;
  padding: 12px 10px 14px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--chance-accent) 14%, rgba(255, 255, 255, 0.1));
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--chance-accent) 7%, rgba(24, 19, 15, 0.44)),
    color-mix(in srgb, var(--chance-accent) 2%, rgba(20, 16, 13, 0.22))
  );
}

body.page-hub-chance .chance-index-form__section-head--in-block {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--chance-accent) 9%, rgba(255, 255, 255, 0.05)),
    color-mix(in srgb, var(--chance-accent) 4%, rgba(24, 19, 15, 0.42))
  );
  border-color: color-mix(in srgb, var(--chance-accent) 18%, rgba(255, 255, 255, 0.1));
}

body.page-hub-chance .chance-index-form__section-head__hint {
  color: color-mix(in srgb, var(--chance-accent) 14%, rgba(255, 255, 255, 0.48));
}

body.page-hub-chance .chance-index-form__preview-wrap {
  margin-top: 6px;
  padding: 14px 12px 16px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--chance-accent) 14%, rgba(255, 255, 255, 0.1));
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--chance-accent) 8%, rgba(26, 20, 16, 0.5)),
    color-mix(in srgb, var(--chance-accent) 3%, rgba(20, 16, 13, 0.22))
  );
}

body.page-hub-chance .chance-index-form__preview-cards .form-preview-card-slot {
  box-shadow:
    0 4px 18px rgba(12, 8, 5, 0.52),
    0 0 0 1px color-mix(in srgb, var(--chance-accent) 22%, rgba(255, 255, 255, 0.12));
}

body.page-hub-chance .chance-index-form__option--game:not(:has(input:checked)) .chance-index-form__option-label {
  background: color-mix(in srgb, var(--chance-accent) 7%, rgba(255, 255, 255, 0.06));
  border-color: color-mix(in srgb, var(--chance-accent) 22%, rgba(255, 255, 255, 0.12));
}

body.page-hub-chance .chance-index-form__option--game:not(:has(input:checked)):hover .chance-index-form__option-label {
  border-color: color-mix(in srgb, var(--chance-accent) 32%, rgba(255, 255, 255, 0.16));
  background: color-mix(in srgb, var(--chance-accent) 11%, rgba(255, 255, 255, 0.08));
}

body.page-hub-chance .chance-index-form__card-opt input:not(:checked) + .chance-index-form__card-btn {
  background: color-mix(in srgb, var(--chance-accent) 8%, rgba(255, 255, 255, 0.06));
  border-color: color-mix(in srgb, var(--chance-accent) 18%, rgba(255, 255, 255, 0.1));
}

body.page-hub-chance .chance-index-form__price-opt input:not(:checked) + .chance-index-form__price-btn {
  background: color-mix(in srgb, var(--chance-accent) 8%, rgba(255, 255, 255, 0.06));
  border-color: color-mix(in srgb, var(--chance-accent) 18%, rgba(255, 255, 255, 0.1));
}

body.page-hub-chance .chance-index-form__card-act {
  border-color: color-mix(in srgb, var(--chance-accent) 18%, rgba(255, 255, 255, 0.12));
  background: color-mix(in srgb, var(--chance-accent) 6%, rgba(255, 255, 255, 0.06));
}

body.page-hub-chance .chance-index-form__summary {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--chance-accent) 11%, rgba(28, 22, 18, 0.58)),
    color-mix(in srgb, var(--chance-accent) 4%, rgba(20, 16, 13, 0.34))
  );
  border: 1px solid color-mix(in srgb, var(--chance-accent) 20%, rgba(255, 255, 255, 0.1));
  border-inline-start: 3px solid color-mix(in srgb, var(--chance-accent) 50%, transparent);
  box-shadow: 0 6px 22px rgba(12, 8, 5, 0.32);
}

body.page-hub-chance .chance-index-form__summary-line {
  border-block-end-color: color-mix(in srgb, var(--chance-accent) 12%, rgba(255, 255, 255, 0.08));
}

body.page-hub-chance .chance-index-form__auto-batch-opt input:not(:checked) + .chance-index-form__auto-batch-btn {
  background: color-mix(in srgb, var(--chance-accent) 8%, rgba(255, 255, 255, 0.06));
  border-color: color-mix(in srgb, var(--chance-accent) 18%, rgba(255, 255, 255, 0.12));
}

body.page-hub-chance .chance-index-form__auto-batch-submit {
  background: color-mix(in srgb, var(--chance-accent) 14%, rgba(255, 255, 255, 0.08));
  border-color: color-mix(in srgb, var(--chance-accent) 26%, rgba(255, 255, 255, 0.14));
}

body.page-hub-chance .chance-index-form__auto-batch-submit:hover:not(:disabled) {
  background: color-mix(in srgb, var(--chance-accent) 22%, rgba(255, 255, 255, 0.12));
  border-color: color-mix(in srgb, var(--chance-accent) 38%, rgba(255, 255, 255, 0.2));
}

.chance-index-form__header-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding-bottom: 22px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chance-index-form__header-text {
  width: 100%;
  max-width: 36rem;
  margin-inline: auto;
}

.chance-index-form__header-title {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.94);
}

.chance-index-form__header-desc {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.58);
}

.chance-index-form__header-rules {
  margin: 4px 0 0;
  width: 100%;
  text-align: start;
  color: rgba(255, 255, 255, 0.78);
}

.chance-index-form__header-rule-panel[hidden] {
  display: none !important;
}

.chance-index-form__header-rule-title {
  margin: 0 0 10px;
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.94);
  text-align: start;
}

.chance-index-form__header-rule-body {
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.58;
  color: rgba(255, 255, 255, 0.72);
}

.chance-index-form__header-rule-body p {
  margin: 0 0 0.55em;
}

.chance-index-form__header-rule-body p:last-child {
  margin-bottom: 0;
}

.chance-index-form__header-meta {
  flex-shrink: 0;
}

.chance-index-form__draw-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  color: var(--chance-chip-fg);
  background: var(--chance-chip-bg);
  background-image: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
  filter: none;
  white-space: nowrap;
}

@media (min-width: 600px) {
  .chance-index-form__header-card {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    text-align: start;
    gap: 16px 20px;
  }

  .chance-index-form__header-text {
    margin-inline: 0;
    flex: 1;
    min-width: 0;
  }

  .chance-index-form__header-meta {
    align-self: center;
  }
}

.chance-index-form__sheet-section:first-of-type {
  padding-top: 10px;
}

.chance-index-form__sheet-section + .chance-index-form__sheet-section {
  margin-top: 14px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* כותרות מקטעים אחידות: שלב + כותרת בשורה אחת, שורת עזר מתחת — מיושרות לימין (start ב־RTL) */
.chance-index-form__section-head {
  display: flex;
  flex-direction: column;
  align-items: start;
  text-align: start;
  gap: 8px;
  margin-bottom: 16px;
  width: 100%;
}

.chance-index-form__section-head__line {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: start;
  gap: 10px;
  width: 100%;
}

.chance-index-form__section-head__step {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 0.8125rem;
  font-weight: 900;
  line-height: 1;
  color: var(--chance-chip-fg);
  background: var(--chance-chip-bg);
  background-image: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
  filter: none;
}

.chance-index-form__section-head__title {
  margin: 0;
  max-width: 22rem;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.93);
}

.chance-index-form__section-head__hint {
  margin: 0;
  max-width: 24rem;
  width: 100%;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.48);
  text-align: start;
}

/* כותרת בתוך בלוק נפרד (קלפים / סכום) — רצועת רקע עדינה */
.chance-index-form__section-head--in-block {
  padding: 14px 12px 16px;
  margin: -6px -6px 18px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(0, 0, 0, 0.16) 100%);
  box-shadow: none;
}

@media (min-width: 480px) {
  .chance-index-form__section-head__title {
    font-size: 1.06rem;
  }
}

.chance-index-form__game-wrap {
  margin-bottom: 0;
}

.chance-index-form__game-wrap--multichance .chance-index-form__options--game {
  justify-content: center;
}

/* צ'אנס שיטתי: 1–4 + רב צ'אנס בשורה אחת (בנייד — כיווץ גמיש; בדסקטופ — מידות ברירת מחדל) */
body.page-hub-chance .chance-index-form__game-wrap--systematic .chance-index-form__options--game {
  flex-wrap: nowrap;
  gap: 6px 8px;
  justify-content: space-between;
}

@media (max-width: 768px) {
  body.page-hub-chance .chance-index-form__game-wrap--systematic .chance-index-form__option--game {
    flex: 1 1 0;
    min-width: 0;
  }

  body.page-hub-chance .chance-index-form__game-wrap--systematic .chance-index-form__option--game-tile .chance-index-form__option-label {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
}

@media (min-width: 769px) {
  body.page-hub-chance .chance-index-form__game-wrap--systematic .chance-index-form__options--game {
    justify-content: center;
    gap: 12px 14px;
  }

  body.page-hub-chance .chance-index-form__game-wrap--systematic .chance-index-form__option--game {
    flex: 0 0 auto;
  }
}

.chance-index-form__options--game {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 14px;
  justify-content: center;
  align-items: center;
}

.chance-index-form__option--game {
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

.chance-index-form__option--game input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* בסיס משותף לקוביות סוג משחק (כמו בטופס הישן) */
.chance-index-form__option--game .chance-index-form__option-label {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.07);
  border: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.45) inset;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease;
}

.chance-index-form__option--game:hover .chance-index-form__option-label {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
}

/* קוביות 1–4 (שיטתי וכו'): מספר אחד במרכז */
.chance-index-form__option--game-num .chance-index-form__option-label {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  padding: 0;
  border-radius: 14px;
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* כל קוביות סוג משחק (רגיל / רב / שיטתי) — אותו ריבוע; התוכן ממורכז אנכית ואופקית */
.chance-index-form__option--game-tile .chance-index-form__option-label {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 72px;
  min-width: 72px;
  height: 84px;
  min-height: 84px;
  padding: 4px 5px;
  border-radius: 14px;
  font-size: inherit;
  line-height: 1;
}

.chance-index-form__option--game-num--stacked .chance-index-form__option-line--game-num-digit {
  display: block;
  flex: none;
  width: 100%;
  margin: 0;
  padding: 0;
  text-align: center;
  font-size: 3.45rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.74;
}

.chance-index-form__option--game-num--stacked .chance-index-form__option-line--game-num-sub,
.chance-index-form__option--game-multi-tile .chance-index-form__option-line--game-num-sub {
  flex-shrink: 0;
  width: 100%;
  margin: -3px 0 0;
  font-size: 0.93rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.05;
  text-align: center;
}

.chance-index-form__option--game-multi-tile .chance-index-form__option-line--game-multi-top {
  display: block;
  flex: none;
  width: 100%;
  margin: 0;
  padding: 0;
  text-align: center;
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 0.92;
}

.chance-index-form__option--game input:checked + .chance-index-form__option-label {
  color: var(--chance-chip-fg);
  background: var(--chance-chip-bg);
  background-image: none;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
  transform: none;
  filter: none;
}

.chance-index-form__option--game input:focus-visible + .chance-index-form__option-label {
  outline: 2px solid rgba(255, 255, 255, 0.45);
  outline-offset: 2px;
}

.chance-index-form__option-line {
  display: block;
}

@media (max-width: 380px) {
  .chance-index-form__option--game-num .chance-index-form__option-label {
    width: 58px;
    height: 58px;
    min-width: 58px;
    min-height: 58px;
    border-radius: 12px;
    font-size: 1.4rem;
  }

  .chance-index-form__option--game-tile .chance-index-form__option-label {
    width: 66px;
    min-width: 66px;
    height: 78px;
    min-height: 78px;
    padding: 3px 4px;
    border-radius: 12px;
    font-size: inherit;
    gap: 0;
  }

  .chance-index-form__option--game-num--stacked .chance-index-form__option-line--game-num-digit {
    font-size: 3rem;
    line-height: 0.72;
  }

  .chance-index-form__option--game-num--stacked .chance-index-form__option-line--game-num-sub,
  .chance-index-form__option--game-multi-tile .chance-index-form__option-line--game-num-sub {
    margin-top: -2px;
    font-size: 0.84rem;
  }

  .chance-index-form__option--game-multi-tile .chance-index-form__option-line--game-multi-top {
    font-size: 1.92rem;
    line-height: 0.88;
  }

  /* שיטתי: לא לכפות רוחב קבוע — נשאר בשורה אחת */
  body.page-hub-chance .chance-index-form__game-wrap--systematic .chance-index-form__option--game-tile .chance-index-form__option-label {
    width: 100%;
    min-width: 0;
    height: 74px;
    min-height: 74px;
    padding: 2px 3px;
  }

  body.page-hub-chance .chance-index-form__game-wrap--systematic .chance-index-form__option--game-num--stacked .chance-index-form__option-line--game-num-digit {
    font-size: clamp(1.55rem, 11vw, 3rem);
    line-height: 0.7;
  }

  body.page-hub-chance .chance-index-form__game-wrap--systematic .chance-index-form__option--game-multi-tile .chance-index-form__option-line--game-multi-top {
    font-size: clamp(1.1rem, 8vw, 1.92rem);
    line-height: 0.85;
  }

  body.page-hub-chance .chance-index-form__game-wrap--systematic .chance-index-form__option--game-num--stacked .chance-index-form__option-line--game-num-sub,
  body.page-hub-chance .chance-index-form__game-wrap--systematic .chance-index-form__option--game-multi-tile .chance-index-form__option-line--game-num-sub {
    font-size: 0.68rem;
    letter-spacing: 0.02em;
  }
}

.chance-index-form__preview-wrap {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.chance-index-form__preview-cards {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: flex-end;
}

/* מיכל התצוגה: בלי רקע לבן על המסגרת – ריק = רק גב הקלף, מלא = פני הקלף */
.chance-index-form__preview-cards .playing-card.form-preview-card {
  background: transparent;
  border: none;
  box-shadow: none;
  width: 72px;
  height: 100px;
  flex-shrink: 0;
}

.chance-index-form__preview-cards .form-preview-card-slot {
  position: relative;
  width: 72px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.chance-index-form__preview-cards .form-preview-card-layer {
  position: absolute;
  inset: 0;
  border-radius: 8px;
}

/* גב הקלף – תמיד מתחת לפנים (חום־אפור חם, בלי כחול־קרי כמו #c5d2dc) */
.chance-index-form__preview-cards .form-preview-card-back {
  z-index: 1;
  background: linear-gradient(155deg, #2e2b26 0%, #1a1816 55%, #131110 100%);
}

body.page-hub-chance .chance-index-form__preview-cards .form-preview-card-back {
  background: linear-gradient(
    155deg,
    color-mix(in srgb, var(--chance-accent) 26%, #262320) 0%,
    color-mix(in srgb, var(--chance-accent) 11%, #141210) 100%
  );
}

.chance-index-form__preview-cards .form-preview-card-back .form-preview-card-back-svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.chance-index-form__preview-cards .playing-card--red {
  color: #b91c1c;
}

.chance-index-form__preview-cards .playing-card--black {
  color: #171717;
}

/* ערימה מאחורי הפנים (שיטתי) */
.chance-index-form__preview-cards .form-preview-card-stack {
  z-index: 2;
  pointer-events: none;
}

/* פני הקלף – מעל הגב ומעל הערימה */
.chance-index-form__preview-cards .playing-card__inner.form-preview-card-layer {
  z-index: 3;
  background: linear-gradient(165deg, #fefefe 0%, #ececec 55%, #e4e4e4 100%);
  border: 1px solid rgba(30, 30, 30, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.chance-index-form__preview-cards .form-preview-card:not(.form-preview-card--empty) .playing-card__inner.form-preview-card-layer {
  opacity: 1;
  visibility: visible;
}

.chance-index-form__preview-cards .form-preview-card:not(.form-preview-card--empty) .form-preview-card-back {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* צ'אנס שיטתי — תצוגת טופס: מניפה אופקית חופפת ברוחב קלף יחיד (72px), מספר/סימן מוקטנים */
.chance-index-form__preview-cards .form-preview-card--systematic-fan.playing-card.form-preview-card,
.form-preview-cards .form-preview-card--systematic-fan.playing-card.form-preview-card {
  width: 72px;
  height: 100px;
  min-height: 100px;
  flex-shrink: 0;
  align-self: flex-end;
  overflow: hidden;
  box-sizing: border-box;
}

.chance-index-form__preview-cards .form-preview-systematic-fan,
.form-preview-cards .form-preview-systematic-fan {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 0;
  width: 72px;
  height: 100px;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
  flex-shrink: 0;
  overflow: hidden;
}

.chance-index-form__preview-cards .form-preview-systematic-fan .form-preview-fan-card ~ .form-preview-fan-card,
.form-preview-cards .form-preview-systematic-fan .form-preview-fan-card ~ .form-preview-fan-card {
  margin-inline-start: var(--systematic-fan-pull, -40px);
}

.chance-index-form__preview-cards .form-preview-systematic-fan .form-preview-fan-card:nth-child(1),
.form-preview-cards .form-preview-systematic-fan .form-preview-fan-card:nth-child(1) {
  z-index: 1;
}
.chance-index-form__preview-cards .form-preview-systematic-fan .form-preview-fan-card:nth-child(2),
.form-preview-cards .form-preview-systematic-fan .form-preview-fan-card:nth-child(2) {
  z-index: 2;
}
.chance-index-form__preview-cards .form-preview-systematic-fan .form-preview-fan-card:nth-child(3),
.form-preview-cards .form-preview-systematic-fan .form-preview-fan-card:nth-child(3) {
  z-index: 3;
}
.chance-index-form__preview-cards .form-preview-systematic-fan .form-preview-fan-card:nth-child(4),
.form-preview-cards .form-preview-systematic-fan .form-preview-fan-card:nth-child(4) {
  z-index: 4;
}

.chance-index-form__preview-cards .form-preview-fan-card,
.form-preview-cards .form-preview-fan-card {
  position: relative;
  flex-shrink: 0;
  margin: 0;
  width: auto;
  height: auto;
  background: transparent;
  border: none;
  box-shadow: none;
}

.chance-index-form__preview-cards .form-preview-fan-card-slot,
.form-preview-cards .form-preview-fan-card-slot {
  position: relative;
  width: var(--systematic-fan-card-w, 33px);
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.chance-index-form__preview-cards .form-preview-fan-card-inner,
.form-preview-cards .form-preview-fan-card-inner {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  box-sizing: border-box;
  background: linear-gradient(165deg, #fefefe 0%, #ececec 55%, #e4e4e4 100%);
  border: 1px solid rgba(30, 30, 30, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.chance-index-form__preview-cards .form-preview-fan-card .playing-card__corner,
.form-preview-cards .form-preview-fan-card .playing-card__corner {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  font-weight: 800;
}

.chance-index-form__preview-cards .form-preview-fan-card .playing-card__corner--tl,
.form-preview-cards .form-preview-fan-card .playing-card__corner--tl {
  top: 2px;
  left: 2px;
}

.chance-index-form__preview-cards .form-preview-fan-card .playing-card__corner--br,
.form-preview-cards .form-preview-fan-card .playing-card__corner--br {
  bottom: 2px;
  right: 2px;
  transform: rotate(180deg);
}

.chance-index-form__preview-cards .form-preview-fan-card .playing-card__index,
.form-preview-cards .form-preview-fan-card .playing-card__index {
  font-size: 9px;
  letter-spacing: -0.02em;
}

.chance-index-form__preview-cards .form-preview-fan-card .playing-card__suit-icon,
.form-preview-cards .form-preview-fan-card .playing-card__suit-icon {
  font-size: 10px;
  margin-top: 0;
  line-height: 1;
}

/* אזור אישי (area.php): עמודה אנכית של קלפים קטנים */
.chance-index-form__preview-cards .area-ticket-cards--mine.area-ticket-cards--vertical,
.form-preview-cards .area-ticket-cards--mine.area-ticket-cards--vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  width: 72px;
  min-height: 100px;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
  flex-shrink: 0;
}

.chance-index-form__preview-cards .area-ticket-cards--mine.area-ticket-cards--vertical .playing-card--small,
.form-preview-cards .area-ticket-cards--mine.area-ticket-cards--vertical .playing-card--small {
  position: relative;
  width: 54px;
  height: 76px;
  flex-shrink: 0;
  margin: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 6px;
}

.chance-index-form__preview-cards .area-ticket-cards--mine.area-ticket-cards--vertical .playing-card--small .playing-card__inner,
.form-preview-cards .area-ticket-cards--mine.area-ticket-cards--vertical .playing-card--small .playing-card__inner {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  box-sizing: border-box;
  background: linear-gradient(165deg, #fefefe 0%, #ececec 55%, #e4e4e4 100%);
  border: 1px solid rgba(30, 30, 30, 0.18);
  box-shadow:
    0 3px 12px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.chance-index-form__preview-cards
  .area-ticket-cards--mine.area-ticket-cards--vertical
  .playing-card--small.area-ticket-card-empty
  .playing-card__inner,
.form-preview-cards
  .area-ticket-cards--mine.area-ticket-cards--vertical
  .playing-card--small.area-ticket-card-empty
  .playing-card__inner {
  opacity: 0.42;
  filter: saturate(0.85);
}

.chance-index-form__preview-cards .area-ticket-cards--mine.area-ticket-cards--vertical .playing-card--small .playing-card__corner,
.form-preview-cards .area-ticket-cards--mine.area-ticket-cards--vertical .playing-card--small .playing-card__corner {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  font-weight: 800;
}

.chance-index-form__preview-cards .area-ticket-cards--mine.area-ticket-cards--vertical .playing-card--small .playing-card__corner--tl,
.form-preview-cards .area-ticket-cards--mine.area-ticket-cards--vertical .playing-card--small .playing-card__corner--tl {
  top: 2px;
  left: 2px;
}

.chance-index-form__preview-cards .area-ticket-cards--mine.area-ticket-cards--vertical .playing-card--small .playing-card__corner--br,
.form-preview-cards .area-ticket-cards--mine.area-ticket-cards--vertical .playing-card--small .playing-card__corner--br {
  bottom: 2px;
  right: 2px;
  transform: rotate(180deg);
}

.chance-index-form__preview-cards .area-ticket-cards--mine.area-ticket-cards--vertical .playing-card--small .playing-card__index,
.form-preview-cards .area-ticket-cards--mine.area-ticket-cards--vertical .playing-card--small .playing-card__index {
  font-size: 11px;
}

.chance-index-form__preview-cards .area-ticket-cards--mine.area-ticket-cards--vertical .playing-card--small .playing-card__suit-icon,
.form-preview-cards .area-ticket-cards--mine.area-ticket-cards--vertical .playing-card--small .playing-card__suit-icon {
  font-size: 12px;
  margin-top: 1px;
}


.chance-index-form__block--cards {
  text-align: center;
}

.chance-index-form__suit {
  margin-bottom: 10px;
}

.chance-index-form__suit--disabled {
  opacity: 0.35;
  pointer-events: none;
}

.chance-index-form__cards-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 7px;
}

/* שורות בחירת קלפים: סמל הסדרה משמאל (בדף RTL בלי זה הוא יוצא לימין) */
.chance-index-form__cards-row:not(.chance-index-form__cards-row--actions) {
  direction: ltr;
}

.chance-index-form__suit-ic {
  width: 36px;
  text-align: center;
  font-size: 1.4rem;
  line-height: 1;
  font-weight: 800;
  flex-shrink: 0;
}

.chance-index-form__suit-ic--red {
  color: #f87171;
}

.chance-index-form__suit-ic--black {
  color: rgba(255, 255, 255, 0.75);
}

.chance-index-form__card-opt {
  position: relative;
  cursor: pointer;
}

.chance-index-form__card-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chance-index-form__card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 0.92rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.chance-index-form__card-opt input:checked + .chance-index-form__card-btn {
  color: var(--chance-chip-fg);
  background: var(--chance-chip-bg);
  background-image: none;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  filter: none;
}

/* מסכים צרים: כפתורי ערך קטנים יותר כדי שכל הסדרה (כולל 7) תישאר בשורה אחת */
@media (max-width: 540px) {
  .chance-index-form__cards-row:not(.chance-index-form__cards-row--actions) {
    gap: 3px 4px;
  }

  .chance-index-form__suit-ic {
    width: 26px;
    font-size: 1.08rem;
  }

  .chance-index-form__card-btn {
    min-width: 34px;
    width: 34px;
    max-width: 34px;
    box-sizing: border-box;
    height: 36px;
    padding: 0 1px;
    font-size: 0.76rem;
    border-radius: 8px;
  }
}

@media (max-width: 380px) {
  .chance-index-form__cards-row:not(.chance-index-form__cards-row--actions) {
    gap: 2px 3px;
  }

  .chance-index-form__suit-ic {
    width: 22px;
    font-size: 0.98rem;
  }

  .chance-index-form__card-btn {
    min-width: 30px;
    width: 30px;
    max-width: 30px;
    height: 34px;
    font-size: 0.7rem;
    border-radius: 7px;
  }
}

.chance-index-form__cards-row--actions {
  margin-top: 12px;
  gap: 10px;
  justify-content: center;
}

.chance-index-form__card-act {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
}

.chance-index-form__card-act--auto {
  border-color: color-mix(in srgb, var(--chance-accent) 30%, rgba(255, 255, 255, 0.15));
  color: color-mix(in srgb, var(--chance-accent) 85%, #fff);
}

.chance-index-form__block.chance-index-form__price {
  text-align: center;
}

.chance-index-form__price-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
  justify-content: center;
}

.chance-index-form__price-opt {
  position: relative;
  cursor: pointer;
}

.chance-index-form__price-opt input {
  position: absolute;
  opacity: 0;
}

.chance-index-form__price-opt input:disabled + .chance-index-form__price-btn {
  opacity: 0.3;
  cursor: not-allowed;
}

.chance-index-form__price-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.chance-index-form__price-opt input:checked + .chance-index-form__price-btn {
  color: var(--chance-chip-fg);
  background: var(--chance-chip-bg);
  background-image: none;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  filter: none;
}

.chance-index-form__summary {
  padding-block: 12px;
  padding-inline: 14px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
  text-align: center;
  box-sizing: border-box;
}

.chance-index-form__summary-line {
  margin: 0;
  padding-block: 5px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  text-align: start;
  border-block-end: 1px solid rgba(255, 255, 255, 0.06);
}

.chance-index-form__summary-line:last-child {
  border-block-end: none;
  padding-block-end: 0;
}

.chance-index-form__summary-line:first-child {
  padding-block-start: 0;
}

.chance-index-form__summary-lbl {
  font-weight: 600;
  text-align: start;
}

.chance-index-form__summary-val {
  font-weight: 800;
  color: color-mix(in srgb, var(--chance-accent) 55%, #fff);
  text-align: end;
  font-variant-numeric: tabular-nums;
}

.chance-index-form__submit-wrap {
  display: flex;
  justify-content: center;
}

/* בלוק 5 — מילוי אוטומטי: כותרת כמו שאר המקטעים; פנים (מספרים + כפתור) מצומצם */
.chance-index-form__block--auto-batch {
  margin-bottom: 22px;
}

.chance-index-form__auto-batch-inner {
  width: 100%;
  max-width: 17.5rem;
  margin-inline: auto;
  box-sizing: border-box;
}

.chance-index-form__auto-batch-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  align-items: stretch;
  margin-bottom: 8px;
}

.chance-index-form__auto-batch-opt {
  position: relative;
  cursor: pointer;
  min-width: 0;
}

.chance-index-form__auto-batch-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chance-index-form__auto-batch-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 30px;
  padding: 0 4px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-sizing: border-box;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease;
}

.chance-index-form__auto-batch-opt input:checked + .chance-index-form__auto-batch-btn {
  color: var(--chance-chip-fg);
  background: var(--chance-chip-bg);
  background-image: none;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  filter: none;
}

.chance-index-form__auto-batch-opt input:focus-visible + .chance-index-form__auto-batch-btn {
  outline: 2px solid rgba(255, 255, 255, 0.45);
  outline-offset: 1px;
}

.chance-index-form__auto-batch-actions {
  width: 100%;
}

.chance-index-form__auto-batch-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  padding-block: 7px;
  padding-inline: 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.chance-index-form__auto-batch-submit-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.chance-index-form__auto-batch-submit-icon {
  flex-shrink: 0;
  opacity: 0.92;
}

.chance-index-form__auto-batch-submit:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.chance-index-form__auto-batch-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 400px) {
  .chance-index-form__summary-line {
    grid-template-columns: 1fr;
    row-gap: 4px;
    text-align: center;
  }

  .chance-index-form__summary-lbl,
  .chance-index-form__summary-val {
    text-align: center;
  }
}

.chance-index-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  padding: 14px 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  color: var(--chance-chip-fg);
  background: var(--chance-chip-bg);
  background-image: none;
  box-shadow: none;
  box-sizing: border-box;
  filter: none;
}

.chance-index-form__submit:hover {
  filter: brightness(1.08);
}

.chance-index-form__submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.35);
}

.chance-index-form__betting-closed {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  text-align: center;
  background: rgba(185, 28, 28, 0.22);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: rgba(255, 255, 255, 0.95);
}

.chance-index-form__betting-closed-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.chance-index-form__betting-closed-detail {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}

.chance-index-form__betting-closed-timer {
  display: block;
  margin-top: 8px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--chance-accent) 70%, #fff);
}

.chance-index-form__preview-cards .playing-card__corner,
.form-preview-cards .playing-card__corner {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  font-weight: 800;
}

.chance-index-form__preview-cards .playing-card__corner--tl,
.form-preview-cards .playing-card__corner--tl {
  top: 3px;
  left: 3px;
}

.chance-index-form__preview-cards .playing-card__corner--br,
.form-preview-cards .playing-card__corner--br {
  bottom: 3px;
  right: 3px;
  transform: rotate(180deg);
}

.chance-index-form__preview-cards .playing-card__index,
.form-preview-cards .playing-card__index {
  font-size: 14px;
}

.chance-index-form__preview-cards .playing-card__suit-icon,
.form-preview-cards .playing-card__suit-icon {
  font-size: 15px;
  margin-top: 2px;
}
