/* Happ tutorial — screenshots + calibrated overlays */

.happtorial {
  margin: 16px 0 28px;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hair-2);
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(124, 92, 252, 0.08), transparent 50%),
    rgba(0, 0, 0, 0.18);
}

.happtorial__layout {
  display: grid;
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}

.happtorial__phone {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  padding: 12px;
  border-radius: 44px;
  background: linear-gradient(145deg, #3a3a42, #1a1a1f 50%, #2a2a32);
  box-shadow: 0 32px 80px -24px rgba(0, 0, 0, 0.75);
}

.happtorial__phone::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 28px;
  border-radius: 20px;
  background: #0a0a0c;
  z-index: 20;
}

.happtorial__viewport {
  position: relative;
  aspect-ratio: 472 / 1024;
  border-radius: 32px;
  overflow: hidden;
  background: #eef0f4;
}

.happtorial__camera {
  position: absolute;
  inset: 0;
  transform-origin: 91.5% 10.8%;
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.happtorial__camera[data-phase='zoom'] {
  transform: scale(2.4);
}

/* —— Site —— */
.happtorial__layer {
  position: absolute;
  inset: 0;
  transition: opacity 0.45s ease, visibility 0.45s;
}

.happtorial__layer--site {
  z-index: 5;
  background: #0c0a12;
  padding: 48px 12px 12px;
}

.happtorial__layer--site.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.happtorial-site__urlbar {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  padding: 7px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 11px;
  color: var(--fg-mute);
}

.happtorial-site__urlbar strong { color: var(--fg); }

.happtorial-site__card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.happtorial-site__card .cab-sub-link-label { display: block; margin-bottom: 6px; }
.happtorial-site__card .cab-sub-link { font-size: 10px; padding: 8px; margin-bottom: 12px; word-break: break-all; }

.btn-copy-demo { width: 100%; justify-content: center; }
.btn-copy-demo.is-pulse { animation: copy-pulse 0.65s ease-in-out infinite; }

@keyframes copy-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.5); }
  50%      { box-shadow: 0 0 0 10px rgba(168, 85, 247, 0); }
}

.happtorial-toast {
  position: absolute;
  left: 50%;
  bottom: 28%;
  transform: translateX(-50%) translateY(6px);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: #86efac;
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.35);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  white-space: nowrap;
  z-index: 6;
}

.happtorial-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* —— Happ shots —— */
.happtorial__layer--happ { z-index: 1; }

.happ-shots {
  position: absolute;
  inset: 0;
}

.happ-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  user-select: none;
}

.happ-shot.is-on { opacity: 1; }

.happ-shot[data-shot='2'] {
  object-fit: contain;
  object-position: center 12%;
  background: #ebedf2;
}

/* overlays — позиции задаёт JS */
.happ-hit {
  position: absolute;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  z-index: 4;
  transition: opacity 0.3s;
}

.happ-paste-hit {
  background: rgba(99, 102, 241, 0.22);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.6);
}

.happ-paste-hit.is-on { opacity: 1; }

.happ-sub-hit {
  background: rgba(59, 130, 246, 0.15);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

.happ-sub-hit.is-on { opacity: 1; }

.happ-plus-target {
  border-radius: 50%;
  border: 2px solid #6366f1;
  background: rgba(99, 102, 241, 0.08);
}

.happ-plus-target.is-show {
  opacity: 1;
  animation: plus-ring 1.1s ease-out infinite;
}

@keyframes plus-ring {
  0%   { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.55); }
  100% { box-shadow: 0 0 0 14px rgba(99, 102, 241, 0); }
}

.happ-finger {
  position: absolute;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.4);
  border: 2px solid #6366f1;
  opacity: 0;
  z-index: 6;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.35);
}

.happ-finger.is-show {
  opacity: 1;
  animation: finger-tap 0.45s ease-out;
}

@keyframes finger-tap {
  0%   { transform: scale(1); }
  45%  { transform: scale(0.82); }
  100% { transform: scale(1); }
}

/* —— Steps (clickable) —— */
.happtorial__steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.happtorial-step {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  color: var(--fg-dim);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.happtorial-step:hover {
  border-color: var(--hair-2);
  color: var(--fg);
}

.happtorial-step.is-active {
  border-color: color-mix(in oklch, var(--acc-1), transparent 45%);
  background: var(--acc-soft);
  color: var(--fg);
}

.happtorial-step__num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 600;
  color: var(--fg-mute);
  pointer-events: none;
}

.happtorial-step.is-active .happtorial-step__num { color: var(--acc-1); }

.happtorial-step__text { pointer-events: none; }
.happtorial-step__text strong { color: var(--fg); font-weight: 600; }
.happtorial-step__text a { color: var(--acc-1); pointer-events: auto; }

.happtorial__caption {
  margin: 12px 0 0;
  min-height: 2.6em;
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg-dim);
}

.happtorial__caption strong { color: var(--fg); }

.happtorial__controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.happtorial__replay {
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid var(--hair-2);
  font-size: 12px;
  color: var(--fg-dim);
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.happtorial__progress {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: var(--hair);
  overflow: hidden;
}

.happtorial__progress-bar {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--acc-1), var(--acc-brand-3));
  transition: width 0.15s linear;
}

@media (max-width: 860px) {
  .happtorial__layout { grid-template-columns: 1fr; }
  .happtorial__phone { max-width: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  .happtorial__camera,
  .happ-shot,
  .happ-hit,
  .happ-plus-target.is-show,
  .happ-finger.is-show,
  .btn-copy-demo.is-pulse {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}

/* —— Instruction page layout (routes, FAQ, checklist) —— */

.instr-quick {
  margin-bottom: 16px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.instr-quick::before {
  display: none !important;
}

.instr-quick-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.instr-quick-step {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 72px;
  padding: 14px;
  border: 1px solid var(--hair-2);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.16);
  color: var(--fg);
}

.instr-quick-step:hover,
.instr-quick-step:focus-visible {
  border-color: rgba(124, 92, 252, 0.42);
  background: rgba(124, 92, 252, 0.09);
}

.instr-quick-step__num,
.instr-import-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(124, 92, 252, 0.16);
  color: #c4b5fd;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  font-weight: 700;
}

.instr-quick-step strong,
.instr-quick-step small {
  display: block;
}

.instr-quick-step strong {
  font-size: 14px;
}

.instr-quick-step small {
  margin-top: 2px;
  color: var(--fg-mute);
  font-size: 11.5px;
  line-height: 1.35;
}

.instr-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 14px;
}

.instr-quick-links a {
  color: var(--fg-dim);
  font-size: 13px;
}

.instr-quick-links a:hover {
  color: var(--fg);
}

.instr-import-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 22px !important;
  padding: 0 !important;
  list-style: none;
  counter-reset: none;
}

.instruction-page .instruction-prose .instr-import-grid li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  min-height: 132px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--hair-2);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.16);
}

.instr-import-grid li > strong {
  margin-top: 12px;
  color: var(--fg);
  font-size: 14px;
}

.instr-import-grid li > small {
  margin-top: 5px;
  color: var(--fg-mute);
  font-size: 12px;
  line-height: 1.4;
}

.instr-server-title {
  margin: 0 0 10px;
  color: var(--fg);
  font-size: 15px;
  font-weight: 600;
}

.instr-server-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.instr-server-choice {
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--hair-2);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.02);
}

.instr-server-choice__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(124, 92, 252, 0.13);
  color: #c4b5fd;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
}

.instr-server-choice strong {
  color: var(--fg);
  font-size: 14px;
}

.instr-server-choice p {
  margin: 3px 0 0;
  color: var(--fg-mute);
  font-size: 12.5px;
  line-height: 1.4;
}

.instr-callout--info {
  border-color: rgba(96, 165, 250, 0.24);
  background: rgba(59, 130, 246, 0.07);
}

.instr-disclosure {
  padding: 0;
}

.instr-disclosure__summary {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 56px 20px 24px;
  cursor: pointer;
  list-style: none;
  color: var(--fg);
  font-size: 16px;
  font-weight: 600;
}

.instr-disclosure__summary::-webkit-details-marker {
  display: none;
}

.instr-disclosure__summary::after {
  content: '+';
  position: absolute;
  top: 50%;
  right: 24px;
  color: var(--fg-mute);
  font-size: 20px;
  font-weight: 400;
  transform: translateY(-50%);
}

.instr-disclosure[open] .instr-disclosure__summary::after {
  content: '−';
}

.instr-disclosure__summary small {
  color: var(--fg-mute);
  font-size: 12.5px;
  font-weight: 400;
}

.instr-disclosure__body {
  padding: 0 24px 22px;
  border-top: 1px solid var(--hair);
}

.instr-disclosure__body .instruction-tabs {
  margin-top: 18px;
}

.instr-cta-row--footer {
  margin-top: 18px;
}

.instr-toc {
  margin-bottom: 16px;
}

.instr-toc__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}

.instr-toc__inner a {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-dim);
  text-decoration: none;
}

.instr-toc__inner a:hover {
  color: var(--fg);
}

.instruction-tabs--routes,
.instruction-tabs--os {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.instruction-tabs--routes {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.instr-quick-pager {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0;
}

.instr-quick-dots {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 14px;
}

.instr-quick-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.instr-callout {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.08);
  color: var(--fg);
  font-size: 14px;
  line-height: 1.45;
}

.instr-table-wrap {
  overflow-x: auto;
  margin: 12px 0 8px;
  border-radius: 12px;
  border: 1px solid var(--hair-2);
}

.instr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.instr-table th,
.instr-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--hair);
}

.instr-table th {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-mute);
  background: rgba(0, 0, 0, 0.22);
}

.instr-table tr:last-child td {
  border-bottom: none;
}

.instr-table td:first-child {
  color: var(--fg-dim);
  width: 48%;
}

.instr-checklist {
  list-style: none;
  margin: 12px 0 20px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.instr-checklist li {
  margin: 0;
}

.instr-checklist label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--hair-2);
  background: rgba(0, 0, 0, 0.16);
  cursor: pointer;
  font-size: 14.5px;
  line-height: 1.4;
}

.instr-checklist input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: #7c5cfc;
  flex-shrink: 0;
}

.instr-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.instr-faq {
  margin: 0 0 8px;
  border-radius: 12px;
  border: 1px solid var(--hair-2);
  background: rgba(0, 0, 0, 0.16);
  overflow: hidden;
}

.instr-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--fg);
}

.instr-faq summary::-webkit-details-marker {
  display: none;
}

.instr-faq summary::after {
  content: '+';
  float: right;
  color: var(--fg-mute);
  font-weight: 500;
}

.instr-faq[open] summary::after {
  content: '−';
}

.instr-faq > div {
  padding: 0 16px 14px;
  color: var(--fg-dim);
  font-size: 14px;
  line-height: 1.5;
}

.instr-faq > div p {
  margin: 0;
}

.instr-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--hair-2);
  background: #000;
}

.instr-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.instruction-page .cab-card + .cab-card {
  margin-top: 14px;
}

.instruction-page .instruction-prose h2 {
  scroll-margin-top: 88px;
}

@media (min-width: 981px) {
  body.instruction-fit {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  body.instruction-fit .landing-content {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  body.instruction-fit .landing-nav {
    flex: 0 0 auto;
  }

  body.instruction-fit .instruction-page {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    flex: 1 1 auto;
    min-height: 0;
    width: min(1180px, 100%);
    max-width: 1180px;
    padding: 14px 20px 18px;
    gap: 10px;
    overflow: hidden;
  }

  body.instruction-fit .instruction-page .cab-head {
    margin: 0;
  }

  body.instruction-fit .instruction-page .cab-head h1 {
    margin-top: 6px;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.08;
  }

  body.instruction-fit .instruction-page .cab-sub {
    margin-top: 5px;
    font-size: 13px;
  }

  body.instruction-fit .instr-quick {
    margin: 0;
    padding: 10px;
  }

  body.instruction-fit .instr-quick-flow {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  body.instruction-fit .instr-quick-step {
    min-height: 62px;
    padding: 10px 12px;
    gap: 9px;
    border-radius: 11px;
  }

  body.instruction-fit .instr-quick-step.is-active {
    border-color: rgba(124, 92, 252, 0.5);
    background: rgba(124, 92, 252, 0.13);
  }

  body.instruction-fit .instr-quick-step__num {
    width: 27px;
    height: 27px;
  }

  body.instruction-fit .instr-quick-step strong {
    font-size: 14px;
  }

  body.instruction-fit .instr-quick-step small {
    font-size: 11px;
  }

  body.instruction-fit .instruction-page > .instr-section {
    display: none;
    grid-row: 3;
    min-height: 0;
    height: 100%;
    margin: 0 !important;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  body.instruction-fit .instruction-page > .instr-section.is-current {
    display: block;
  }

  body.instruction-fit .instruction-page > .instruction-video-card {
    display: none;
  }

  body.instruction-fit .instruction-page > .instr-section > .cab-card-inner {
    min-height: 100%;
    box-sizing: border-box;
  }

  body.instruction-fit #route > .cab-card-inner,
  body.instruction-fit #download > .cab-card-inner,
  body.instruction-fit #import > .cab-card-inner,
  body.instruction-fit #os > .cab-card-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  body.instruction-fit .instruction-page .instruction-prose h2 {
    margin-bottom: 8px;
    font-size: 23px;
    letter-spacing: -0.025em;
  }

  body.instruction-fit .instruction-page .instruction-lead {
    margin-bottom: 16px;
    font-size: 14.5px;
  }

  body.instruction-fit .instruction-tabs {
    min-height: 50px;
    margin-bottom: 14px;
    padding: 5px;
  }

  body.instruction-fit .instruction-tab {
    min-height: 40px;
    font-size: 13px;
  }

  body.instruction-fit .instruction-panel > ol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
    counter-reset: instr-action;
  }

  body.instruction-fit .instruction-panel > ol > li {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 68px;
    margin: 0;
    padding: 13px 16px 13px 54px;
    border: 1px solid var(--hair-2);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--fg-dim);
    font-size: 14px;
    line-height: 1.4;
    counter-increment: instr-action;
  }

  body.instruction-fit .instruction-panel > ol > li::before {
    content: counter(instr-action);
    position: absolute;
    left: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: rgba(124, 92, 252, 0.16);
    color: #c4b5fd;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12px;
    font-weight: 700;
  }

  body.instruction-fit #route .instr-callout {
    margin-top: 12px;
  }

  body.instruction-fit #download .instruction-app-grid {
    gap: 12px;
  }

  body.instruction-fit #download .instruction-app-link {
    min-height: 104px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 650;
  }

  body.instruction-fit .instr-import-grid {
    gap: 12px;
  }

  body.instruction-fit .instruction-prose .instr-import-grid li {
    min-height: 142px;
    padding: 16px;
  }

  body.instruction-fit .instr-server-choice {
    padding: 16px;
  }

  body.instruction-fit .instr-server-choice strong {
    font-size: 15px;
  }

  body.instruction-fit .instr-server-choice p {
    font-size: 13px;
  }

  body.instruction-fit #faq .cab-card-inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: center;
    gap: 8px 10px;
  }

  body.instruction-fit #faq h2,
  body.instruction-fit #faq .instruction-lead,
  body.instruction-fit #faq .instr-cta-row {
    grid-column: 1 / -1;
  }

  body.instruction-fit #faq .instr-faq {
    margin: 0;
  }

  body.instruction-fit #faq .instr-faq summary {
    padding: 11px 13px;
    font-size: 13px;
  }

  body.instruction-fit #faq .instr-faq > div {
    padding: 0 13px 11px;
    font-size: 12.5px;
  }

  body.instruction-fit .instr-cta-row--footer {
    margin-top: 4px;
  }
}

@media (min-width: 981px) and (max-height: 820px) {
  body.instruction-fit .instruction-page {
    padding-top: 8px;
    padding-bottom: 10px;
    gap: 7px;
  }

  body.instruction-fit .instruction-page .cab-userline {
    display: none;
  }

  body.instruction-fit .instruction-page .cab-head h1 {
    margin-top: 0;
    font-size: 24px;
  }

  body.instruction-fit .instr-quick-step small {
    display: none;
  }

  body.instruction-fit .instr-quick-step {
    min-height: 42px;
  }

  body.instruction-fit .instruction-page > .instr-section {
    padding: 18px 20px;
  }

  body.instruction-fit .instr-import-grid {
    margin: 10px 0 12px !important;
  }

  body.instruction-fit .instruction-prose .instr-import-grid li {
    min-height: 104px;
    padding: 10px;
  }

  body.instruction-fit .instr-import-grid li > strong {
    margin-top: 6px;
  }

  body.instruction-fit .instr-server-choice {
    padding: 10px;
  }

  body.instruction-fit .instr-callout {
    margin-top: 8px;
    padding: 8px 10px;
  }
}

@media (max-width: 720px) {
  .instr-quick-flow {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .instr-quick-step {
    min-height: 64px;
    padding: 12px;
  }

  .instr-import-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .instr-server-grid {
    grid-template-columns: 1fr;
  }

  .instruction-tabs--routes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .instruction-tabs--os {
    grid-template-columns: 1fr 1fr;
  }

  .instruction-page .cab-card {
    padding: 18px 16px;
    border-radius: 16px;
  }

  .instruction-page .cab-card.instr-disclosure {
    padding: 0;
  }

  .instr-disclosure__summary {
    padding: 18px 48px 18px 16px;
  }

  .instr-disclosure__summary::after {
    right: 16px;
  }

  .instr-disclosure__body {
    padding: 0 16px 18px;
  }

  .happtorial__phone {
    max-width: 270px;
  }

  .happtorial__camera,
  .happ-shot,
  .happ-shot__tap {
    animation: none !important;
  }

  .happtorial__controls {
    display: none;
  }

  .instruction-tabs {
    gap: 6px;
  }

  .instruction-tab {
    min-height: 44px;
    padding: 10px 8px;
    font-size: 12px;
  }

  .instr-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .instr-table td:first-child {
    width: auto;
  }
}

/* Compact sticky step rail on phones/tablets */
@media (max-width: 980px) {
  body.instruction-fit .instruction-page {
    padding-bottom: calc(var(--mobile-nav-h) + 36px + env(safe-area-inset-bottom, 0px));
  }

  body.instruction-fit .instr-quick {
    position: sticky;
    top: 0;
    z-index: 40;
    margin: 0 0 14px;
    padding: 8px 0 10px;
    background: linear-gradient(180deg, rgba(7, 6, 12, 0.96) 55%, rgba(7, 6, 12, 0.72) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  body.instruction-fit .instr-quick-flow {
    display: none;
  }

  body.instruction-fit .instr-quick-pager {
    display: flex;
  }

  body.instruction-fit .instruction-page > .instr-section {
    display: none;
    margin: 0 !important;
  }

  body.instruction-fit .instruction-page > .instr-section.is-current {
    display: block;
  }

  body.instruction-fit .instruction-tabs--routes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  body.instruction-fit .instruction-tabs--routes .instruction-tab {
    min-height: 40px;
    padding: 8px 4px;
    font-size: 11px;
    letter-spacing: -0.01em;
    text-align: center;
  }

  body.instruction-fit .instruction-tabs--routes .instruction-tab [role="tab"] {
    font-size: 0;
    line-height: 0;
  }

  body.instruction-fit .instruction-tabs--routes .instruction-tab [role="tab"]::after {
    content: attr(data-short);
    font-size: 11px;
    line-height: 1.2;
    letter-spacing: -0.01em;
  }

  body.instruction-fit .instr-import-grid {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }

  body.instruction-fit .instruction-page .instruction-prose .instr-import-grid li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 3px;
    align-items: center;
    min-height: 0;
    padding: 12px 12px;
  }

  body.instruction-fit .instr-import-step__num {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
    margin: 0;
  }

  body.instruction-fit .instr-import-grid li > strong {
    grid-column: 2;
    grid-row: 1;
    margin-top: 0;
    font-size: 13.5px;
    line-height: 1.25;
  }

  body.instruction-fit .instr-import-grid li > small {
    grid-column: 2;
    grid-row: 2;
    margin-top: 0;
    font-size: 12px;
  }

  body.instruction-fit .instr-callout,
  body.instruction-fit .instr-callout--info {
    margin-top: 16px;
    margin-bottom: 4px;
    padding: 12px 14px;
  }

  body.instruction-fit .instr-section {
    scroll-margin-top: 64px;
  }

  body.instruction-fit .instruction-page .cab-head h1 {
    font-size: clamp(26px, 7vw, 34px);
  }

  body.instruction-fit .instruction-page .cab-sub {
    font-size: 13.5px;
  }
}

@media (max-width: 420px) {
  .instr-import-grid {
    grid-template-columns: 1fr;
  }

  .instruction-page .instruction-prose .instr-import-grid li {
    min-height: 0;
  }

  .instr-quick-links {
    flex-direction: column;
    gap: 8px;
  }
}

/* Desktop reading workspace: step rail + focused content */
@media (min-width: 981px) {
  body.instruction-fit .instruction-page {
    grid-template-columns: 272px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    column-gap: 18px;
    row-gap: 14px;
    padding: 18px 20px 22px;
  }

  body.instruction-fit .instruction-page .cab-head {
    grid-column: 1;
    grid-row: 1;
    padding: 4px 5px 0;
  }

  body.instruction-fit .instruction-page .cab-userline {
    display: inline-flex;
    margin-bottom: 10px;
  }

  body.instruction-fit .instruction-page .cab-head h1 {
    max-width: 250px;
    margin: 0;
    font-size: 29px;
    line-height: 1.08;
    letter-spacing: -0.035em;
  }

  body.instruction-fit .instruction-page .cab-sub {
    max-width: 245px;
    margin-top: 9px;
    font-size: 13.5px;
    line-height: 1.45;
  }

  body.instruction-fit .instr-quick {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body.instruction-fit .instr-quick-flow {
    display: flex;
    height: auto;
    flex-direction: column;
    gap: 8px;
    padding-top: 0;
  }

  body.instruction-fit .instr-quick-step {
    position: relative;
    flex: 0 0 auto;
    min-height: 72px;
    padding: 10px 12px;
    gap: 11px;
    border-color: transparent;
    border-radius: 12px;
    background: transparent;
  }

  body.instruction-fit .instr-quick-step::after {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 99px;
    background: transparent;
  }

  body.instruction-fit .instr-quick-step:hover {
    border-color: var(--hair-2);
    background: rgba(255, 255, 255, 0.035);
  }

  body.instruction-fit .instr-quick-step.is-active {
    border-color: rgba(124, 92, 252, 0.3);
    background: linear-gradient(90deg, rgba(124, 92, 252, 0.16), rgba(124, 92, 252, 0.06));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  body.instruction-fit .instr-quick-step.is-active::after {
    background: #8b5cf6;
    box-shadow: 0 0 14px rgba(139, 92, 246, 0.55);
  }

  body.instruction-fit .instr-quick-step__num {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 12px;
  }

  body.instruction-fit .instr-quick-step strong {
    font-size: 14px;
    line-height: 1.2;
  }

  body.instruction-fit .instr-quick-step small {
    display: block;
    margin-top: 4px;
    font-size: 10.5px;
    line-height: 1.3;
  }

  body.instruction-fit .instruction-page > .instr-section {
    grid-column: 2;
    grid-row: 1 / 3;
    border-radius: 22px;
    background:
      radial-gradient(circle at 8% 0%, rgba(124, 92, 252, 0.09), transparent 35%),
      linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.055),
      0 24px 70px rgba(0, 0, 0, 0.2);
  }

  body.instruction-fit .instruction-page > .instr-section > .cab-card-inner {
    padding: clamp(28px, 4vh, 44px) clamp(28px, 3vw, 48px);
  }

  body.instruction-fit .instruction-page .instruction-prose h2 {
    max-width: 680px;
    margin-bottom: 9px;
    font-size: clamp(25px, 2.2vw, 31px);
  }

  body.instruction-fit .instruction-page .instruction-lead {
    margin-bottom: 22px;
    font-size: 15.5px;
    line-height: 1.5;
  }

  body.instruction-fit .instruction-tabs {
    min-height: 54px;
    margin-bottom: 16px;
    border-radius: 14px;
  }

  body.instruction-fit .instruction-tab {
    min-height: 44px;
    font-size: 13.5px;
  }

  body.instruction-fit .instruction-panel > ol {
    gap: 12px;
  }

  body.instruction-fit .instruction-panel > ol > li {
    min-height: 78px;
    padding: 16px 18px 16px 62px;
    border-radius: 15px;
    font-size: 15px;
  }

  body.instruction-fit .instruction-panel > ol > li::before {
    left: 17px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 13px;
  }

  body.instruction-fit .instr-callout {
    font-size: 13.5px;
    line-height: 1.45;
  }
}

/* Visual simplification: one surface, fewer nested boxes */
@media (min-width: 981px) {
  body.instruction-fit .instr-quick {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body.instruction-fit .instr-quick-step {
    border: 0;
    padding-inline: 10px;
  }

  body.instruction-fit .instr-quick-step:hover {
    border-color: transparent;
  }

  body.instruction-fit .instr-quick-step.is-active {
    border: 0;
    background: linear-gradient(90deg, rgba(124, 92, 252, 0.16), rgba(124, 92, 252, 0.035));
  }

  body.instruction-fit .instruction-page > .instr-section {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body.instruction-fit .instruction-page > .instr-section::before {
    display: none;
  }

  body.instruction-fit .instruction-panel > ol {
    column-gap: 24px;
    row-gap: 0;
  }

  body.instruction-fit .instruction-panel > ol > li {
    display: block;
    min-height: 76px;
    padding: 15px 8px 15px 50px;
    border: 0;
    border-bottom: 1px solid var(--hair-2);
    border-radius: 0;
    background: transparent;
    align-content: center;
  }

  body.instruction-fit .instruction-panel > ol > li::before {
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(124, 92, 252, 0.13);
  }

  body.instruction-fit .instruction-tabs {
    padding: 3px;
    border-color: rgba(255, 255, 255, 0.07);
    background: rgba(0, 0, 0, 0.15);
  }

  body.instruction-fit .instruction-tab {
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body.instruction-fit .instruction-prose .instr-import-grid li {
    min-height: 124px;
    padding: 12px 15px;
    border: 0;
    border-right: 1px solid var(--hair-2);
    border-radius: 0;
    background: transparent;
  }

  body.instruction-fit .instruction-prose .instr-import-grid li:last-child {
    border-right: 0;
  }

  body.instruction-fit .instr-server-choice {
    border-color: rgba(255, 255, 255, 0.065);
    background: rgba(255, 255, 255, 0.018);
  }

  body.instruction-fit #download .instruction-app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  body.instruction-fit #download .instruction-app-link {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 32px;
    align-items: center;
    min-height: 112px;
    padding: 16px 18px;
    gap: 15px;
    border-color: rgba(255, 255, 255, 0.075);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.022);
    text-align: left;
  }

  body.instruction-fit #download .instruction-app-link:hover {
    border-color: rgba(124, 92, 252, 0.45);
    background: rgba(124, 92, 252, 0.075);
    transform: translateY(-2px);
  }
}

.instruction-app-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  color: #c4b5fd;
  background: rgba(124, 92, 252, 0.13);
}

.instruction-app-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.instruction-app-icon--android {
  color: #86efac;
  background: rgba(34, 197, 94, 0.11);
}

.instruction-app-icon--windows {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
}

.instruction-app-icon--windows svg {
  fill: currentColor;
  stroke: none;
}

.instruction-app-link > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.instruction-app-link strong {
  color: var(--fg);
  font-size: 16px;
  line-height: 1.2;
}

.instruction-app-link small {
  color: var(--fg-mute);
  font-size: 12px;
  line-height: 1.2;
}

.instruction-app-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: var(--fg-dim);
  background: rgba(255, 255, 255, 0.045);
  font-size: 15px;
}

@media (max-width: 720px) {
  .instruction-app-link {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 12px;
    text-align: left;
  }

  .instruction-app-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }

  .instruction-app-icon svg {
    width: 23px;
    height: 23px;
  }
}

@media (max-width: 420px) {
  .instruction-app-grid {
    grid-template-columns: 1fr;
  }

  .instruction-app-link {
    min-height: 66px;
    padding: 10px 12px;
  }
}

@media (min-width: 981px) {
  body.instruction-fit .instr-quick-flow {
    justify-content: flex-start;
    gap: 8px;
  }

  body.instruction-fit .instr-quick-step {
    flex: 0 0 auto;
    min-height: 76px;
  }

  body.instruction-fit #import .instr-callout {
    margin-top: 12px !important;
  }

  body.instruction-fit #route .instruction-panel {
    height: 230px;
    box-sizing: border-box;
  }
}

.instr-country-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.instr-country-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.04);
  font-size: 16px;
  line-height: 1;
}

@media (max-width: 720px) {
  .instr-country-list {
    gap: 5px;
  }

  .instr-country-list span {
    font-size: 11px;
  }
}

@media (min-width: 981px) {
  body.instruction-fit .instr-quick-flow {
    justify-content: flex-start;
    gap: 12px;
  }

  body.instruction-fit .instr-quick-step {
    min-height: 78px;
  }

  body.instruction-fit .instr-import-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 0;
  }

  body.instruction-fit .instruction-prose .instr-import-grid li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: center;
    min-height: 84px;
    padding: 12px 8px;
    column-gap: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--hair-2);
  }

  body.instruction-fit .instr-import-step__num {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
    margin: 0;
  }

  body.instruction-fit .instr-import-grid li > strong {
    grid-column: 2;
    margin: 0;
    font-size: 14.5px;
    line-height: 1.3;
  }

  body.instruction-fit .instr-import-grid li > small {
    grid-column: 2;
    margin-top: 4px;
    font-size: 12.5px;
    line-height: 1.35;
  }

  body.instruction-fit .instr-server-choice {
    min-height: 104px;
    box-sizing: border-box;
  }
}

.instr-country-list {
  gap: 8px;
  margin-top: 9px;
}

.instr-country-list span {
  width: 32px;
  height: 32px;
  min-height: 0;
  padding: 0;
  font-size: 17px;
}

body.instruction-fit .instruction-prose a {
  text-decoration: none;
  border-bottom: 0;
}

body.instruction-fit .instruction-prose a:hover {
  color: #ddd6fe;
}

@media (min-width: 981px) {
  body.instruction-fit .instruction-page > .instr-section > .cab-card-inner {
    width: 100%;
    max-width: 860px;
    margin-inline: auto;
  }

  body.instruction-fit .instr-import-grid {
    gap: 0;
    margin: 16px 0 20px !important;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.015);
  }

  body.instruction-fit .instruction-prose .instr-import-grid li {
    min-height: 86px;
    padding: 13px 16px;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  body.instruction-fit .instruction-prose .instr-import-grid li:nth-child(odd) {
    border-right: 1px solid var(--hair-2);
  }

  body.instruction-fit .instruction-prose .instr-import-grid li:nth-child(-n + 2) {
    border-bottom: 1px solid var(--hair-2);
  }

  body.instruction-fit .instr-quick-flow {
    justify-content: flex-start;
    gap: 8px;
    padding-top: 12px;
  }

  body.instruction-fit #faq .cab-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    text-align: center;
  }

  body.instruction-fit #faq h2 {
    margin-bottom: 24px;
  }
}

.instr-support-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 720px);
  gap: 12px;
}

.instr-support-button {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  min-height: 88px;
  padding: 14px 18px;
  gap: 14px;
  border: 1px solid var(--hair-2);
  border-radius: 16px;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.025);
  text-align: left;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.instr-support-button:hover {
  border-color: rgba(124, 92, 252, 0.4);
  background: rgba(124, 92, 252, 0.07);
  transform: translateY(-2px);
}

.instr-support-button__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: #c4b5fd;
  background: rgba(124, 92, 252, 0.13);
}

.instr-support-button--telegram .instr-support-button__icon {
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.13);
}

.instr-support-button__icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.instr-support-button > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.instr-support-button strong {
  font-size: 14.5px;
  line-height: 1.25;
}

.instr-support-button small {
  color: var(--fg-mute);
  font-size: 12px;
}

@media (max-width: 720px) {
  .instr-support-actions {
    grid-template-columns: 1fr;
  }

  .instr-support-button {
    min-height: 76px;
    padding: 12px 14px;
  }
}

body.instruction-fit .instr-quick::before {
  display: none;
}
