/* Сайт: расположение и масштаб как на aisubs.guru (одна колонка 640px, компактный hero, форма без рамки),
   поверх — новые детали: полоска заполнения ключа, карточка ключа, статус, плашка сервиса. */

:root { --col: 640px; }

/* ─── Шапка: лого слева, вкладки по центру (текст + линия), язык справа ─── */
.lang-btn { gap: 6px; height: 32px; font-size: 13px; }
.btn-xs { height: 26px; padding: 0 9px; font-size: 12px; border-radius: var(--r-xs); }

.page { max-width: calc(var(--col) + 2 * var(--sp-4)); margin: 0 auto; padding: var(--sp-12) var(--sp-4) var(--sp-12); outline: none; }

/* одна сцена при загрузке: иконка → заголовок → форма → история */
.is-booting .view:not([hidden]) > * { opacity: 0; transform: translateY(6px); }
.view > * { transition: opacity 460ms var(--ease-out), transform 460ms var(--ease-out); }
.view > :nth-child(2) { transition-delay: 60ms; }
.view > :nth-child(3) { transition-delay: 110ms; }
.view > :nth-child(4) { transition-delay: 160ms; }
.view.view-in { animation: view-in var(--t-slow) var(--ease-out); }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } }

/* ─── Заголовок раздела: компактный, как в оригинале ─────── */
.hero { margin-bottom: var(--sp-10); }
.hero-icon {
  width: 32px; height: 32px; display: grid; place-items: center; margin-bottom: var(--sp-4);
  border-radius: var(--r-sm); background: var(--surface-1); border: 1px solid var(--border); color: var(--text-2);
  box-shadow: var(--inset-hairline);
}
.hero-title { font-size: 24px; line-height: 1.2; letter-spacing: -0.02em; }
.hero-sub { margin-top: var(--sp-2); font-size: 14px; color: var(--text-2); }

/* форма — без рамки и фона, прямо на странице */
.form-card { background: none; border: 0; box-shadow: none; padding: 0; border-radius: 0; }

/* поля сайта — на surface-1, как в оригинале */
.page .input, .page .textarea { background: var(--surface-1); padding: 11px 12px; height: auto; }
.page .input.mono, .page .textarea.mono { font-size: 13px; }

/* ─── Поле ключа с кнопкой внутри ────────────────────────── */
.key-field {
  position: relative; display: flex; align-items: center;
  border-radius: var(--r-md); background: var(--surface-1); border: 1px solid var(--border);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background-color var(--t-med);
}
/* полоска заполнения: сколько символов ключа уже введено */
.key-field::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 1px; border-radius: 1px;
  background: var(--accent-hover); transform-origin: left; transform: scaleX(var(--fill, 0));
  transition: transform var(--t-med) var(--ease-out), opacity var(--t-med);
}
.key-field:focus-within::after, .key-field.is-locked::after, .key-field.is-invalid::after { opacity: 0; }
.key-field:hover { border-color: var(--border-strong); }
.key-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.key-field.is-invalid { border-color: var(--err); box-shadow: 0 0 0 3px var(--err-soft); }
.key-field.is-locked { background: var(--surface-2); }
.key-field.is-found { animation: found 900ms var(--ease-out); }
@keyframes found { 0% { box-shadow: 0 0 0 0 rgba(62, 207, 122, .35); } 100% { box-shadow: 0 0 0 8px rgba(62, 207, 122, 0); } }
.key-input {
  flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 0; outline: none; background: none;
  font-size: 13px; text-transform: uppercase; color: var(--text-1); font-variant-numeric: tabular-nums;
}
.key-input::placeholder { color: var(--text-3); text-transform: none; }
.key-field .btn { flex: none; height: 32px; min-width: 84px; margin-right: 6px; padding: 0 12px; border-radius: var(--r-sm); font-size: 13px; }
.key-field .btn-ghost { background: var(--surface-3); }
.key-field .btn.is-loading .spin { display: block; }
.key-form .label { margin-bottom: var(--sp-2); }
.key-form .hint { margin-top: var(--sp-2); font-size: 12px; }
.key-field.is-locked + .hint { display: none; }

/* ─── Карточка ключа ─────────────────────────────────────── */
.key-card {
  margin-top: var(--sp-4); padding: 0 var(--sp-4); border-radius: var(--r-lg);
  background: var(--surface-1); border: 1px solid var(--border); box-shadow: var(--inset-hairline);
  animation: card-in 340ms var(--ease-out) both;
}
@keyframes card-in { from { opacity: 0; transform: translateY(4px); } }
.kc-head { display: flex; align-items: center; gap: var(--sp-3); min-height: 56px; padding: 12px 0; }
.key-card.is-loading .kc-head > * { visibility: hidden; }
.key-card.is-loading .kc-head { position: relative; }
.key-card.is-loading .kc-head::before, .key-card.is-loading .kc-head::after {
  content: ""; position: absolute; border-radius: 4px;
  background: linear-gradient(90deg, #1c1c20, #26262b, #1c1c20); background-size: 200% 100%; animation: shimmer 1.2s linear infinite;
}
.key-card.is-loading .kc-head::before { left: 0; top: 14px; width: 28px; height: 28px; border-radius: 8px; }
.key-card.is-loading .kc-head::after { left: 40px; top: 22px; width: 38%; height: 12px; }
.plogo { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; flex: none; background: #000; }
.plogo-md { width: 28px; height: 28px; border-radius: 8px; }
.plogo-lg { width: 36px; height: 36px; border-radius: 10px; }
.kc-name { flex: 1; min-width: 0; }
.kc-app { font-size: 14px; font-weight: 600; }
.kc-plan { font-size: 12.5px; color: var(--text-2); }
.kc-plan b { font-weight: 500; color: var(--ok); }
#kr-status .chip { height: 24px; font-size: 12px; animation: pop 380ms var(--ease-out) 140ms both; }
@keyframes pop { from { opacity: 0; transform: scale(.92); } }
.kc-rows { margin: 0; border-top: 1px solid var(--border); font-size: 13px; }
.kc-rows div { display: flex; justify-content: space-between; gap: var(--sp-4); padding: 10px 0; }
.kc-rows div + div { border-top: 1px solid var(--border); }
.kc-rows dt { color: var(--text-2); }
.kc-rows dd { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc-used-note { padding: 10px 0 12px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-3); }

.svc-banner { display: flex; align-items: center; gap: 10px; margin-top: var(--sp-3); padding: 0 2px; font-size: 12.5px; color: var(--text-2); animation: card-in 340ms var(--ease-out) 120ms both; }

/* ─── Аккаунт: раскрывается после проверки ───────────────── */
.reveal { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-slow) var(--ease-out); }
.reveal > .reveal-in { overflow: hidden; min-height: 0; opacity: 0; margin: -4px; padding: 4px; transition: opacity var(--t-med) var(--ease); }
.reveal.is-open { grid-template-rows: 1fr; }
.reveal.is-open > .reveal-in { opacity: 1; transition-delay: 80ms; }
.acc { padding-top: var(--sp-5); }
.acc-pane { display: grid; }
.acc-pane .textarea { min-height: 88px; }
.acc-pane .hint { font-size: 12px; }
.note { display: flex; gap: var(--sp-3); padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-1); border: 1px solid var(--border); font-size: 13px; }
.note > .ic { margin-top: 2px; color: var(--text-2); }
.note-warn { margin-top: 4px; color: var(--warn); font-size: 12.5px; }
.run-btn { margin-top: var(--sp-5); }
.btn-lg { height: 44px; font-size: 14px; }

/* ─── Статус активации ───────────────────────────────────── */
.status { margin-top: var(--sp-4); display: grid; gap: var(--sp-3); padding: var(--sp-4); border-radius: var(--r-lg); background: var(--surface-1); border: 1px solid var(--border); box-shadow: var(--inset-hairline); animation: card-in var(--t-slow) var(--ease-out) both; transition: border-color var(--t-slow); }
.status[data-state="ok"] { border-color: rgba(62, 207, 122, .3); }
.status[data-state="err"] { border-color: rgba(240, 84, 90, .3); }
.status-top { display: flex; align-items: flex-start; gap: var(--sp-3); }
.status-ic { position: relative; width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-hover); transition: background-color var(--t-med), color var(--t-med); }
.status-ic svg { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.status-ic .s-ok { translate: -50% -47%; }
.s-spin { animation: rot .9s linear infinite; }
.s-ok path, .s-err path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.status .s-ok, .status .s-err { display: none; }
.status[data-state="ok"] .status-ic { background: var(--ok-soft); color: var(--ok); animation: pop 380ms var(--ease-out); }
.status[data-state="err"] .status-ic { background: var(--err-soft); color: var(--err); }
.status[data-state="ok"] .s-spin, .status[data-state="err"] .s-spin, .status[data-state="pair"] .s-spin { display: none; }
@keyframes breathe { 50% { transform: scale(.6); opacity: .5; } }
.status[data-state="ok"] .s-ok, .status[data-state="err"] .s-err { display: block; }
.status[data-state="ok"] .s-ok path, .status[data-state="err"] .s-err path { animation: draw 420ms var(--ease-out) 120ms forwards; }
.status[data-state="err"] .s-err path:last-child { animation-delay: 240ms; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.status-text { flex: 1; min-width: 0; padding-top: 3px; }
.status-title { font-size: 14px; font-weight: 600; }
.status-sub { margin-top: 2px; font-size: 13px; color: var(--text-2); }
.status-time { font-size: 12px; color: var(--text-3); padding-top: 5px; font-family: var(--font-mono); }
.bar { position: relative; height: 2px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.bar span { position: absolute; inset: 0 auto 0 0; width: 35%; background: var(--accent); border-radius: inherit; }
.bar.is-indet span { animation: indet 1.5s var(--ease) infinite; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
.status[data-state="ok"] .bar, .status[data-state="err"] .bar { display: none; }
.pair { display: grid; gap: var(--sp-3); }
.pair-actions, .status-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.status .btn { height: 34px; font-size: 13px; }

/* ─── Ваши активации: одна карточка, записи через hairline ─ */
.history { margin-top: var(--sp-8); }
.history-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--sp-3); }
.history-title { font-size: 15px; letter-spacing: -0.01em; }
.history-head .btn-xs { border: 0; height: auto; padding: 4px 0; color: var(--text-3); font-size: 13px; }
.history-head .btn-xs:hover { color: var(--text-1); }
.hist { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--inset-hairline); overflow: hidden; }
.hist-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3); padding: 12px var(--sp-4); }
.hist-item + .hist-item { border-top: 1px solid var(--border); }
.hist-item[data-s="run"] { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.hist-item.is-new { animation: hist-in 420ms var(--ease-out); }
@keyframes hist-in { from { opacity: 0; transform: translateY(-4px); } }
.hist-item .plogo { width: 28px; height: 28px; border-radius: 50%; }
.hist-main { min-width: 0; }
.hist-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-key { font-size: 12px; color: var(--text-3); }
.hist-right { display: grid; justify-items: end; gap: 3px; }
.hist-st { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; border-radius: 999px; font-size: 12px; line-height: 20px; color: var(--text-2); background: var(--surface-2); }
.hist-st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.hist-st.ok { color: var(--ok); background: var(--ok-soft); }
.hist-st.err { color: var(--err); background: var(--err-soft); }
.hist-st.muted { color: var(--accent-hover); background: var(--accent-soft); }
.hist-st.muted::before { animation: breathe 1.4s ease-in-out infinite; }
.hist-date { color: var(--text-3); font-size: 12px; }
.side-note { margin-top: var(--sp-3); font-size: 12px; color: var(--text-3); }

/* ─── Проверка ───────────────────────────────────────────── */
#chk-form .label { margin-bottom: var(--sp-2); }
.keys-area { min-height: 180px; line-height: 1.7; }
.chk-foot { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-2); }
.chk-count { margin: 0 auto 0 0; font-size: 12px; }
.chk-count.is-over { color: var(--err); }
.chk-foot .btn-line { height: 28px; font-size: 12.5px; padding: 0 10px; }
#chk-btn { margin-top: var(--sp-4); }
#chk-btn.is-loading .spin { display: block; }
.chk-res { margin-top: var(--sp-6); background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--inset-hairline); }
.sum { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--border); }
.sum .tile { display: grid; gap: 2px; padding: 12px var(--sp-4); background: none; border-radius: 0; }
.sum .tile + .tile { border-left: 1px solid var(--border); }
.sum-n { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.sum-l { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.res { max-height: 520px; overflow-y: auto; }
.res li {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: var(--sp-4); align-items: center;
  padding: 10px var(--sp-4); font-size: 13px;
}
.res li + li { border-top: 1px solid var(--border); }
.res li::before { content: ""; position: absolute; left: 0; top: 11px; bottom: 11px; width: 2px; border-radius: 0 2px 2px 0; }
.res li[data-s="free"]::before { background: var(--ok); }
.res li[data-s="used"]::before { background: var(--warn); }
.res li[data-s="error"]::before { background: var(--text-3); }
.res li.is-new { animation: card-in 300ms var(--ease-out) both; }
.res-key { font-family: var(--font-mono); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-prod { color: var(--text-2); display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; }
.res-prod .plogo { width: 18px; height: 18px; border-radius: 5px; }
.res-st { font-size: 12.5px; font-weight: 500; text-align: right; }

/* ─── Инструкции ─────────────────────────────────────────── */
.gd-tabs { margin-bottom: var(--sp-5); }
.gd-panel { outline: none; }
.gd-panel.swap { animation: view-in var(--t-med) var(--ease-out); }
.gd-lead { font-size: 14px; color: var(--text-2); margin-bottom: var(--sp-4); }
.gd-steps { display: grid; counter-reset: g; background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--inset-hairline); }
.gd-steps li { counter-increment: g; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--sp-3); padding: 14px var(--sp-4); }
.gd-steps li + li { border-top: 1px solid var(--border); }
.gd-steps li::before { content: counter(g); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 600; background: var(--surface-3); }
.gd-steps b { font-weight: 600; display: block; margin-bottom: 2px; font-size: 14px; }
.gd-steps p { color: var(--text-2); font-size: 13px; }
.code {
  margin-top: var(--sp-2); display: flex; align-items: center; gap: var(--sp-2);
  padding: 4px 4px 4px 10px; border-radius: var(--r-sm); background: var(--bg); border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 12px; color: var(--text-1);
}
.code span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code button { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: var(--r-xs); color: var(--text-3); transition: color var(--t-fast), background-color var(--t-fast); }
.code button:hover { color: var(--text-1); background: var(--surface-3); }
.code button.is-done { color: var(--ok); }
.gd-note { margin-top: var(--sp-3); display: flex; gap: var(--sp-2); font-size: 12.5px; color: var(--text-2); padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--border); }
.gd-note .ic { margin-top: 1px; color: var(--warn); width: 14px; height: 14px; }
.gd-cta { margin-top: var(--sp-5); }

/* ─── Подтверждение ──────────────────────────────────────── */
.cf-rows { margin: 0; display: grid; gap: 10px; font-size: 13.5px; }
.cf-rows div { display: flex; justify-content: space-between; gap: var(--sp-4); }
.cf-rows dt { color: var(--text-2); }
.cf-rows dd { margin: 0; font-weight: 500; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-rows dd.mono { font-weight: 400; font-size: 12.5px; }

/* ─── Телефон: как в оригинале — вкладки вторым рядом ───── */
@media (max-width: 640px) {
  .page { padding: var(--sp-8) var(--sp-4) var(--sp-12); }
  .hero { margin-bottom: var(--sp-8); }
  .sum { grid-template-columns: 1fr 1fr; }
  .sum .tile:nth-child(3) { border-left: 0; }
  .sum .tile:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .res { max-height: none; }
  .res li { grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--sp-3); }
  .res-prod { grid-column: 1; grid-row: 2; font-size: 12.5px; }
  .res-st { grid-row: 1 / 3; grid-column: 2; }
  .chk-foot { flex-wrap: wrap; }
}
@media (max-width: 380px) {
  .lang-btn #lang-cur { display: none; }
  .key-field .btn { min-width: 0; }
}

/* ─── Итог активации ─────────────────────────────────────── */
.status { position: relative; overflow: hidden; isolation: isolate; }
/* мягкая вспышка цвета итога — один раз, потом едва заметный след */
.status::before {
  content: ""; position: absolute; z-index: -1; left: -60px; top: -80px; width: 260px; height: 220px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(62, 207, 122, .16), transparent); opacity: 0; pointer-events: none;
}
.status[data-state="ok"]::before { animation: glow 1400ms var(--ease-out) forwards; }
.status[data-state="err"]::before { background: radial-gradient(closest-side, rgba(240, 84, 90, .12), transparent); animation: glow 1400ms var(--ease-out) forwards; }
@keyframes glow { 0% { opacity: 0; transform: scale(.6); } 35% { opacity: 1; } 100% { opacity: .45; transform: scale(1); } }
.status-ic { width: 32px; height: 32px; }
.s-ring { position: absolute; left: 0 !important; top: 0 !important; translate: none !important; width: 32px !important; height: 32px !important; transform: rotate(-90deg); display: none; }
/* штрих чуть длиннее окружности — кольцо смыкается без щели на стыке */
.s-ring circle { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-dasharray: 1.05; stroke-dashoffset: 1.05; }
.status[data-state="ok"] .s-ring, .status[data-state="err"] .s-ring { display: block; }
.status[data-state="ok"] .s-ring circle, .status[data-state="err"] .s-ring circle { animation: draw 520ms var(--ease-out) forwards; }
.status[data-state="ok"] .s-ok path { animation-delay: 380ms; }
.status[data-state="err"] .s-err path { animation-delay: 380ms; }
.status[data-state="err"] .s-err path:last-child { animation-delay: 480ms; }
.status[data-state="ok"] .status-ic, .status[data-state="err"] .status-ic { background: none; }
.status[data-state="ok"] .status-time, .status[data-state="err"] .status-time { display: none; }
/* «на проверке»: итог ещё придёт — спокойный жёлтый, часы вместо крестика */
.s-wait path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.status-ic .s-wait { width: 20px; height: 20px; stroke-width: 2; }
.status .s-wait { display: none; }
.status[data-state="review"] { border-color: rgba(227, 165, 60, .3); }
.status[data-state="review"]::before { background: radial-gradient(closest-side, rgba(227, 165, 60, .12), transparent); animation: glow 1400ms var(--ease-out) forwards; }
.status[data-state="review"] .status-ic { background: none; color: var(--warn); }
.status[data-state="review"] .s-spin, .status[data-state="review"] .bar, .status[data-state="review"] .status-time { display: none; }
.status[data-state="review"] .s-ring, .status[data-state="review"] .s-wait { display: block; }
.status[data-state="review"] .s-ring circle { animation: draw 520ms var(--ease-out) forwards; }
.status[data-state="review"] .s-wait path { animation: draw 420ms var(--ease-out) 380ms forwards; }

.receipt { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border-radius: var(--r-md); overflow: hidden; background: var(--border); }
.receipt div { display: grid; gap: 2px; padding: 10px 12px; background: var(--surface-2); min-width: 0; animation: card-in 320ms var(--ease-out) both; }
.receipt div:nth-child(2) { animation-delay: 50ms; } .receipt div:nth-child(3) { animation-delay: 100ms; } .receipt div:nth-child(4) { animation-delay: 150ms; }
.receipt dt { font-size: 12px; color: var(--text-3); }
.receipt dd { margin: 0; font-size: 13.5px; font-weight: 500; display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.receipt dd.mono { font-weight: 400; font-size: 12.5px; display: block; }
.receipt .plogo { width: 18px; height: 18px; border-radius: 5px; }

.status-actions { animation: card-in 320ms var(--ease-out) 180ms both; }
.status-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
@media (max-width: 480px) { .status-actions { grid-auto-flow: row; } }  /* две кнопки не влезали в ширину телефона */
.status-actions .btn { height: 40px; font-size: 14px; }
.status .btn-ghost { background: var(--surface-2); }
.status .btn-ghost:hover:not(:disabled) { background: #202024; }
.plogo-xs { width: 16px; height: 16px; border-radius: 4px; }

/* ─── Подтверждение: «билет» ─────────────────────────────── */
.confirm { width: min(420px, calc(100vw - 32px)); padding: var(--sp-5); }
.cf-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-4); }
.cf-top .modal-title { font-size: 16px; }
.cf-top .modal-x { margin: 0 -6px 0 0; }
.ticket { position: relative; border-radius: var(--r-lg); background: var(--surface-2); box-shadow: var(--inset-hairline); }
.ticket-head { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); }
.ticket-head .plogo-lg { width: 40px; height: 40px; border-radius: 11px; }
.ticket-app { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.ticket-plan { font-size: 13px; color: var(--text-2); }
.ticket-plan b { font-weight: 500; color: var(--ok); }
/* перфорация с вырезами по краям */
.ticket-cut { position: relative; height: 0; margin: 0 var(--sp-4); border-top: 1px dashed var(--border-strong); }
.ticket-cut::before, .ticket-cut::after {
  content: ""; position: absolute; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface-1);
}
.ticket-cut::before { left: calc(-1 * var(--sp-4) - 9px); }
.ticket-cut::after { right: calc(-1 * var(--sp-4) - 9px); }
.ticket-rows { margin: 0; padding: 14px var(--sp-4) var(--sp-4); display: grid; gap: 10px; font-size: 13px; }
.ticket-rows div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-4); }
.confirm[open] .ticket-rows div { animation: card-in 300ms var(--ease-out) both; }
.confirm[open] .ticket-rows div:nth-child(2) { animation-delay: 50ms; }
.confirm[open] .ticket-rows div:nth-child(3) { animation-delay: 100ms; }
.ticket-rows dt { color: var(--text-2); flex: none; }
.ticket-rows dd { margin: 0; min-width: 0; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-rows dd.mono { font-size: 12.5px; }
.ticket-rows dd.acc-mark { color: var(--warn); }
.cf-warn { display: flex; align-items: center; gap: 8px; margin: var(--sp-3) 2px 0; font-size: 12.5px; color: var(--text-3); }
.cf-warn .ic { color: var(--text-3); }
.cf-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); margin-top: var(--sp-5); }
.cf-actions .btn { height: 40px; }




/* подпись под заголовком статуса и подсказка поля ключа показываются, только когда есть текст */
.status-sub:empty, #cdk-hint:empty { display: none; }
.status-text { align-self: center; padding-top: 0; }

.icon-btn { width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--text-3); transition: color var(--t-fast), background-color var(--t-fast); }
.icon-btn:hover { color: var(--err); background: var(--err-soft); }
.icon-btn .ic { width: 16px; height: 16px; }
.history-head { align-items: center; }
.history-head .icon-btn { margin-right: -6px; }

.keys-area { resize: none; }
/* фиксированные колонки — логотипы и статусы стоят в линию */
.res li { grid-template-columns: minmax(0, 1fr) 190px 108px; }
.res-prod { justify-content: flex-start; }
@media (max-width: 640px) { .res li { grid-template-columns: minmax(0, 1fr) auto; } }

/* проверенный ключ: зелёная галочка внутри поля вместо кнопки */
.key-ok { display: none; flex: none; width: 24px; height: 24px; margin-right: 12px; border-radius: 50%; place-items: center; background: var(--ok-soft); color: var(--ok); }
.key-ok .ic { width: 13px; height: 13px; stroke-width: 2.6; }
.key-field.is-verified .key-ok { display: grid; animation: pop 320ms var(--ease-out); }
.key-field.is-running { background: var(--surface-2); }
.key-field.is-running .key-input { color: var(--text-2); }

/* плитки сводки копируют свою группу ключей */
.sum-tile { position: relative; text-align: left; cursor: pointer; transition: background-color var(--t-fast); }
.sum-tile:hover:not(:disabled) { background: var(--surface-2); }
.sum-tile:active:not(:disabled) { background: #1d1d21; }
.sum-tile:disabled { cursor: default; }
.sum-tile:disabled .sum-n { color: var(--text-3); }
.sum-copy { position: absolute; top: 12px; right: 12px; color: var(--text-3); opacity: 0; transform: scale(.9); transition: opacity var(--t-fast), transform var(--t-fast), color var(--t-fast); }
.sum-copy .ic { width: 14px; height: 14px; }
.sum-tile:hover:not(:disabled) .sum-copy, .sum-tile:focus-visible .sum-copy, .sum-tile.is-done .sum-copy { opacity: 1; transform: none; }
.sum-tile.is-done .sum-copy { color: var(--ok); }
.sum-tile:focus-visible { outline-offset: -2px; border-radius: 0; }
@media (hover: none) { .sum-copy { opacity: .7; transform: none; } }

.label-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-2); }
.label-row .label { margin-bottom: 0; }
.key-field.is-verified::after { opacity: 0; }

/* ─── Переключатель языка ────────────────────────────────── */
.lang-btn { gap: 8px; padding: 0 10px 0 6px; }
.lang-code {
  min-width: 24px; height: 20px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 5px;
  background: var(--surface-3); color: var(--text-2); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .02em;
  transition: background-color var(--t-fast), color var(--t-fast);
}
.lang-code-cjk { font-family: var(--font-ui); font-size: 11.5px; }
.lang-btn .lang-code { background: var(--accent-soft); color: var(--accent-hover); }
.lang-chev { color: var(--text-3); transition: transform var(--t-med) var(--ease-out); }
.lang-btn[aria-expanded="true"] .lang-chev { transform: rotate(180deg); }
.lang-btn[aria-expanded="true"] { color: var(--text-1); border-color: var(--border-strong); }

.lang-menu { min-width: 212px; padding: 5px; transform-origin: top right; }
.lang-menu button { height: 38px; gap: 10px; padding: 0 10px 0 8px; font-size: 13.5px; }
.lang-menu .lang-name { flex: 1; }
.lang-menu button[aria-selected="true"] { background: var(--accent-soft); color: var(--text-1); }
.lang-menu button[aria-selected="true"] .lang-code { background: var(--accent); color: #fff; }
.lang-menu button:hover .lang-code, .lang-menu button:focus-visible .lang-code { color: var(--text-1); }
.lang-menu button .ic { margin-left: 0; }
/* пункты появляются коротким каскадом вслед за меню */
.lang-menu:not([hidden]) button { animation: lang-item 200ms var(--ease-out) both; }
.lang-menu:not([hidden]) button:nth-child(2) { animation-delay: 25ms; }
.lang-menu:not([hidden]) button:nth-child(3) { animation-delay: 50ms; }
.lang-menu:not([hidden]) button:nth-child(4) { animation-delay: 75ms; }
@keyframes lang-item { from { opacity: 0; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .lang-menu:not([hidden]) button { animation: none; } }

.flag { width: 20px; height: 14px; flex: none; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14); overflow: hidden; }
.lang-btn { padding: 0 10px; }
.lang-menu .flag { width: 22px; height: 15px; }
.lang-menu button:not([aria-selected="true"]) .flag { opacity: .85; transition: opacity var(--t-fast); }
.lang-menu button:hover .flag { opacity: 1; }

.ticket-rows dd.cf-country { display: inline-flex; align-items: center; gap: 8px; overflow: visible; padding-left: 2px; }

/* ─── Spotify: вход по ссылке ────────────────────────────── */
.s-logo { display: none; position: absolute; inset: 0; width: 32px !important; height: 32px !important; translate: none !important; left: 0 !important; top: 0 !important; border-radius: 50%; }
.status[data-state="pair"] .s-logo { display: block; }
.status[data-state="pair"] .status-ic { background: none; }
.status[data-state="pair"] .status-time { color: var(--text-1); font-size: 13px; padding-top: 6px; }
.bar.is-countdown span { width: 100%; background: #1ED760; transform-origin: left; transition: transform 1s linear; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-2); }
.pair .btn { height: 40px; font-size: 14px; }
.pair #pair-go .ic { opacity: .8; }
.pair-copy { width: 40px; height: 40px; color: var(--text-2); }
.pair-copy:hover { color: var(--text-1); }
.pair-copy.is-done { color: var(--ok); }

/* ─── Fortnite: вход в Epic Games, код из письма / родительский PIN ─── */
.status[data-state="code"] .s-logo { display: block; }
.status[data-state="code"] .s-spin { display: none; }
.status[data-state="code"] .status-ic { background: none; }
.status[data-state="code"] .status-time { color: var(--text-1); font-size: 13px; padding-top: 6px; }
.status[data-product="fortnite"] .bar.is-countdown span { background: var(--accent); }
.fn-code { display: grid; gap: var(--sp-2); }
.fn-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-2); }
.fn-code-input { font-size: 18px; letter-spacing: .32em; text-align: center; font-variant-numeric: tabular-nums; }
.fn-code-input::placeholder { letter-spacing: .32em; }
.fn-code .btn { position: relative; height: 40px; font-size: 14px; padding: 0 18px; }
.hist-code { grid-column: 2 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-2); }
.hist-code-input { height: 32px; letter-spacing: .28em; text-align: center; }

/* ─── Перенос на настоящий сайт (15.11.2026): то, чего не было в макете ─── */
/* история: подробность (срок, аккаунт, причина отказа) и вход в Spotify — второй строкой */
.hist-st.warn { color: var(--warn); background: var(--warn-soft); }
.hist-msg { grid-column: 2 / -1; margin-top: -6px; font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
.hist-pair { grid-column: 2 / -1; display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.hist-pair-left { font-size: 12px; color: var(--text-3); }
.hist-pair-left[data-low], .status-time[data-low] { color: var(--warn) !important; }
/* массовая проверка: у активированного ключа — аккаунт и дата под ключом; ошибка — текстом сервера */
.res-key { display: grid; gap: 1px; min-width: 0; }
.res-code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-sub { font-family: var(--font-ui); font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-st { white-space: normal; line-height: 1.35; }
/* итог: нечётная последняя клетка — во всю ширину (у Claude/ChatGPT нет «Действует до») */
.receipt div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.gd-panel:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 4px; border-radius: var(--r-lg); }
