/* =====================================================================
   Общий стиль «Восхождение» (body.climb) — главная и калькулятор.
   Базовые цвета — из style.css. Шрифты: Dela Gothic One — заголовки и цифры, Onest — текст.
   ===================================================================== */
.climb {
  --display: "Dela Gothic One", "Unbounded", system-ui, sans-serif;
  --font: "Onest", "Manrope", system-ui, sans-serif;
  --font-head: "Onest", "Manrope", system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --tier: #d9bd94;
  font-family: var(--font);
  background: #060609;
}
.climb::before { background: radial-gradient(1200px 700px at 50% -10%, rgba(255, 61, 46, .16), transparent 60%), #060609; }
.climb::after { display: none; }
.climb main { position: relative; z-index: 1; }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 28px; }
.big { font-family: var(--display); font-weight: 400; font-size: clamp(38px, 6.2vw, 96px); line-height: .96; letter-spacing: -.01em; }
.split .ch, .split .ws { display: inline-block; }
.split .ws { width: .32em; }

/* Искры и атмосфера */
.embers { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.aura {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .16; background-color: #d9bd94; transition: background-color 1.4s var(--ease);
  -webkit-mask: radial-gradient(90% 60% at 50% 115%, #000, transparent 70%); mask: radial-gradient(90% 60% at 50% 115%, #000, transparent 70%);
}

/* ---------- Шапка и подвал ---------- */
.climb .site-header { z-index: 60; }
.climb .site-header.scrolled { background: rgba(6, 6, 9, .55); border-color: transparent; }
.climb .logo { font-family: var(--display); font-weight: 400; letter-spacing: .01em; }
.climb .nav a { border-radius: 99px; font-weight: 600; }
.climb .btn { border-radius: 99px; font-family: var(--font); }
.climb .site-footer { position: relative; z-index: 1; background: transparent; }
.climb .footer-grid h4 { font-family: var(--font); }

/* ---------- Кнопки ---------- */
.c-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; overflow: hidden; isolation: isolate;
  padding: 18px 34px; border: 0; border-radius: 99px; font: 700 17px/1 var(--font); white-space: nowrap; cursor: pointer; will-change: transform;
  transition: box-shadow .4s var(--ease), background-color .3s;
}
.c-btn span, .c-btn .ic { position: relative; z-index: 1; }
.c-btn.primary { color: #fff; background: var(--grad); box-shadow: 0 18px 50px -18px rgba(255, 61, 46, .9), inset 0 1px 0 rgba(255, 255, 255, .3); }
.c-btn.primary::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .9s var(--ease);
}
.c-btn.primary:hover::after { transform: translateX(120%); }
.c-btn.primary:hover { box-shadow: 0 24px 70px -16px rgba(255, 61, 46, 1), inset 0 1px 0 rgba(255, 255, 255, .3); }
.c-btn.ghost { color: var(--text); background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
.c-btn.ghost:hover { background: rgba(255, 255, 255, .09); }
.c-btn.wide { width: 100%; }
.c-btn.huge { padding: 28px 64px; font-size: clamp(18px, 2vw, 24px); }
.c-btn[disabled] { opacity: .4; pointer-events: none; box-shadow: none; }
.c-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

.c-chip {
  border: 0; cursor: pointer; padding: 10px 16px; border-radius: 99px; background: rgba(255, 255, 255, .05); color: #d6d0d6;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); font: 600 14px var(--font); transition: background .3s, box-shadow .3s, color .3s;
}
.c-chip:hover { color: #fff; background: rgba(255, 61, 46, .12); box-shadow: inset 0 0 0 1px rgba(255, 122, 61, .6); }
.c-chip.on { color: #fff; background: var(--grad); box-shadow: none; }

/* ---------- Переключатель из двух-трёх вариантов ---------- */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 6px; border-radius: 22px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.seg button { border: 0; cursor: pointer; padding: 12px 10px; border-radius: 16px; background: none; color: var(--muted); font: 700 17px var(--font); transition: background .35s var(--ease), color .35s; }
.seg button small { display: block; font-size: 12px; font-weight: 500; opacity: .75; margin-top: 2px; }
.seg button.on { background: var(--grad); color: #fff; box-shadow: 0 12px 30px -12px rgba(255, 61, 46, .9); }
.seg button:not(.on):hover { color: var(--text); background: rgba(255, 255, 255, .05); }

/* ---------- Поля MMR ---------- */
.mmr-inputs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.mmr-in { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 18px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); cursor: text; transition: box-shadow .3s; }
.mmr-in:focus-within { box-shadow: inset 0 0 0 1.5px #ff3d2e; }
.mmr-in.to:focus-within { box-shadow: inset 0 0 0 1.5px var(--gold); }
.mmr-in span { font-size: 12px; font-weight: 600; color: var(--muted); }
.mmr-in input { width: 100%; min-width: 0; padding: 0; border: 0; outline: none; background: none; color: var(--text); font: 400 26px/1.2 var(--display); }
.mmr-in small { font-size: 12px; font-weight: 700; }
.mmr-arrow { width: 22px; height: 2px; background: linear-gradient(90deg, #ff3d2e, var(--gold)); position: relative; }
.mmr-arrow::after { content: ""; position: absolute; right: -1px; top: -4px; width: 8px; height: 8px; border-top: 2px solid var(--gold); border-right: 2px solid var(--gold); transform: rotate(45deg); }

/* ---------- Циферблат MMR (assets/js/dial.js) ---------- */
.dial-box { position: relative; width: 100%; max-width: 620px; margin: 0 auto; aspect-ratio: 1; }
.dial { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; user-select: none; -webkit-user-select: none; }
.dial-bed { fill: none; stroke: rgba(255, 255, 255, .05); stroke-width: 30; stroke-linecap: round; }
.dial-tier { fill: none; stroke-width: 6; opacity: .45; }
.dial-lock { fill: none; stroke: rgba(255, 255, 255, .22); stroke-width: 30; stroke-dasharray: 2 6; }
.dial-hit { fill: none; stroke: transparent; stroke-width: 78; pointer-events: stroke; cursor: pointer; touch-action: none; }
.dial-icon { opacity: .35; transition: opacity .4s; pointer-events: none; }
.dial-icon.lit { opacity: 1; }
.dial-sel, .dial-sel-glow { pointer-events: none; }
.has-error .dial-sel, .has-error .dial-sel-glow { stroke: rgba(255, 255, 255, .25); filter: none; }
.knob { cursor: grab; outline: none; touch-action: none; }
.dragging, .dragging .knob, .dragging .dial-hit { cursor: grabbing; }
.knob-hit { fill: transparent; }
.knob-body { fill: #fff; stroke: #ff3d2e; stroke-width: 5; transition: r .3s var(--ease); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .6)); }
.knob.to .knob-body { stroke: var(--gold); }
.knob-core { fill: #ff3d2e; pointer-events: none; }
.knob.to .knob-core { fill: var(--gold); }
.knob:hover .knob-body, .knob:focus-visible .knob-body { r: 19; }
.knob:focus-visible .knob-hit { fill: rgba(243, 183, 91, .22); }

.dial-core { position: absolute; left: 50%; top: 50%; width: 58%; transform: translate(-50%, -52%); display: flex; flex-direction: column; align-items: center; text-align: center; pointer-events: none; }
.core-medal { width: 128px; height: 128px; }
.core-medal .medal { display: block; filter: drop-shadow(0 18px 26px rgba(0, 0, 0, .7)) drop-shadow(0 0 30px color-mix(in srgb, var(--tier) 30%, transparent)); }
.core-rank { margin-top: 4px; font-weight: 700; font-size: 15px; }
.core-price { margin-top: 8px; font: 400 clamp(36px, 5.4vw, 64px)/1 var(--display); letter-spacing: -.01em; white-space: nowrap; }
.core-price em { font-style: normal; font-size: .5em; margin-left: .15em; color: var(--gold); vertical-align: .45em; }
.core-meta { margin-top: 8px; color: var(--muted); font-size: 14px; font-weight: 600; line-height: 1.35; }

/* ---------- Маскот с репликой ---------- */
.mascot { position: relative; display: flex; align-items: flex-end; gap: 14px; min-height: 150px; margin-bottom: 6px; }
.mascot-body { flex: none; width: 112px; height: 112px; animation: bob 5s ease-in-out infinite; transform-origin: 50% 100%; }
.mascot-body svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 18px 30px rgba(255, 61, 46, .35)); }
.bubble {
  order: 2; position: relative; align-self: flex-start; padding: 14px 18px; border-radius: 22px 22px 22px 6px; transform-origin: 0 100%;
  background: #f4ecea; color: #16121a; font-weight: 700; font-size: 16px; line-height: 1.35; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .8);
}
.bubble::before { content: ""; position: absolute; left: -7px; bottom: 0; width: 16px; height: 16px; background: #f4ecea; clip-path: polygon(100% 0, 100% 100%, 0 100%); }

/* ---------- Заголовок внутренних страниц ---------- */
.pg-hero { position: relative; padding: 48px 0 40px; }
.pg-title { font-size: clamp(42px, 7.4vw, 116px); }
.pg-title [data-split] { display: inline-block; white-space: nowrap; overflow: clip; padding-bottom: .06em; vertical-align: top; }
.pg-sub { margin-top: 20px; color: var(--muted); font-size: clamp(16px, 1.5vw, 19px); line-height: 1.55; max-width: 620px; }
.pg-section { padding: 30px 0 90px; }

/* ---------- Карточка, поля, уведомления ---------- */
.c-card {
  padding: 32px; border-radius: 34px;
  background: linear-gradient(165deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .012) 60%), rgba(8, 8, 11, .6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
}
.c-card-head { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.c-card-head h2 { font: 400 26px/1.1 var(--display); }
.c-card-head p { margin-top: 4px; color: var(--muted); font-size: 14.5px; }
.c-num { flex: none; font: 400 46px/1 var(--display); color: transparent; -webkit-text-stroke: 1.2px rgba(255, 122, 61, .75); }
.climb .input {
  border: 0; border-radius: 16px; padding: 14px 16px; background: rgba(255, 255, 255, .04); color: var(--text); font: 500 16px var(--font);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); transition: box-shadow .3s;
}
.climb .input:focus { border: 0; box-shadow: inset 0 0 0 1.5px #ff7a3d, 0 0 0 4px rgba(255, 61, 46, .12); }
.climb .field-block > span:first-child { font-size: 13px; font-weight: 600; color: var(--muted); }
.climb .notice { border: 0; border-radius: 18px; padding: 14px 16px; background: rgba(243, 183, 91, .06); box-shadow: inset 0 0 0 1px rgba(243, 183, 91, .18); color: #d8d0d6; font-size: 14.5px; }

/* ---------- Сообщения чата ---------- */
.climb .msg-bubble { border: 0; border-radius: 20px 20px 20px 6px; padding: 11px 15px; background: rgba(255, 255, 255, .06); }
.climb .msg-mine .msg-bubble { border-radius: 20px 20px 6px 20px; background: linear-gradient(135deg, #ff7a3d, #ff3d2e 60%, #d11f4a); }
.climb .msg-mine .msg-bubble b { color: rgba(255, 255, 255, .85); }
.climb .msg-mine time { color: rgba(255, 255, 255, .7); }
.climb .msg-bubble b { color: var(--gold); }
.climb .msg-system span { border: 0; background: rgba(255, 255, 255, .05); font-weight: 600; }

/* ---------- Аккордеон вопросов ---------- */
.qa-item { border-bottom: 1px solid rgba(255, 255, 255, .08); }
.qa-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 0; font-weight: 700; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.3; }
.qa-item summary::-webkit-details-marker { display: none; }
.qa-plus { position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); transition: transform .5s var(--ease), background .3s; }
.qa-plus::before, .qa-plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: currentColor; border-radius: 2px; }
.qa-plus::after { transform: rotate(90deg); }
.qa-item[open] .qa-plus { transform: rotate(45deg); background: var(--grad); box-shadow: none; }
.qa-item summary:hover .qa-plus { box-shadow: inset 0 0 0 1px rgba(255, 122, 61, .8); }
.qa-answer { padding: 0 60px 26px 0; color: var(--muted); font-size: 16px; line-height: 1.6; animation: fade .5s var(--ease); }

/* ---------- Финальный призыв с маскотом ---------- */
.c-finale { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 90px 0 110px; }
.c-finale::before { content: ""; position: absolute; left: 50%; top: 40%; width: 760px; height: 760px; margin: -380px 0 0 -380px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 61, 46, .24), transparent 62%); pointer-events: none; z-index: -1; }
.c-finale-mascot { width: clamp(120px, 12vw, 170px); aspect-ratio: 1; }
.c-finale-mascot svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 30px 50px rgba(255, 61, 46, .45)); animation: bob 5s ease-in-out infinite; }
.c-finale h2 { margin: 30px 0 14px; font: 400 clamp(34px, 5.4vw, 80px)/.98 var(--display); }
.c-finale p { color: var(--muted); font-size: 17px; max-width: 520px; margin-bottom: 32px; }
.c-finale-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* =====================================================================
   Чат поддержки (assets/js/support.js)
   ===================================================================== */
.sp { position: fixed; right: 24px; bottom: 24px; z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; font-family: var(--font); }
.has-bar .sp { transition: bottom .3s; }
@media (max-width: 1020px) { .has-bar .sp { bottom: 104px; } }
.sp-fab {
  position: relative; width: 68px; height: 68px; padding: 0; border: 0; border-radius: 24px; cursor: pointer; background: none;
  filter: drop-shadow(0 18px 30px rgba(255, 61, 46, .45)); transition: transform .5s var(--ease);
}
.sp-fab::before { content: ""; position: absolute; inset: -6px; border-radius: 28px; box-shadow: 0 0 0 2px rgba(255, 122, 61, .55); animation: sp-ring 2.6s var(--ease) infinite; pointer-events: none; }
.sp-fab:hover { transform: translateY(-3px) rotate(-6deg); }
.sp-fab:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
.sp-fab-face, .sp-fab-x { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .35s, transform .5s var(--ease); }
.sp-fab-face svg { width: 100%; height: 100%; }
.sp-fab-x { border-radius: 24px; background: #f4ecea; color: #16121a; opacity: 0; transform: rotate(-90deg) scale(.6); }
.sp-fab-x .ic { width: 26px; height: 26px; stroke-width: 2.4; }
.sp.open .sp-fab-face { opacity: 0; transform: rotate(90deg) scale(.6); }
.sp.open .sp-fab-x { opacity: 1; transform: none; }
.sp.open .sp-fab::before { animation: none; opacity: 0; }
.sp-badge { position: absolute; top: -6px; right: -6px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 99px; display: grid; place-items: center; background: var(--green); color: #04140c; font: 800 12px var(--font); box-shadow: 0 0 0 3px #060609; }
@keyframes sp-ring { 0% { transform: scale(.92); opacity: .9; } 70%, 100% { transform: scale(1.25); opacity: 0; } }

.sp-tease {
  position: relative; display: flex; align-items: center; gap: 8px; max-width: 260px; padding: 12px 10px 12px 16px; border-radius: 20px 20px 6px 20px; cursor: pointer;
  background: #f4ecea; color: #16121a; font-weight: 700; font-size: 14.5px; line-height: 1.35; box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .8); transform-origin: 100% 100%;
}
.sp-tease button { flex: none; width: 26px; height: 26px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .06); color: #16121a; cursor: pointer; }
.sp-tease button .ic { width: 14px; height: 14px; stroke-width: 2.6; }

.sp-panel {
  width: min(390px, calc(100vw - 32px)); height: min(600px, calc(100svh - 130px)); display: flex; flex-direction: column; overflow: hidden; border-radius: 30px; transform-origin: 100% 100%;
  background: linear-gradient(180deg, #18131a, #0c0b10); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09), 0 40px 90px -30px rgba(0, 0, 0, .95), 0 0 90px -40px rgba(255, 61, 46, .45);
}
.sp-panel[hidden] { display: none; }
.sp-head { position: relative; display: flex; align-items: center; gap: 12px; padding: 16px 16px 16px 18px; background: radial-gradient(120% 140% at 0% 0%, rgba(255, 61, 46, .28), transparent 60%); border-bottom: 1px solid rgba(255, 255, 255, .07); }
.sp-ava { flex: none; width: 46px; height: 46px; }
.sp-ava svg { width: 100%; height: 100%; transform: rotate(-6deg); }
.sp-head b { display: block; font: 400 16px var(--display); }
.sp-head small { display: flex; align-items: center; gap: 6px; margin-top: 3px; color: var(--muted); font-size: 12.5px; }
.sp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(62, 207, 142, .18); animation: pulse 2s infinite; }
.sp-close { margin-left: auto; width: 38px; height: 38px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .06); color: var(--text); cursor: pointer; }
.sp-close:hover { background: rgba(255, 255, 255, .12); }
.sp-close .ic { width: 18px; height: 18px; }

.sp-start { flex: 1; min-height: 0; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.sp-hello { position: relative; padding: 14px 16px; border-radius: 6px 20px 20px 20px; background: rgba(255, 255, 255, .06); font-size: 15px; line-height: 1.5; }
.sp-topics { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-topics .c-chip { padding: 8px 12px; font-size: 13px; }
.sp-start-form { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.sp-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sp-input {
  width: 100%; min-width: 0; border: 0; outline: none; resize: none; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .05); color: var(--text); font: 500 15px/1.4 var(--font);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); transition: box-shadow .3s;
}
.sp-input::placeholder { color: var(--dim); }
.sp-input:focus { box-shadow: inset 0 0 0 1.5px #ff7a3d; }
.sp-start-form .c-btn { padding: 15px; margin-top: 4px; }
.sp-note { color: var(--dim); font-size: 12px; line-height: 1.45; text-align: center; }

.sp-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sp-chat[hidden], .sp-start[hidden] { display: none; }
.sp-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.sp-form { display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid rgba(255, 255, 255, .07); }
.sp-form .sp-input { max-height: 120px; }
.sp-send { flex: none; width: 46px; height: 46px; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; cursor: pointer; box-shadow: 0 10px 24px -10px rgba(255, 61, 46, .9); }
.sp-send[disabled] { opacity: .5; }
.sp-send .ic { width: 20px; height: 20px; }

@media (max-width: 520px) {
  .sp { right: 14px; bottom: 14px; }
  .sp-fab { width: 60px; height: 60px; }
  .sp.open { left: 14px; top: 14px; }
  .sp.open .sp-panel { width: 100%; height: auto; flex: 1; }
  .sp-fields { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .wrap { padding: 0 20px; }
  .core-medal { width: 76px; height: 76px; }
  .core-medal .medal { width: 76px; height: 76px; }
  .core-rank { font-size: 13px; }
  .core-meta { font-size: 12px; }
  .dial-box { margin-bottom: -14%; }
  .knob-hit { r: 44; }
  .knob-body { r: 22; }
  .knob:hover .knob-body, .knob:focus-visible .knob-body { r: 25; }
  .mascot { min-height: 0; align-items: center; }
  .bubble { align-self: center; font-size: 15px; }
  .mascot-body { width: 84px; height: 84px; }
  .c-btn.huge { width: 100%; padding: 24px 20px; }
  .c-card { padding: 24px 18px; border-radius: 28px; }
  .c-num { font-size: 34px; }
  .c-card-head h2 { font-size: 21px; }
  .qa-answer { padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .mascot-body, .c-finale-mascot svg, .sp-fab::before, .sp-dot { animation: none; }
  .aura { transition: none; }
}
