/* Полноэкранные модалки-подсказки: «на главный экран» и «пригласить друга».
   Стиль повторяет welcome-splash, чтобы выглядеть как часть онбординга. */
.nudge {
  position: fixed;
  inset: 0;
  z-index: 3200;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow-y: auto;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 22px
    calc(28px + env(safe-area-inset-bottom, 0px));
  background: radial-gradient(120% 78% at 50% 0%,
    color-mix(in srgb, var(--color-primary) 16%, var(--bg-app)) 0%,
    var(--bg-app) 58%);
}
.nudge.show { display: flex; animation: viewIn var(--dur) var(--ease); }
html:has(.nudge.show) { overflow: hidden; }
html:has(.nudge.show) body { overflow: hidden; }

.nudge-close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: 14px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: pointer;
}
.nudge-close svg { width: 20px; height: 20px; }

.nudge-inner {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.nudge-art { width: 186px; max-width: 60%; margin-bottom: 18px; }
.na-svg { width: 100%; height: auto; display: block; overflow: visible; }

.nudge-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin: 0 0 10px;
}
.nudge-text {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 18px;
}
.nudge-note {
  width: 100%;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
  background: var(--surface-2);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 0 18px;
}
.nudge-note b { color: var(--text-primary); font-weight: 700; }
.nudge-hint svg { width: 16px; height: 16px; vertical-align: -3px; }

.nudge-cta {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.nudge-cta svg { width: 20px; height: 20px; flex: none; }
.nudge-secondary {
  margin-top: 14px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
}

/* --- Блок «скопировать ссылку» (альтернатива нативному шэрингу) --- */
.nudge-copy {
  width: 100%;
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.nudge-copy-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--fill-input);
  color: var(--text-secondary);
  font-size: 13px;
  padding: 10px 12px;
  outline: none;
  text-overflow: ellipsis;
}
.nudge-copy-input:focus { border-color: var(--color-primary); }
.nudge-copy-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 650;
  padding: 0 14px;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nudge-copy-btn svg { width: 16px; height: 16px; }
.nudge-copy-btn:active { filter: brightness(0.97); }

/* --- Иллюстрация «телефон + иконка приложения» --- */
.na-home .na-body {
  fill: var(--surface);
  stroke: color-mix(in srgb, var(--color-primary) 32%, var(--surface-2));
  stroke-width: 3;
}
.na-home .na-line {
  stroke: color-mix(in srgb, var(--text-muted) 45%, transparent);
  stroke-width: 3;
  stroke-linecap: round;
}
.na-home .na-dots rect {
  fill: color-mix(in srgb, var(--color-primary) 15%, var(--surface-2));
}
.na-home .na-app { fill: var(--color-primary); }
.na-home .na-app-glyph { stroke: #fff; }
.na-home .na-badge circle {
  fill: var(--color-primary);
  stroke: var(--bg-app);
  stroke-width: 3;
}
.na-home .na-badge-t {
  fill: #fff;
  font-size: 15px;
  font-weight: 800;
  font-family: inherit;
}

/* --- Иллюстрация «подарок» --- */
.na-gift .na-box { fill: var(--color-primary); }
.na-gift .na-lid { fill: color-mix(in srgb, var(--color-primary) 80%, #000); }
.na-gift .na-ribbon { stroke: #fff; stroke-width: 4; }
.na-gift .na-bow { fill: #fff; }
.na-gift .na-spark path {
  fill: color-mix(in srgb, var(--color-primary) 55%, var(--surface));
}

/* =====================================================
   ПК: модалка-подсказка — компактная центрированная карточка с затемнением
   фона вместо полноэкранного градиента (нативнее для десктопа).
   ===================================================== */
@media (min-width: 900px) {
  .nudge {
    padding: 40px 24px;
    background: rgba(8, 11, 16, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  .nudge-inner {
    max-width: 420px;
    padding: 32px 30px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-float);
  }
  .nudge-art { width: 156px; margin-bottom: 14px; }
  .nudge-title { font-size: 21px; }
}
