/* Окно оформления: заказ → оплата → ключ. Цвета и шрифты берутся из темы сайта,
   поэтому на каждом из трёх сайтов окно выглядит своим. */

:root {
  --ck-ease: cubic-bezier(0.23, 1, 0.32, 1);
  --ck-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --ck-radius: calc(var(--radius, 8px) * 2 + 4px);
  --ck-inner: calc(var(--radius, 8px) + 4px);
}

html.ck-lock, html.ck-lock body { overflow: hidden; }

.ck-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ck-i { display: inline-flex; flex: none; }
.ck-i svg { display: block; }

/* ---------------- каркас окна ---------------- */

.ck { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 24px; }
.ck[hidden] { display: none; }

.ck__backdrop {
  position: absolute; inset: 0;
  background: rgba(6, 8, 10, .58);
  opacity: 0; transition: opacity 220ms ease;
}
@supports (backdrop-filter: blur(4px)) {
  .ck__backdrop { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
}
.ck.is-open .ck__backdrop { opacity: 1; }

.ck__sheet {
  position: relative; width: min(540px, 100%);
  max-height: min(90vh, 880px);
  display: flex; flex-direction: column;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--ck-radius);
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .6);
  opacity: 0; transform: translateY(12px) scale(.985);
  transition: opacity 200ms ease, transform 280ms var(--ck-ease);
  outline: none;
}
.ck.is-open .ck__sheet { opacity: 1; transform: none; }

.ck__grip { display: none; }

.ck__head { display: flex; align-items: center; gap: 14px; padding: 16px 16px 0 22px; }

.ck__steps { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0; padding: 0; list-style: none; }
.ck__step { margin: 0; font-family: var(--font-ui); font-size: 11.5px; color: var(--muted); letter-spacing: .01em; }
.ck__step i {
  display: block; height: 3px; border-radius: 3px; margin-bottom: 7px;
  background: var(--line); position: relative; overflow: hidden;
}
.ck__step.is-done i { background: var(--accent); }
.ck__step.is-done span { color: var(--ink-soft); }
.ck__step.is-now span { color: var(--ink); font-weight: 600; }
.ck__step.is-now i { background: var(--accent-soft); }
.ck__step.is-now i::after {
  content: ""; position: absolute; inset: 0; width: 45%;
  background: var(--accent); border-radius: 3px;
  animation: ck-slide 1.6s var(--ck-ease) infinite;
}
@keyframes ck-slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(240%); } }
.ck__sheet[data-state="ready"] .ck__step.is-now i::after,
.ck__sheet[data-state="save"] .ck__step.is-now i::after,
.ck__sheet[data-state="renew"] .ck__step.is-now i::after,
.ck__sheet[data-state="relogin"] .ck__step.is-now i::after,
.ck__sheet[data-state="canceled"] .ck__step.is-now i::after { animation: none; transform: none; width: 100%; opacity: .55; }

.ck__x {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  transition: color 150ms ease, border-color 150ms ease, transform 150ms var(--ck-ease);
}
.ck__x:hover { color: var(--ink); border-color: var(--line-strong); }
.ck__x:active { transform: scale(.94); }

.ck__body {
  overflow-y: auto; overscroll-behavior: contain;
  padding: 20px 26px 26px;
  transition: opacity 130ms ease, filter 130ms ease;
}
.ck__body.is-swapping { opacity: 0; filter: blur(2px); }

.ck__title {
  font-family: var(--font-display, var(--font-ui)); font-weight: 700;
  font-size: 24px; line-height: 1.18; letter-spacing: -0.022em;
  margin: 0 0 8px; text-wrap: balance;
}
.ck__lede { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 0 0 18px; max-width: none; }

.ck-eyebrow {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px;
  font-family: var(--font-ui); font-size: 13px; font-weight: 600; color: var(--accent);
}

.ck-center { text-align: center; display: flex; flex-direction: column; align-items: center; }
.ck-center > .btn, .ck-center > .ck-btn { width: 100%; }
.ck-center .ck__lede { max-width: 38ch; }
.ck-center-text { text-align: center; }

.ck-fine { font-family: var(--font-ui); font-size: 13px; line-height: 1.5; color: var(--muted); margin: 12px 0 0; max-width: none; }
.ck-fine a { color: var(--ink-soft); }

/* ---------------- кнопки ---------------- */

.ck__sheet .btn, .kp .btn { border-radius: var(--ck-inner); gap: 9px; transition: background-color 150ms ease, transform 150ms var(--ck-ease); }
.ck__sheet .btn:active, .kp .btn:active { transform: scale(.98); }
.ck-pay { margin-top: 20px; }

.ck-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-ui); font-weight: 600; font-size: 15px;
  padding: 12px 18px; border-radius: var(--ck-inner); cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms var(--ck-ease);
}
.ck-btn--quiet { background: var(--surface-sunk); border: 1px solid var(--line-strong); color: var(--ink); text-decoration: none; }
.ck-btn--quiet:hover { border-color: var(--accent); }
.ck-btn--quiet:active { transform: scale(.98); }
.ck-btn--block { width: 100%; margin-top: 14px; }

.ck-link {
  background: none; border: 0; padding: 8px 4px; cursor: pointer; min-height: 40px;
  font-family: var(--font-ui); font-size: 14px; color: var(--muted);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong);
}
.ck-link:hover { color: var(--accent); text-decoration-color: currentColor; }
.ck-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 18px; margin-top: 8px; }

.ck-copy {
  flex: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  min-width: 36px; height: 36px; padding: 0 10px; justify-content: center;
  background: transparent; border: 1px solid var(--line); border-radius: var(--ck-inner);
  color: var(--muted); font-family: var(--font-ui); font-size: 13px;
  transition: color 150ms ease, border-color 150ms ease, transform 150ms var(--ck-ease);
}
.ck-copy:hover { color: var(--ink); border-color: var(--line-strong); }
.ck-copy:active { transform: scale(.95); }
.ck-copy .ck-i + .ck-i { display: none; }
.ck-copy.is-copied { color: var(--accent); border-color: var(--accent); }
.ck-copy.is-copied .ck-i:first-child { display: none; }
.ck-copy.is-copied .ck-i + .ck-i { display: inline-flex; }
.ck-copy__label:empty { display: none; }
.ck-btn .ck-copy__label { font-size: 15px; }
.ck-btn.is-copied { color: var(--accent); border-color: var(--accent); }

/* ---------------- способ оплаты ---------------- */

.ck-method {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
  background: var(--surface-sunk); border: 1px solid var(--line); border-radius: var(--ck-inner);
  margin: 0 0 16px; width: 100%;
}
.ck-method__btn {
  font-family: var(--font-ui); font-size: 14.5px; font-weight: 500; color: var(--ink-soft);
  background: transparent; border: 0; border-radius: calc(var(--ck-inner) - 3px);
  padding: 10px; cursor: pointer; transition: background-color 150ms ease, color 150ms ease;
}
.ck-method__btn[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 0 var(--line-strong), 0 0 0 1px var(--line); }

/* ---------------- карточка входа ---------------- */

.ck-cred {
  background: var(--surface-sunk); border: 1px solid var(--line);
  border-radius: var(--ck-inner); padding: 14px 14px 14px 16px; margin: 0 0 16px; text-align: left;
}
.ck-cred__head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  font-family: var(--font-ui); font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
}
/* Билет со входом: сделан под скриншот — логин, пароль и где управлять */
.ck-ticket {
  position: relative; text-align: left;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--ck-inner); padding: 14px 16px 16px;
}
.ck-ticket__top {
  display: flex; align-items: center; gap: 7px; margin-bottom: 6px;
  font-family: var(--font-ui); font-size: 11.5px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--accent);
}
.ck-ticket__row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label copy" "value copy";
  column-gap: 10px; align-items: center; padding: 9px 0;
}
.ck-ticket__row + .ck-ticket__row { border-top: 1px solid var(--line); }
.ck-ticket__label { font-family: var(--font-ui); font-size: 12.5px; color: var(--muted); }
.ck-ticket__row .ck-ticket__label { grid-area: label; }
.ck-ticket__row .ck-copy { grid-area: copy; }
.ck-ticket__row .ck-copy__label { display: none; }
.ck-ticket__value {
  grid-area: value; margin-top: 1px;
  font-family: var(--font-mono); font-size: 20px; font-weight: 600; line-height: 1.3;
  color: var(--ink); letter-spacing: -0.01em; overflow-wrap: anywhere;
}
.ck-ticket__value.is-hint { font-family: var(--font-ui); font-size: 15px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.ck-ticket__cut { position: relative; margin: 8px -16px 14px; border-top: 2px dashed var(--line-strong); }
.ck-ticket__cut::before, .ck-ticket__cut::after {
  content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--notch, var(--surface-sunk)); border: 1px solid var(--line-strong);
}
.ck-ticket__cut::before { left: -11px; clip-path: inset(0 0 0 50%); }
.ck-ticket__cut::after { right: -11px; clip-path: inset(0 50% 0 0); }
.ck-ticket__places { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.ck-ticket__place { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ck-ticket__site {
  font-family: var(--font-ui); font-size: 17px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--accent); text-decoration: none; overflow-wrap: anywhere;
}
a.ck-ticket__site:hover { text-decoration: underline; text-underline-offset: 3px; }
.ck-ticket__site--plain { color: var(--ink); }
.ck-ticket__note { font-family: var(--font-ui); font-size: 12.5px; color: var(--muted); }

.ck-save { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.ck-save .ck-btn { width: 100%; padding: 11px 12px; }
.ck-save .ck-copy__label { font-size: 14.5px; }
.ck-save .ck-i + .ck-i { display: none; }
.ck-save .is-copied .ck-i:first-child { display: none; }
.ck-save .is-copied .ck-i + .ck-i { display: inline-flex; }

/* дата конца срока: всегда в обводке, чтобы не терялась в тексте */
.ck-date {
  display: inline-flex; align-items: center; gap: 5px; vertical-align: baseline;
  margin: 0 1px; padding: 1px 9px 1px 7px; border-radius: 999px;
  border: 1.5px solid var(--accent); background: var(--accent-soft); color: var(--ink);
  font-family: var(--font-ui); font-size: .95em; font-weight: 600; line-height: 1.45; white-space: nowrap;
}
.ck-date .ck-i { color: var(--accent); }
.ck-date.is-warn { border-color: var(--warn); background: var(--warn-soft); }
.ck-date.is-warn .ck-i { color: var(--warn); }
.ck-pill .ck-date { margin: 0 2px; padding: 0 8px; font-size: 13.5px; }
.ck-pill__text { text-align: left; }
.ck-pill__cta { margin-left: 10px; color: var(--accent); white-space: nowrap; }

/* логин на шаге оплаты */
.ck-me {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; padding: 10px 12px;
  font-family: var(--font-ui); font-size: 14px; color: var(--ink-soft);
  background: var(--surface-sunk); border: 1px solid var(--line); border-radius: var(--ck-inner);
}
.ck-me > .ck-i { color: var(--muted); }
.ck-me b { font-family: var(--font-mono); font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.ck-me__link { margin-left: auto; min-height: 0; padding: 2px 0; font-size: 13.5px; }

.ck-cred__warn {
  display: flex; gap: 9px; align-items: flex-start; margin: 12px 0 0; max-width: none;
  font-family: var(--font-ui); font-size: 13.5px; line-height: 1.45; color: var(--ink-soft);
  background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
  border-radius: calc(var(--ck-inner) - 2px); padding: 10px 12px;
}
.ck-cred__warn .ck-i { color: var(--warn); margin-top: 1px; }
.ck-cred__warn b { color: var(--ink); }

/* ---------------- как пройдёт оплата ---------------- */

.ck-howto { list-style: none; counter-reset: ck; margin: 0; padding: 0; display: grid; gap: 10px; max-width: none; }
.ck-howto li {
  counter-increment: ck; position: relative; margin: 0; padding-left: 34px;
  font-size: 14.5px; line-height: 1.45; color: var(--ink-soft);
}
.ck-howto li::before {
  content: counter(ck); position: absolute; left: 0; top: 0;
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-ui); font-size: 12px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent);
}
.ck-howto b { color: var(--ink); font-weight: 600; }

/* ---------------- ожидание ---------------- */

.ck-spin {
  width: 44px; height: 44px; border-radius: 50%; margin: 10px 0 20px;
  border: 3px solid var(--accent-soft); border-top-color: var(--accent);
  animation: ck-turn .8s linear infinite;
}
@keyframes ck-turn { to { transform: rotate(360deg); } }

.ck-ring {
  position: relative; width: 112px; height: 112px; margin: 6px 0 18px;
  border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle, var(--accent-soft) 0 58%, transparent 59%);
}
.ck-ring::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid var(--line);
}
.ck-ring__arc {
  position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid transparent; border-top-color: var(--accent); border-right-color: var(--accent);
  animation: ck-turn 1.1s linear infinite;
}
.ck-ring b {
  position: relative; font-family: var(--font-display, var(--font-ui));
  font-size: 19px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink);
}

.ck-status {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 4px;
  font-family: var(--font-ui); font-size: 13.5px; color: var(--muted);
}
.ck-status i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none;
  animation: ck-blink 1.6s ease-in-out infinite;
}
@keyframes ck-blink { 50% { opacity: .25; } }

.ck-note {
  width: 100%; margin: 12px 0 0; padding: 11px 13px; text-align: left;
  font-family: var(--font-ui); font-size: 13.5px; line-height: 1.45; color: var(--ink-soft);
  background: var(--surface-sunk); border: 1px solid var(--line); border-radius: var(--ck-inner);
}
.ck-note--ok {
  display: flex; gap: 9px; align-items: flex-start; margin: 0; max-width: none;
  font-size: 14px; color: var(--ink); background: var(--accent-soft); border-color: var(--accent-line, var(--line));
}
.ck-note--ok .ck-i { color: var(--accent); margin-top: 1px; }

/* продление */
.ck__sheet .ck-plans { margin: 0 0 14px; }
.ck-form .field { text-align: left; margin-bottom: 12px; }
.ck-form .btn { width: 100%; margin-top: 6px; }

.ck-more {
  margin-top: 14px; border: 1px solid var(--line); border-radius: var(--ck-inner); background: var(--surface-sunk);
}
.ck-more > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 14px; min-height: 48px; font-family: var(--font-ui); font-size: 15px; font-weight: 600; color: var(--ink);
}
.ck-more > summary::-webkit-details-marker { display: none; }
.ck-more > summary .ck-i { color: var(--muted); transition: transform 200ms var(--ck-ease); }
.ck-more[open] > summary .ck-i { transform: rotate(90deg); }
.ck-more > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--ck-inner); }
.ck-more > .ck-access { padding: 2px 14px 14px; --notch: var(--surface-sunk); }

/* ---------------- успех ---------------- */

.ck-success { display: flex; align-items: center; gap: 16px; margin: 0 0 20px; }
.ck-success .ck__title { margin-bottom: 4px; }
.ck-success .ck__lede { margin: 0; }

.ck-badge {
  flex: none; width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-line, var(--accent-soft));
}
.ck-center .ck-badge { margin: 6px 0 16px; }
.ck-badge--muted { background: var(--surface-sunk); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }

.ck-tick { stroke-dasharray: 40; stroke-dashoffset: 40; animation: ck-draw 420ms var(--ck-ease) 120ms forwards; }
@keyframes ck-draw { to { stroke-dashoffset: 0; } }
.ck__sheet[data-state="paid"] .ck-badge { animation: ck-pop 360ms var(--ck-ease); }
@keyframes ck-pop { from { transform: scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------- выдача ключа ---------------- */

.ck-access { display: grid; gap: 18px; }
.ck-block { text-align: left; }
.ck-block__title {
  display: flex; align-items: center; gap: 10px; margin: 0 0 12px;
  font-family: var(--font-ui); font-size: 16.5px; font-weight: 600; letter-spacing: -0.01em;
}
.ck-num {
  width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font-size: 12.5px; font-weight: 700;
}
.ck-access .getapps { margin: 0; }
.getapp.is-main { border-color: var(--accent); }
.ck-add { margin-top: 2px; }

.ck-qr {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center;
  background: var(--surface-sunk); border: 1px solid var(--line); border-radius: var(--ck-inner); padding: 14px;
}
.ck-qr__tile { width: 160px; height: 160px; background: #fff; border-radius: 10px; padding: 6px; line-height: 0; }
.ck-qr__tile img { width: 148px; height: 148px; image-rendering: pixelated; }
.ck-qr__text b { display: block; font-family: var(--font-ui); font-size: 15.5px; margin-bottom: 6px; }
.ck-qr__text p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.45; max-width: none; }
.ck-qr__text .ck-fine { margin-top: 10px; }

.ck-copyrow { margin-top: 14px; }
.ck-copyrow__label { display: block; font-family: var(--font-ui); font-size: 12.5px; color: var(--muted); margin-bottom: 6px; line-height: 1.4; }
.ck-copyrow__line { display: flex; gap: 6px; }
.ck-copyrow__input {
  flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 13px;
  padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: var(--ck-inner);
  background: var(--surface-sunk); color: var(--ink-soft);
}

.ck-connect { display: grid; gap: 8px; }
.ck-connect .ck-btn--block { margin-top: 0; }
.ck-manual {
  display: flex; gap: 9px; align-items: flex-start; margin: 14px 0 0; max-width: none;
  font-family: var(--font-ui); font-size: 13.5px; line-height: 1.45; color: var(--ink-soft);
}
.ck-manual .ck-i { color: var(--warn); margin-top: 1px; }
.ck-manual b { color: var(--ink); }
.ck-copyrow { margin-top: 10px; }
.ck-copy--wide { padding: 0 14px; color: var(--ink); border-color: var(--line-strong); }
.ck-access .ck-qr { margin-top: 16px; }

/* ---------------- где управлять подпиской ---------------- */

.ck-where { display: grid; gap: 8px; }
.ck-where__item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 14px; text-decoration: none; color: var(--ink);
  background: var(--surface-sunk); border: 1px solid var(--line); border-radius: var(--ck-inner);
  transition: border-color 150ms ease, transform 150ms var(--ck-ease);
}
.ck-where__item:hover { border-color: var(--accent); color: var(--ink); }
.ck-where__item:active { transform: scale(.99); }
.ck-where__item > .ck-i { color: var(--muted); }
.ck-where__item:hover > .ck-i { color: var(--accent); }
.ck-where__glyph {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.ck-where__text b { display: block; font-family: var(--font-ui); font-size: 15px; font-weight: 600; }
.ck-where__text span { display: block; font-family: var(--font-ui); font-size: 13px; line-height: 1.4; color: var(--muted); margin-top: 2px; }

/* ---------------- форма на странице ---------------- */

.ck-pass { position: relative; }
.ck-pass input { padding-right: 48px; }
.ck-pass__eye {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer;
  background: none; border: 0; color: var(--muted); border-radius: 8px;
}
.ck-pass__eye:hover { color: var(--ink); }

.ck-remember {
  display: flex; gap: 9px; align-items: flex-start; margin: 2px 0 14px; max-width: none;
  font-family: var(--font-ui); font-size: 13px; line-height: 1.45; color: var(--ink-soft);
  background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
  border-radius: var(--radius); padding: 9px 11px;
}
.ck-remember .ck-i { color: var(--warn); margin-top: 1px; }
.ck-remember b { color: var(--ink); }

.field input[aria-invalid="true"] { border-color: var(--danger, #E5484D); box-shadow: 0 0 0 3px var(--danger-bg, rgba(229, 72, 77, .13)); }

/* ---------------- плашка «вернуться к заказу» ---------------- */

.ck-pill {
  position: fixed; z-index: 90; right: 20px; bottom: 20px;
  display: flex; align-items: center; gap: 2px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 100px;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .55); padding: 4px;
  animation: ck-rise 320ms var(--ck-ease);
}
.ck-pill[hidden] { display: none; }
@keyframes ck-rise { from { transform: translateY(16px); opacity: 0; } }
.ck-pill__open {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  background: none; border: 0; padding: 9px 12px 9px 14px; border-radius: 100px;
  font-family: var(--font-ui); font-size: 14.5px; font-weight: 600; color: var(--ink);
}
.ck-pill__open:hover { background: var(--surface-sunk); }
.ck-pill__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warn); flex: none; animation: ck-blink 1.6s ease-in-out infinite; }
.ck-pill.is-paid .ck-pill__dot { background: var(--accent); animation: none; }
.ck-pill.is-soon .ck-pill__dot { background: var(--warn); animation: none; }
.ck-pill.is-over .ck-pill__dot { background: var(--danger, #E5484D); animation: none; }
.ck-pill__x {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: none; border: 0; color: var(--muted);
}
.ck-pill__x:hover { color: var(--ink); background: var(--surface-sunk); }

/* ---------------- страница «Мой ключ» ---------------- */

.kp-page { max-width: 620px; margin: 0 auto; padding: 34px 0 70px; }
.kp { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--ck-radius); padding: 26px; }
.kp-pad { padding: 40px 0; }
.kp-form .field { margin-bottom: 12px; text-align: left; }
.kp-form .btn { width: 100%; margin-top: 6px; }
.kp .ck-links { margin-top: 18px; }

/* срок подписки на странице «Мой ключ» */
.kp-sub {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  margin: -4px 0 22px; padding: 12px 12px 12px 14px; text-align: left;
  background: var(--surface-sunk); border: 1px solid var(--line); border-radius: var(--ck-inner);
}
.kp-sub[hidden] { display: none; }
.kp-sub__icon {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.kp-sub__text > b { display: block; font-family: var(--font-ui); font-size: 15px; font-weight: 600; color: var(--ink); }
.kp-sub__text > span { display: block; margin-top: 3px; font-family: var(--font-ui); font-size: 13px; line-height: 1.4; color: var(--muted); }
.kp-sub__text > .kp-sub__date { margin-top: 4px; }
.kp .kp-sub__btn { margin: 0; width: auto; min-height: 42px; padding: 9px 16px; font-size: 14.5px; white-space: nowrap; }
.kp-sub.is-ending, .kp-sub.is-expired { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 38%, transparent); }
.kp-sub.is-ending .kp-sub__icon, .kp-sub.is-expired .kp-sub__icon { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.kp .ck-access + .ck-links { margin-top: 10px; }

/* ---------------- ссылка «Мой ключ» в шапке ---------------- */

.mykey {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  font-family: var(--font-ui); font-size: 14px; font-weight: 500; color: var(--ink-soft);
  text-decoration: none; padding: 8px 10px; border-radius: var(--radius);
}
.mykey:hover { color: var(--accent); background: var(--surface-sunk); }
.mykey[aria-current="page"] { color: var(--accent); }
.masthead .mykey { margin-left: auto; }
.masthead .mast-nav ~ .mykey, .masthead .search-open ~ .mykey, .masthead .mykey ~ .btn { margin-left: 0; }

/* ---------------- телефон: окно — лист снизу ---------------- */

@media (max-width: 640px) {
  .ck { place-items: end stretch; padding: 0; }
  .ck__sheet {
    width: 100%; max-height: 94dvh; border-radius: 22px 22px 0 0; border-bottom: 0;
    transform: translateY(100%); opacity: 1;
    transition: transform 360ms var(--ck-drawer);
  }
  .ck.is-open .ck__sheet { transform: none; }
  .ck__grip { display: block; width: 38px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 8px auto 0; }
  .ck__head { padding: 10px 12px 0 18px; }
  .ck__body { padding: 18px 18px calc(22px + env(safe-area-inset-bottom)); }
  .ck__title { font-size: 22px; }
  .ck-ticket__value { font-size: 18.5px; }
  .ck-qr { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .ck-success { gap: 12px; }
  .ck-access .getapp__stores { flex: 1 0 100%; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-top: 2px; }
  .ck-access .getapp__stores .btn { margin: 0; }
  .ck-badge { width: 54px; height: 54px; }
  .ck-pill { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); justify-content: space-between; }
  .ck-pill__open { flex: 1; }
  .mykey span { display: none; }
  .mykey { width: 44px; height: 44px; justify-content: center; padding: 0; }
  .kp { padding: 20px 16px; }
  .kp-page { padding-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .ck__sheet, .ck__backdrop, .ck__body { transition: opacity 120ms ease; transform: none !important; }
  .ck__step.is-now i::after, .ck-ring__arc, .ck-spin, .ck-status i, .ck-pill__dot { animation-duration: 3s; }
  .ck-tick { animation: none; stroke-dashoffset: 0; }
  .ck__sheet[data-state="paid"] .ck-badge, .ck-pill { animation: none; }
}

/* Узкий телефон: в шапке остаются название, «Мой ключ» и покупка */
@media (max-width: 480px) {
  .masthead .theme-toggle, .masthead .search-open { display: none; }
  .masthead__in { gap: 8px; }
  .masthead .mykey { margin-left: auto; }
  .kp-sub { grid-template-columns: auto minmax(0, 1fr); }
  .kp .kp-sub__btn { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 380px) {
  .ck-ticket__places { grid-template-columns: 1fr; }
}
