/* Скиллы DeepMaha — второй раздел мини-аппа (20.10.26). */

.sk-tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: flex;
  gap: 4px;
  padding: 8px calc(12px + var(--safe-right, 0px)) calc(8px + var(--safe-bottom, 0px)) calc(12px + var(--safe-left, 0px));
  background: linear-gradient(180deg, rgba(10, 10, 15, .55), rgba(10, 10, 15, .96) 45%);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}

.sk-tab {
  flex: 1 1 0;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font: 600 13px/1 inherit;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background 160ms cubic-bezier(.22, 1, .36, 1), color 160ms cubic-bezier(.22, 1, .36, 1), border-color 160ms cubic-bezier(.22, 1, .36, 1);
}

.sk-tab.is-active {
  background: rgba(245, 197, 24, .14);
  border-color: rgba(245, 197, 24, .34);
  color: var(--gold-light);
}

.sk-panel {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(420px 260px at 88% -8%, rgba(245, 197, 24, .12), transparent 68%),
    linear-gradient(180deg, #0a0a0f, #0d0e15 42%, #0a0a0f);
}

.sk-panel[hidden] { display: none; }

.sk-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: calc(18px + var(--safe-top, 0px)) calc(16px + var(--safe-right, 0px)) 10px calc(16px + var(--safe-left, 0px));
}

.sk-title {
  margin: 0;
  font-size: 23px;
  line-height: 28px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.sk-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 17px;
}

.sk-balance {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid rgba(245, 197, 24, .34);
  border-radius: 12px;
  background: rgba(245, 197, 24, .12);
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.sk-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px calc(16px + var(--safe-right, 0px)) 96px calc(16px + var(--safe-left, 0px));
}

.sk-shelf {
  margin: 16px 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sk-shelf:first-child { margin-top: 4px; }

.sk-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 160ms cubic-bezier(.22, 1, .36, 1), border-color 160ms cubic-bezier(.22, 1, .36, 1), transform 160ms cubic-bezier(.22, 1, .36, 1);
}

.sk-card:active { transform: scale(.992); }
.sk-card.is-owned { border-color: rgba(57, 217, 138, .34); background: rgba(57, 217, 138, .07); }
.sk-card.is-soon { opacity: .72; }

.sk-card-main { flex: 1 1 auto; min-width: 0; }

.sk-card-title {
  font-size: 15px;
  line-height: 21px;
  font-weight: 650;
}

.sk-card-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.sk-price {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(245, 197, 24, .14);
  border: 1px solid rgba(245, 197, 24, .30);
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.sk-price.is-owned {
  background: rgba(57, 217, 138, .12);
  border-color: rgba(57, 217, 138, .34);
  color: var(--green);
}

.sk-price.is-soon {
  background: rgba(255, 255, 255, .05);
  border-color: var(--line);
  color: var(--muted-2);
  font-weight: 600;
}

/* Карточка скилла поверх всего */
.sk-detail {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(4, 4, 8, .72);
  backdrop-filter: blur(6px);
}

.sk-detail[hidden] { display: none; }

.sk-sheet {
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 20px calc(18px + var(--safe-right, 0px)) calc(18px + var(--safe-bottom, 0px)) calc(18px + var(--safe-left, 0px));
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(180deg, #15161d, #0e0f15);
  box-shadow: 0 -18px 60px rgba(0, 0, 0, .55);
}

.sk-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sk-sheet-title {
  margin: 0;
  font-size: 18px;
  line-height: 26px;
  font-weight: 750;
}

.sk-sheet-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.sk-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.sk-desc {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, .82);
  font-size: 13px;
  line-height: 21px;
}

.sk-bullets {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.sk-bullets li {
  position: relative;
  margin-bottom: 8px;
  padding-left: 18px;
  color: rgba(255, 255, 255, .78);
  font-size: 13px;
  line-height: 19px;
}

.sk-bullets li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  opacity: .8;
}

.sk-buy {
  width: 100%;
  min-height: 52px;
  margin-top: 20px;
  border: 1px solid rgba(255, 217, 85, .75);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 56%, var(--gold-deep));
  color: #1b1503;
  font: 750 15px/1 inherit;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(245, 197, 24, .24);
  transition: opacity 160ms cubic-bezier(.22, 1, .36, 1), transform 160ms cubic-bezier(.22, 1, .36, 1);
}

.sk-buy:active { transform: scale(.995); }
.sk-buy[disabled] { opacity: .6; box-shadow: none; cursor: default; }

.sk-buy.is-owned {
  border-color: rgba(57, 217, 138, .38);
  background: rgba(57, 217, 138, .12);
  color: var(--green);
  box-shadow: none;
}

.sk-hint {
  margin: 8px 0 0;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 16px;
  text-align: center;
}

/* Нижняя панель не должна закрывать контент основного раздела */
body.sk-enabled .page-shell {
  padding-bottom: calc(78px + var(--safe-bottom, 0px));
}

.sk-price.is-muted {
  color: #9aa0a6;
  border-color: rgba(154, 160, 166, 0.35);
}

/* ── Доступность: клавиатурный фокус (27.10.26) ── */
button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold, #f5c518);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 160ms !important;
    scroll-behavior: auto !important;
  }
}
