/* ================= ВХОД: загрузка / приветствие / музыка ================= */
#gate { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: var(--veil), color-mix(in srgb, var(--bg) 55%, transparent); transition: opacity 1.1s var(--ease), filter 1.1s; overflow-y: auto; }
#gate.out { opacity: 0; filter: blur(10px); pointer-events: none; }
#gate > section { width: 100%; min-height: 100%; padding: calc(env(safe-area-inset-top) + 40px) var(--pad) calc(env(safe-area-inset-bottom) + 40px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; animation: gIn 1s var(--ease); }
@keyframes gIn { from { opacity: 0; transform: translateY(20px); filter: blur(8px); } }
.g-load { flex-direction: row !important; gap: clamp(20px, 6vw, 80px); }
.gl-stage { position: relative; height: min(64svh, 560px); }
.gl-stage .spin { height: 100%; }
.gl-side { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; min-width: 150px; text-align: start; }
.gl-logo { width: 150px; height: auto; }
.gl-word { font-weight: 300; letter-spacing: .3em; font-size: var(--t-sm); min-height: 1.5em; white-space: nowrap; }
.gl-bar { width: 150px; height: 1px; background: var(--line); overflow: hidden; } .gl-bar i { display: block; height: 100%; background: var(--ink); transform-origin: 0; transform: scaleX(0); }
html[dir="rtl"] .gl-bar i { transform-origin: 100%; }
.gl-pc { color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .2em; }
.gw-logo { width: 170px; height: auto; margin-bottom: 30px; }
.g-wel .display, .g-music .display { font-size: clamp(1.8rem, 1.2rem + 3vw, 3.4rem); }
.langs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 30px auto 0; width: min(100%, 460px); }
.lang-opt { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(10px); transition: all .3s; }
.lang-opt b { font-weight: 400; letter-spacing: .2em; font-size: var(--t-sm); } .lang-opt span { font-size: var(--t-xs); color: var(--muted); }
.lang-opt.sel { border-color: var(--ink); box-shadow: 0 0 24px color-mix(in srgb, var(--ink) 18%, transparent); }
.age { margin-top: 22px; padding: 22px; width: min(100%, 460px); }
.age b { font-weight: 450; letter-spacing: .16em; text-transform: uppercase; font-size: var(--t-sm); } .age p { color: var(--ink2); font-size: var(--t-sm); margin-top: 6px; }
.age .cta-row { justify-content: center; margin-top: 18px; }
.cookie { margin-top: 18px; font-size: var(--t-xs); color: var(--muted); max-width: 460px; } .cookie label { display: inline-flex; gap: 6px; align-items: center; color: var(--ink2); }
.cookie input { accent-color: var(--ink); }
.g-no { margin-top: 24px; max-width: 420px; } .g-no b { letter-spacing: .14em; text-transform: uppercase; } .g-no p { color: var(--ink2); margin-top: 6px; }
@media (max-width: 600px) { .g-load { flex-direction: column !important; } .gl-stage { height: 50svh; } .gl-side { align-items: center; text-align: center; } }

/* ================= ОКНА ================= */
.sheet { position: fixed; inset: 0; z-index: 120; display: flex; align-items: flex-end; justify-content: center; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .45s; }
.sheet-panel { position: relative; width: 100%; max-height: 92svh; overflow-y: auto; overscroll-behavior: contain; border-radius: 28px 28px 0 0; background: var(--glass2); backdrop-filter: blur(28px) saturate(1.3); -webkit-backdrop-filter: blur(28px) saturate(1.3);
  border: 1px solid var(--line); padding: 30px var(--pad) calc(env(safe-area-inset-bottom) + 30px); transform: translateY(100%); transition: transform .55s var(--ease); box-shadow: var(--shadow); }
.sheet.on .sheet-bg { opacity: 1; } .sheet.on .sheet-panel { transform: none; }
.sheet-x { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2; } .sheet-x svg { fill: none; }
@media (min-width: 760px) {
  .sheet { align-items: center; }
  .sheet-panel { width: min(560px, 94vw); border-radius: 28px; transform: translateY(30px) scale(.97); opacity: 0; transition: transform .55s var(--ease), opacity .4s; padding: 40px; }
  .sheet.on .sheet-panel { opacity: 1; }
}
.sheet.full .sheet-panel { height: 100svh; max-height: none; width: 100%; border-radius: 0; background: color-mix(in srgb, var(--bg) 88%, transparent); }
@media (min-width: 760px) { .sheet.full .sheet-panel { width: 100%; padding: 60px var(--pad); } }
.sheet-body .kicker { margin-bottom: 10px; } .sheet-body .display.sm { margin-bottom: 18px; }

/* меню */
.menu-sheet .sheet-panel { display: flex; flex-direction: column; justify-content: center; }
.menu ol { list-style: none; display: grid; gap: 2px; max-width: var(--maxw); margin: 0 auto; width: 100%; }
@media (min-width: 900px) { .menu ol { grid-template-columns: 1fr 1fr; column-gap: 60px; } }
.menu a { display: flex; gap: 18px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: clamp(1.2rem, 1rem + 1.4vw, 2rem); font-weight: 300; letter-spacing: .12em; text-transform: uppercase; opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease), padding .3s; transition-delay: calc(var(--i) * 40ms + 120ms); }
.menu li { --i: 0; } .menu a i { font-style: normal; font-size: var(--t-xs); color: var(--muted); letter-spacing: .1em; }
.menu a:hover { padding-inline-start: 10px; }
.menu-sheet.on .menu a { opacity: 1; transform: none; }
.menu li:nth-child(n) a { transition-delay: calc(var(--i) * 40ms + 120ms); }
.menu-extra { display: flex; flex-wrap: wrap; gap: 8px; margin: 30px auto 0; max-width: var(--maxw); width: 100%; align-items: center; }

/* видео */
.video-sheet .sheet-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0,0,0,.92); }
.vs-wrap { position: relative; height: min(82svh, 900px); aspect-ratio: 464 / 688; max-width: 92vw; }
.vs-wrap video { position: relative; width: 100%; height: 100%; object-fit: contain; border-radius: 20px; background: #000; }
.vs-wrap .ambient { inset: -10%; width: 120%; height: 120%; }
.vs-title { margin-top: 16px; letter-spacing: .3em; font-size: var(--t-xs); color: #fff; opacity: .7; text-transform: uppercase; }
.video-sheet .sheet-x { color: #fff; }

/* чат */
.chat-sheet .sheet-panel { display: flex; flex-direction: column; padding-top: 22px; }
@media (min-width: 760px) { .chat-sheet .sheet { align-items: flex-end; } .chat-sheet .sheet-panel { width: 420px; } }
.chat-h { display: flex; gap: 14px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.chat-h b { font-weight: 450; letter-spacing: .14em; text-transform: uppercase; font-size: var(--t-sm); display: block; } .chat-h small { display: flex; gap: 6px; align-items: center; color: var(--ink2); }
.dot-on { width: 7px; height: 7px; }
.topics { display: flex; gap: 6px; overflow-x: auto; padding: 12px 0; scrollbar-width: none; } .topics .chip { flex: none; height: 32px; }
.msgs { display: flex; flex-direction: column; gap: 8px; min-height: 220px; max-height: 42svh; overflow-y: auto; padding: 6px 0 12px; }
.msg { max-width: 82%; animation: msgIn .45s var(--ease); } @keyframes msgIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.msg p { padding: 10px 14px; border-radius: 18px; font-size: var(--t-sm); line-height: 1.45; }
.msg small { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; padding: 0 6px; }
.msg.op p { background: color-mix(in srgb, var(--ink) 9%, transparent); border-end-start-radius: 6px; }
.msg.me { align-self: flex-end; text-align: end; } .msg.me p { background: var(--solid); color: var(--on-solid); border-end-end-radius: 6px; }
.typing p { display: flex; gap: 4px; padding: 14px; } .typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink2); animation: tdot 1s infinite; } .typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tdot { 0%, 100% { opacity: .3; transform: none; } 50% { opacity: 1; transform: translateY(-3px); } }
.chat-f { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line2); border-radius: 30px; padding: 4px 4px 4px 16px; }
.chat-f input { flex: 1; min-width: 0; height: 42px; } .chat-f input:focus { outline: 0; }
.chat-f.support-form { display: block; border: 0; padding: 0; border-radius: 0; }
.chat-entry { display: flex; align-items: center; gap: 8px; padding: 5px 5px 5px 14px; border: 1px solid var(--line2); border-radius: 24px; }
.chat-entry input[hidden], .chat-contact[hidden] { display: none; }
.chat-contact { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line2); border-radius: 18px; margin-bottom: 10px; }
.chat-contact label { display: grid; gap: 8px; font-size: var(--t-sm); }
.chat-contact select, .chat-contact input { width: 100%; border: 1px solid var(--line2); border-radius: 10px; padding: 10px; background: var(--bg); color: var(--ink); }
.chat-contact small { color: var(--ink2); font-size: 11px; line-height: 1.5; }
.chat-entry input:focus-visible, .chat-contact input:focus-visible, .chat-contact select:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.support-error { color: #f49c87; font-size: var(--t-sm); margin: 8px 0; }
.send { background: var(--solid); color: var(--on-solid); } .send:hover { background: var(--solid); }
html[dir="rtl"] .send svg { transform: scaleX(-1); }
.chat-alt { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 14px; } .chat-alt small { width: 100%; color: var(--muted); margin-bottom: 2px; }

/* анкеты */
.ap-progress { position: sticky; top: -30px; height: 2px; background: var(--line); margin: -10px 0 22px; z-index: 2; border-radius: 2px; overflow: hidden; }
.ap-progress i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .5s var(--ease); }
.ap-form fieldset { margin-bottom: 20px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.ap-form .chips { margin-bottom: 14px; } .ap-form .seg { margin-bottom: 14px; }
.ap-done { text-align: center; padding: 30px 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ap-done p { color: var(--ink2); max-width: 40ch; }
.done-ring { position: relative; width: 84px; height: 84px; border-radius: 50%; border: 1px solid var(--ink); display: grid; place-items: center; animation: goGlow 2.4s infinite; }
.done-ring svg { width: 40px; stroke-dasharray: 24; stroke-dashoffset: 24; animation: drawck .9s var(--ease) .2s forwards; } @keyframes drawck { to { stroke-dashoffset: 0; } }

/* кабинет */
.cab-sheet .sheet-body { max-width: 760px; margin: 0 auto; }
.cab-login { max-width: 420px; margin: 8svh auto 0; text-align: center; display: flex; flex-direction: column; align-items: center; } .cab-logo { width: 150px; margin-bottom: 30px; }
.cab-f { width: 100%; text-align: start; }
.cab-top { display: flex; justify-content: space-between; align-items: center; margin: 10px 0 20px; padding-inline-end: 44px; } .cab-top small { color: var(--muted); letter-spacing: .14em; text-transform: uppercase; display: block; } .cab-top b { font-weight: 400; letter-spacing: .08em; }
.lvl { padding: 20px; display: flex; flex-direction: column; gap: 6px; } .lvl > small { color: var(--muted); letter-spacing: .14em; text-transform: uppercase; } .lvl b { font-weight: 400; letter-spacing: .22em; text-transform: uppercase; }
.lvl-bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 8px 0 4px; } .lvl-bar i { display: block; height: 100%; width: calc(var(--p) * 100%); background: var(--ink); animation: grow 1.4s var(--ease); transform-origin: 0; } @keyframes grow { from { transform: scaleX(0); } }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0; } .kpis div { padding: 16px; display: flex; flex-direction: column; } .kpis b { font-size: var(--t-lg); font-weight: 300; } .kpis small { color: var(--muted); }
.order { padding: 18px; } .order-h { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; } .order-h b { font-weight: 450; } .order-h small { color: var(--ink2); }
.track { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 18px; position: relative; }
.track::before { content: ""; position: absolute; top: 6px; left: 10%; right: 10%; height: 1px; background: var(--line2); }
.track li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 10px; letter-spacing: .06em; text-align: center; color: var(--muted); }
.track i { width: 13px; height: 13px; border-radius: 50%; border: 1px solid var(--line2); background: var(--bg); z-index: 1; }
.track .done i { background: var(--ink); border-color: var(--ink); } .track .done { color: var(--ink2); }
.track .now i { border-color: var(--ink); animation: goGlow 2s infinite; } .track .now { color: var(--ink); }
.cab-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 16px; } .cab-actions .tile { padding: 18px; text-align: start; }

/* правовые */
.acc details { border-bottom: 1px solid var(--line); }
.acc summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 16px 0; cursor: pointer; letter-spacing: .14em; text-transform: uppercase; font-size: var(--t-sm); }
.acc summary::-webkit-details-marker { display: none; }
.acc summary i { width: 12px; height: 12px; position: relative; } .acc summary i::before, .acc summary i::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--ink); transition: transform .3s; } .acc summary i::after { transform: rotate(90deg); }
.acc details[open] summary i::after { transform: rotate(0); }
.acc-b { padding: 0 0 18px; color: var(--ink2); font-size: var(--t-sm); white-space: pre-line; animation: paneIn .5s var(--ease); }

/* установка */
.install-sheet .sheet-body { text-align: center; display: flex; flex-direction: column; align-items: center; }
.inst-icon { width: 84px; height: 84px; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); margin-bottom: 20px; animation: float 4s ease-in-out infinite; border: 1px solid var(--line2); }
.install-sheet .tabs { margin: 18px 0; }
.inst-steps { list-style: none; display: none; gap: 10px; width: 100%; text-align: start; margin-bottom: 20px; }
.inst-steps.on { display: grid; }
.inst-steps li { position: relative; display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 16px; border: 1px solid var(--line); animation: msgIn .5s var(--ease) backwards; animation-delay: calc(var(--i) * 90ms); }
.inst-steps .n { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--ink); display: grid; place-items: center; color: var(--ink); flex: none; }
.install-sheet .btn + .btn { margin-top: 10px; }
.lang-sheet .langs { margin-top: 10px; }

/* Чат «Оператор BIONIC» на компьютере: шире и выше — темы в одну-две строки без прокрутки,
   переписка занимает всю свободную высоту, мессенджеры в одну строку. На телефонах и планшетах без изменений. */
@media (min-width: 900px) and (hover: hover) {
  .chat-sheet .sheet-panel { width: min(760px, 92vw); height: min(820px, 90svh); padding: 30px 40px 28px; overflow: hidden; }
  .chat-sheet .sheet-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .chat-sheet .topics { flex-wrap: wrap; overflow: visible; padding: 14px 0; }
  .chat-sheet .msgs { flex: 1; min-height: 0; max-height: none; padding: 8px 4px 14px; }
  .chat-sheet .msg { max-width: 68%; }
  .chat-sheet .chat-f input { height: 48px; }
  .chat-sheet .chat-alt { flex-wrap: nowrap; }
  .chat-sheet .chat-alt small { width: auto; margin: 0 6px 0 0; }
}
