

/* Client switcher uses the same elevated black/yellow button language. */
.client-tabs {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 8px 9px 14px;
  border: 3px solid #000;
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.44);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.08);
}
body:not(.is-telegram-miniapp) .client-tabs {
  display: none !important;
}
.client-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 56px;
  padding: 12px 9px;
  border: 3px solid #000;
  border-radius: 18px;
  appearance: none;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(180deg, #353535, #252525);
  box-shadow: 0 6px 0 #000, 0 12px 18px rgba(0, 0, 0, 0.36), inset 0 2px 0 rgba(255, 255, 255, 0.1);
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.1;
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.client-tab-icon {
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  object-fit: cover;
  border-radius: 6px;
  outline: 1px solid rgba(255, 255, 255, 0.22);
  pointer-events: none;
}
.client-tab > span {
  white-space: nowrap;
}
.client-tab.is-active {
  color: #000;
  background: linear-gradient(180deg, #ffd54a, var(--yellow-deep));
  box-shadow: 0 6px 0 #000, 0 12px 18px rgba(0, 0, 0, 0.36), inset 0 2px 0 rgba(255, 255, 255, 0.88);
}
.client-tab:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 #000, 0 8px 12px rgba(0, 0, 0, 0.35);
}
.client-tab:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

.client-panel {
  display: none;
  min-width: 0;
}
body.is-telegram-miniapp .client-panel.is-active:not([hidden]) {
  display: grid;
  gap: 12px;
}

.connection-panel {
  max-width: 560px;
  margin: 0 auto;
  padding: 18px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.connection-panel::before {
  display: none;
}

.step {
  width: 100%;
  max-width: 100%;
  padding: 18px 16px 16px;
  border-radius: 24px;
}

.step-miniapp-only {
  display: none;
}

body.is-telegram-miniapp .step-miniapp-only {
  display: block;
}

body.is-telegram-miniapp .step-browser-only {
  display: none;
}

.step-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

/* Native details handles tap/keyboard; hover reveals the same text on desktop. */
.happ-install-help {
  position: relative;
  z-index: 4;
  margin-left: auto;
  flex: 0 0 auto;
}
.happ-install-help summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 2px solid #000;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffd54a, var(--yellow-deep));
  color: #000;
  box-shadow: 0 4px 0 #000;
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  list-style: none;
}
.happ-install-help summary::-webkit-details-marker {
  display: none;
}
.happ-install-help summary:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 4px;
}
.happ-install-tip {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(280px, calc(100vw - 58px));
  padding: 14px;
  border: 2px solid #000;
  border-radius: 15px;
  background: #fffdf4;
  color: #111;
  box-shadow: 0 7px 0 #000, 0 14px 28px rgba(0, 0, 0, 0.45);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-shadow: none;
}
.happ-install-help[open] .happ-install-tip {
  display: block;
}
@media (hover: hover) and (pointer: fine) {
  .happ-install-help:hover .happ-install-tip {
    display: block;
  }
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffd54a, var(--yellow));
  color: #000;
  border: 3px solid #000;
  font-family: "Rubik One", "Arial Black", sans-serif;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.72), 0 14px 20px rgba(0, 0, 0, 0.4);
}

.browser-only-inline {
  display: inline;
}

.miniapp-only-inline {
  display: none;
}

body.is-telegram-miniapp .browser-only-inline {
  display: none;
}

body.is-telegram-miniapp .miniapp-only-inline {
  display: inline;
}

.step h2 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(17px, 4.3vw, 22px);
  line-height: 1.02;
  color: #fff;
  text-shadow: 0 3px 0 #000;
  overflow-wrap: anywhere;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.44;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  max-width: 100%;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 18px;
  border: 3px solid #000;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  text-decoration: none;
  color: #111;
  background: linear-gradient(180deg, #fffef8, #ece8df);
  box-shadow:
    0 6px 0 rgba(0, 0, 0, 0.88),
    0 14px 22px rgba(0, 0, 0, 0.36),
    inset 0 2px 0 rgba(255, 255, 255, 0.88);
  font-size: 15px;
  line-height: 1.1;
  text-align: center;
  white-space: normal;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.button-icon::before {
  content: "";
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  background-color: currentColor;
  -webkit-mask: center / contain no-repeat var(--button-icon);
  mask: center / contain no-repeat var(--button-icon);
  transform: translateY(-1px);
}

.button-icon-apple {
  --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M17.6 12.7c0-2 1.7-3 1.8-3.1-.9-1.3-2.4-1.5-2.9-1.5-1.2-.1-2.3.7-3 .7-.7 0-1.6-.7-2.7-.7-1.4 0-2.6.8-3.3 2-.7 1.2-1 2.9-.2 4.7.4.9.9 1.8 1.5 2.6.7.8 1.3 1.6 2.3 1.6.9 0 1.2-.5 2.3-.5s1.4.5 2.3.5c1 0 1.6-.8 2.2-1.6.7-.8 1-1.7 1.4-2.5-.1 0-1.7-.7-1.7-3.2Zm-2-6c.5-.7.9-1.6.8-2.6-.8 0-1.8.6-2.4 1.2-.5.6-1 1.5-.8 2.4.9.1 1.8-.4 2.4-1Z'/%3E%3C/svg%3E");
}

.button-icon-googleplay {
  --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4.4 3.4c-.3.3-.4.8-.4 1.5v14.2c0 .7.2 1.2.5 1.5l8.3-8.3-8.4-8.9Zm9.6 7.9 2.7-1.6-9-5.2 6.3 6.8Zm3.8-.2 1.6 1c.4.2.6.6.6 1s-.2.8-.6 1l-1.9 1.1-2.7-2.8 3-1.3Zm-4.9 2.2-6.2 6.8 9.1-5.3-2.9-1.5Z'/%3E%3C/svg%3E");
}

.button-icon-download {
  --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M11 3h2v8.8l2.5-2.5 1.5 1.5-5 5-5-5 1.5-1.5 2.5 2.5V3Zm-5 14h12v2H6v-2Z'/%3E%3C/svg%3E");
}

.button-icon-folder {
  --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 7a2 2 0 0 1 2-2h5l1.8 2H19a2 2 0 0 1 2 2v7.2A1.8 1.8 0 0 1 19.2 18H4.8A1.8 1.8 0 0 1 3 16.2V7Z'/%3E%3C/svg%3E");
}

.button-icon-desktop {
  --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v7.5a2 2 0 0 1-2 2h-4.5V18H16v2H8v-2h2.5v-2.5H6a2 2 0 0 1-2-2V6Zm2 0v7.5h12V6H6Z'/%3E%3C/svg%3E");
}

.button-icon {
  gap: 12px;
}

.button:hover,
.button:focus-visible {
  outline: none;
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.button:active {
  transform: translateY(3px);
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.88),
    0 10px 14px rgba(0, 0, 0, 0.32),
    inset 0 2px 0 rgba(255, 255, 255, 0.7);
}

.button-primary {
  color: #000;
  background: linear-gradient(180deg, #ffd54a, var(--yellow-deep));
}

.button[disabled] {
  cursor: not-allowed;
  opacity: 0.68;
  filter: grayscale(0.12);
}

.proxy-example {
  margin: 16px 0 0;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.34);
}

.proxy-example img {
  display: block;
  width: 100%;
  height: auto;
}

.proxy-example figcaption {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.support {
  width: min(560px, 100%);
  margin: 14px auto 0;
}

body.is-admin-miniapp .support {
  display: none;
}

.support-card {
  padding: 16px;
}

.support-text {
  margin: 0;
  font-size: clamp(14px, 4vw, 16px);
  line-height: 1.45;
  text-align: center;
  white-space: nowrap;
}

.support-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
}

.support-link:hover,
.support-link:focus-visible {
  outline: none;
}

.support-name {
  font-size: 16px;
  line-height: 1;
}

.trap-link {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
