/* ============================================================
   Карточка перед уровнем — тёмный планшет в оливковых тонах,
   двойная золотая рамка с уголками. Грузится последней.
   ============================================================ */

html body #overlayPreLevel .pre-stage {
  background: radial-gradient(80% 60% at 50% 45%, rgba(10, 12, 9, 0.9) 0%, rgba(3, 4, 3, 0.98) 100%);
}

html body #overlayPreLevel #preLevelCard {
  width: min(90vw, 372px);
  padding: 26px 22px 22px;
  border: 1px solid #7d6c46 !important;
  border-radius: 0 !important;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(38, 40, 29, 0.98) 0%, rgba(24, 25, 18, 0.99) 46%, rgba(13, 14, 10, 1) 100%),
    #14150f !important;
  box-shadow:
    inset 0 0 0 5px rgba(12, 13, 9, 1),
    inset 0 0 0 6px rgba(125, 108, 70, 0.45),
    inset 0 0 60px rgba(0, 0, 0, 0.55),
    0 26px 60px rgba(0, 0, 0, 0.7) !important;
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px),
                     calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
}

/* уголки рамки */
html body #overlayPreLevel #preLevelCard::after {
  content: '';
  position: absolute;
  inset: 4px;
  pointer-events: none;
  background:
    linear-gradient(#9d8a5c, #9d8a5c) left 0 top 0 / 22px 1px no-repeat,
    linear-gradient(#9d8a5c, #9d8a5c) left 0 top 0 / 1px 22px no-repeat,
    linear-gradient(#9d8a5c, #9d8a5c) right 0 top 0 / 22px 1px no-repeat,
    linear-gradient(#9d8a5c, #9d8a5c) right 0 top 0 / 1px 22px no-repeat,
    linear-gradient(#9d8a5c, #9d8a5c) left 0 bottom 0 / 22px 1px no-repeat,
    linear-gradient(#9d8a5c, #9d8a5c) left 0 bottom 0 / 1px 22px no-repeat,
    linear-gradient(#9d8a5c, #9d8a5c) right 0 bottom 0 / 22px 1px no-repeat,
    linear-gradient(#9d8a5c, #9d8a5c) right 0 bottom 0 / 1px 22px no-repeat;
}

/* крестик */
html body #overlayPreLevel #preLevelCard .pre-close-btn {
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(160, 140, 92, 0.55) !important;
  border-radius: 2px !important;
  background: rgba(0, 0, 0, 0.25) !important;
  color: #e3d8ba !important;
  font-size: 19px;
  line-height: 1;
  box-shadow: inset 0 0 0 3px rgba(10, 11, 8, 0.9) !important;
}

/* заголовок и пилюля */
html body #overlayPreLevel #preCampaignBriefing {
  display: flex;
  flex-direction: column;
  align-items: center;
}

html body #overlayPreLevel #preLevelTitle {
  margin: 0 0 10px;
  font-family: 'Chandler Mountain Thin', 'Cormorant Garamond', Georgia, 'Times New Roman', serif !important;
  font-weight: 400 !important;
  font-size: 31px;
  line-height: 1.15;
  letter-spacing: 0.03em;
  text-transform: none;
  color: #f1e8d1 !important;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.7);
}

html body #overlayPreLevel #preCampaignMeta {
  margin: 0 0 16px;
  padding: 5px 15px;
  border: 1px solid rgba(150, 132, 88, 0.55);
  border-radius: 999px;
  font-family: 'Rubik', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #d5c9a6 !important;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 0 0 2px rgba(12, 13, 9, 0.85);
}

/* цели */
html body #overlayPreLevel #preLevelGoalsRow {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 44px;
  width: 100%;
  margin: 0 0 18px;
  padding: 16px 12px 10px;
  border: 1px solid rgba(150, 132, 88, 0.4);
  border-radius: 7px;
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012) 70%),
    rgba(0, 0, 0, 0.18);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.65), inset 0 0 30px rgba(0, 0, 0, 0.35);
}

html body #overlayPreLevel #preLevelGoalsRow .pre-goal-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: none !important;
  background: none !important;
  box-shadow: none !important;
}

html body #overlayPreLevel #preLevelGoalsRow .pre-goal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  filter: drop-shadow(0 7px 12px rgba(0, 0, 0, 0.6));
}

html body #overlayPreLevel #preLevelGoalsRow .pre-goal-icon .icon-img {
  width: 50px !important;
  height: 50px !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain;
}

html body #overlayPreLevel #preLevelGoalsRow .pre-goal-num {
  font-family: 'Chandler Mountain Thin', 'Cormorant Garamond', Georgia, serif !important;
  font-size: 30px;
  line-height: 1;
  color: #f3ecd9 !important;
}

html body #overlayPreLevel #preLevelGoalsRow .pre-campaign-goal-label {
  display: none !important;
}

html body #overlayPreLevel #preCampaignHint {
  display: none !important;
}

/* помощь */
html body #overlayPreLevel .pre-boosters-selection {
  width: 100%;
  margin-bottom: 16px;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  box-shadow: none !important;
}

html body #overlayPreLevel #preBoosterTitle {
  margin: 0 0 12px;
  font-family: 'Rubik', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #cdbf99 !important;
  text-align: center;
}

html body #overlayPreLevel .pre-boosters-row {
  display: flex;
  justify-content: center;
  gap: 18px;
}

html body #overlayPreLevel .pre-booster-btn {
  border: none !important;
  background: none !important;
  box-shadow: none !important;
}

html body #overlayPreLevel .pre-boost-hint {
  display: none !important;
}

/* кнопка старта */
html body #overlayPreLevel #btnStartMatch3 {
  width: 100%;
  min-height: 56px;
  border: 1px solid #86744a !important;
  border-radius: 4px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)) !important;
  box-shadow: inset 0 0 0 3px rgba(12, 13, 9, 0.9), inset 0 0 0 4px rgba(134, 116, 74, 0.35) !important;
  color: #efe4c8 !important;
}

html body #overlayPreLevel #btnStartMatch3:hover,
html body #overlayPreLevel #btnStartMatch3:active {
  background: linear-gradient(180deg, rgba(190, 168, 112, 0.16), rgba(190, 168, 112, 0.05)) !important;
}

html body #overlayPreLevel #btnStartMatch3 .pre-play-label {
  font-family: 'Rubik', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #efe4c8 !important;
}

/* плашки наград и ярлыки сбоку не перебивают новый вид */
html body #overlayPreLevel .pre-level-rewards,
html body #overlayPreLevel .pre-reward-dangler {
  filter: saturate(0.8) brightness(0.9);
}

/* левый штрих у кнопки старта, как на макете */
html body #overlayPreLevel #btnStartMatch3 {
  position: relative;
  overflow: hidden;
}

html body #overlayPreLevel #btnStartMatch3::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  width: 2px;
  height: 22px;
  margin-top: -11px;
  background: #8d7a4e;
  opacity: 0.9;
}
